12 # Note: this package is used to build LLVM’s documentation, which is part of the Darwin stdenv.
13 # It cannot use `fetchgit` because that would pull curl into the bootstrap, which is disallowed.
16 self = buildPythonPackage rec {
21 disabled = pythonOlder "3.7";
23 src = fetchFromRepoOrCz {
25 rev = "docutils-${version}";
26 hash = "sha256-Q+9yW+BYUEvPYV504368JsAoKKoaTZTeKh4tVeiNv5Y=";
29 build-system = [ flit-core ];
31 # infinite recursion via sphinx and pillow
33 passthru.tests.pytest = self.overridePythonAttrs { doCheck = true; };
35 nativeCheckInputs = [ pillow ];
37 # Only Darwin needs LANG, but we could set it in general.
38 # It's done here conditionally to prevent mass-rebuilds.
40 lib.optionalString stdenv.hostPlatform.isDarwin ''LANG="en_US.UTF-8" LC_ALL="en_US.UTF-8" ''
42 ${python.interpreter} test/alltests.py
45 # Create symlinks lacking a ".py" suffix, many programs depend on these names
47 for f in $out/bin/*.py; do
48 ln -s $(basename $f) $out/bin/$(basename $f .py)
53 description = "Python Documentation Utilities";
54 homepage = "http://docutils.sourceforge.net/";
55 license = with licenses; [
61 maintainers = with maintainers; [ AndersonTorres ];