diff options
author | Jan Tojnar <jtojnar@gmail.com> | 2019-12-14 17:37:26 +0100 |
---|---|---|
committer | Jan Tojnar <jtojnar@gmail.com> | 2019-12-15 01:50:35 +0100 |
commit | 1c2019fe01f9588847a680a7f9a2a9f4dd37ce60 (patch) | |
tree | 905edc360583cbd60def919ff36360849a24d629 | |
parent | 4522205507f7d259b39eec24463a0d2f8b91d139 (diff) |
gtk-doc: clean up
* use buildPythonApplication instead of symlinking
* but do not propagate Python
* Add lxml & anytree for gtkdoc-mkhtml2
-rw-r--r-- | pkgs/development/tools/documentation/gtk-doc/default.nix | 37 |
1 files changed, 21 insertions, 16 deletions
diff --git a/pkgs/development/tools/documentation/gtk-doc/default.nix b/pkgs/development/tools/documentation/gtk-doc/default.nix index 35d718ecd67b..3c0b0cff548f 100644 --- a/pkgs/development/tools/documentation/gtk-doc/default.nix +++ b/pkgs/development/tools/documentation/gtk-doc/default.nix @@ -2,9 +2,8 @@ , fetchFromGitLab , meson , ninja -, pkgconfig +, pkg-config , python3 -, libxml2Python , docbook_xml_dtd_43 , docbook_xsl , libxslt @@ -13,10 +12,12 @@ , withDblatex ? false, dblatex }: -stdenv.mkDerivation rec { +python3.pkgs.buildPythonApplication rec { pname = "gtk-doc"; version = "1.32"; + format = "other"; + src = fetchFromGitLab { domain = "gitlab.gnome.org"; owner = "GNOME"; @@ -32,37 +33,41 @@ stdenv.mkDerivation rec { outputDevdoc = "out"; nativeBuildInputs = [ + pkg-config gettext meson ninja + libxslt # for xsltproc ]; buildInputs = [ docbook_xml_dtd_43 docbook_xsl libxslt - pkgconfig - python3 - python3.pkgs.pygments # Needed for https://gitlab.gnome.org/GNOME/gtk-doc/blob/GTK_DOC_1_32/meson.build#L42 - libxml2Python - ] - ++ stdenv.lib.optional withDblatex dblatex - ; + ] ++ stdenv.lib.optionals withDblatex [ + dblatex + ]; + + pythonPath = with python3.pkgs; [ + pygments # Needed for https://gitlab.gnome.org/GNOME/gtk-doc/blob/GTK_DOC_1_32/meson.build#L42 + (anytree.override { withGraphviz = false; }) + lxml + ]; mesonFlags = [ "-Dtests=false" "-Dyelp_manual=false" ]; - # Make pygments available for binaries, python.withPackages creates a wrapper - # but scripts are not allowed in shebangs so we link it into sys.path. - postInstall = '' - ln -s ${python3.pkgs.pygments}/${python3.sitePackages}/* $out/share/gtk-doc/python/ - ''; - doCheck = false; # requires a lot of stuff doInstallCheck = false; # fails + postFixup = '' + # Do not propagate Python + substituteInPlace $out/nix-support/propagated-build-inputs \ + --replace "${python3}" "" + ''; + passthru = { # Consumers are expected to copy the m4 files to their source tree, let them reuse the patch respect_xml_catalog_files_var_patch = ./respect-xml-catalog-files-var.patch; |