Clone of https://github.com/NixOS/nixpkgs.git (to stress-test knotserver)
at 19.03 1.0 kB view raw
1{ stdenv 2, lib 3, fetchurl 4, buildPythonPackage 5, isPy3k 6, python 7}: 8 9buildPythonPackage rec { 10 pname = "docutils"; 11 version = "0.14"; 12 13 src = fetchurl { 14 url = "mirror://sourceforge/docutils/${pname}.tar.gz"; 15 sha256 = "0x22fs3pdmr42kvz6c654756wja305qv6cx1zbhwlagvxgr4xrji"; 16 }; 17 18 # Only Darwin needs LANG, but we could set it in general. 19 # It's done here conditionally to prevent mass-rebuilds. 20 checkPhase = lib.optionalString (isPy3k && stdenv.isDarwin) ''LANG="en_US.UTF-8" '' + (if isPy3k then '' 21 ${python.interpreter} test3/alltests.py 22 '' else '' 23 ${python.interpreter} test/alltests.py 24 ''); 25 26 # Create symlinks lacking a ".py" suffix, many programs depend on these names 27 postFixup = '' 28 for f in $out/bin/*.py; do 29 ln -s $(basename $f) $out/bin/$(basename $f .py) 30 done 31 ''; 32 33 meta = { 34 description = "Docutils -- Python Documentation Utilities"; 35 homepage = http://docutils.sourceforge.net/; 36 maintainers = with lib.maintainers; [ garbas AndersonTorres ]; 37 }; 38}