1{ stdenv 2, lib 3, fetchPypi 4, buildPythonPackage 5, isPy3k 6, python 7}: 8 9buildPythonPackage rec { 10 pname = "docutils"; 11 version = "0.17.1"; 12 13 src = fetchPypi { 14 inherit pname version; 15 sha256 = "686577d2e4c32380bb50cbb22f575ed742d58168cee37e99117a854bcd88f125"; 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" LC_ALL="en_US.UTF-8" '' + '' 21 ${python.interpreter} test/alltests.py 22 ''; 23 24 # Create symlinks lacking a ".py" suffix, many programs depend on these names 25 postFixup = '' 26 for f in $out/bin/*.py; do 27 ln -s $(basename $f) $out/bin/$(basename $f .py) 28 done 29 ''; 30 31 meta = with lib; { 32 description = "Python Documentation Utilities"; 33 homepage = "http://docutils.sourceforge.net/"; 34 license = with licenses; [ publicDomain bsd2 psfl gpl3Plus ]; 35 maintainers = with maintainers; [ AndersonTorres ]; 36 }; 37}