diff --git a/pkgs/development/python-modules/python-manilaclient/default.nix b/pkgs/development/python-modules/python-manilaclient/default.nix index 21f29efb28f3..a2da2e4f4a76 100644 --- a/pkgs/development/python-modules/python-manilaclient/default.nix +++ b/pkgs/development/python-modules/python-manilaclient/default.nix @@ -1,7 +1,9 @@ { lib , buildPythonApplication , fetchPypi +, installShellFiles , pbr +, openstackdocstheme , oslo-config , oslo-log , oslo-serialization @@ -9,6 +11,8 @@ , prettytable , requests , simplejson +, sphinx +, sphinxcontrib-programoutput , Babel , osc-lib , python-keystoneclient @@ -25,6 +29,13 @@ buildPythonApplication rec { sha256 = "sha256-6iAed0mtEYHguYq4Rlh4YWT8E5hNqBYPcnG9/8RMspo="; }; + nativeBuildInputs = [ + installShellFiles + openstackdocstheme + sphinx + sphinxcontrib-programoutput + ]; + propagatedBuildInputs = [ pbr oslo-config @@ -40,6 +51,12 @@ buildPythonApplication rec { debtcollector ]; + postInstall = '' + export PATH=$out/bin:$PATH + sphinx-build -a -E -d doc/build/doctrees -b man doc/source doc/build/man + installManPage doc/build/man/python-manilaclient.1 + ''; + # Checks moved to 'passthru.tests' to workaround infinite recursion doCheck = false; diff --git a/pkgs/development/python-modules/sphinxcontrib-programoutput/default.nix b/pkgs/development/python-modules/sphinxcontrib-programoutput/default.nix new file mode 100644 index 000000000000..676f72c3f14b --- /dev/null +++ b/pkgs/development/python-modules/sphinxcontrib-programoutput/default.nix @@ -0,0 +1,32 @@ +{ lib +, buildPythonPackage +, fetchPypi +, sphinx +, sphinxcontrib-serializinghtml +}: + +buildPythonPackage rec { + pname = "sphinxcontrib-programoutput"; + version = "0.17"; + + src = fetchPypi { + inherit pname version; + sha256 = "sha256-MA7puMrug1XSXMdLTRx+/RLmCNKtFl4xQdMeb7wVK38="; + }; + + buildInputs = [ + sphinx + ]; + + # fails to import sphinxcontrib.serializinghtml + doCheck = false; + + pythonImportsCheck = [ "sphinxcontrib.programoutput" ]; + + meta = with lib; { + description = "Sphinx extension to include program output"; + homepage = "https://github.com/NextThought/sphinxcontrib-programoutput"; + license = licenses.bsd2; + maintainers = with maintainers; [ SuperSandro2000 ]; + }; +} diff --git a/pkgs/top-level/python-packages.nix b/pkgs/top-level/python-packages.nix index 48a406b15909..4eefbe1efd13 100644 --- a/pkgs/top-level/python-packages.nix +++ b/pkgs/top-level/python-packages.nix @@ -9358,6 +9358,8 @@ in { inherit (pkgs) plantuml; }; + sphinxcontrib-programoutput = callPackage ../development/python-modules/sphinxcontrib-programoutput { }; + sphinxcontrib-qthelp = callPackage ../development/python-modules/sphinxcontrib-qthelp { }; sphinxcontrib-serializinghtml = callPackage ../development/python-modules/sphinxcontrib-serializinghtml { };