Clone of https://github.com/NixOS/nixpkgs.git (to stress-test knotserver)
at master 1.6 kB view raw
1{ 2 lib, 3 fetchurl, 4 buildPythonPackage, 5 flit-core, 6 pillow, 7 python, 8 pythonOlder, 9}: 10 11# Note: this package is used to build LLVM’s documentation, which is part of the Darwin stdenv. 12# It cannot use `fetchgit` because that would pull curl into the bootstrap, which is disallowed. 13 14let 15 self = buildPythonPackage rec { 16 pname = "docutils"; 17 version = "0.21.2"; 18 pyproject = true; 19 20 src = fetchurl { 21 url = "mirror://sourceforge/docutils/docutils-${version}.tar.gz"; 22 hash = "sha256-OmsYcy7fGC2qPNEndbuzOM9WkUaPke7rEJ3v9uv6mG8="; 23 }; 24 25 build-system = [ flit-core ]; 26 27 # infinite recursion via sphinx and pillow 28 doCheck = false; 29 passthru.tests.pytest = self.overridePythonAttrs { doCheck = true; }; 30 31 nativeCheckInputs = [ pillow ]; 32 33 checkPhase = '' 34 runHook preCheck 35 ${python.interpreter} test/alltests.py 36 runHook postCheck 37 ''; 38 39 # Create symlinks lacking a ".py" suffix, many programs depend on these names 40 postFixup = '' 41 for f in $out/bin/*.py; do 42 ln -s $(basename $f) $out/bin/$(basename $f .py) 43 done 44 ''; 45 46 pythonImportsCheck = [ "docutils" ]; 47 48 meta = { 49 description = "Python Documentation Utilities"; 50 homepage = "http://docutils.sourceforge.net/"; 51 changelog = "https://sourceforge.net/projects/docutils/files/docutils/${version}"; 52 license = with lib.licenses; [ 53 publicDomain 54 bsd2 55 psfl 56 gpl3Plus 57 ]; 58 maintainers = with lib.maintainers; [ jherland ]; 59 mainProgram = "docutils"; 60 }; 61 }; 62in 63self