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