nixpkgs mirror (for testing) github.com/NixOS/nixpkgs
nix
at 22.05 37 lines 994 B view raw
1{ stdenv 2, lib 3, fetchPypi 4, buildPythonPackage 5, isPy3k 6, python 7}: 8 9buildPythonPackage rec { 10 pname = "docutils"; 11 version = "0.18.1"; 12 13 src = fetchPypi { 14 inherit pname version; 15 sha256 = "sha256-Z5mHyvNhp1OdduWEy+3cMR467pN4d8hzRvMd68Y+nQY="; 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}