gtk-doc: clean up
* use buildPythonApplication instead of symlinking * but do not propagate Python * Add lxml & anytree for gtkdoc-mkhtml2
This commit is contained in:
parent
4522205507
commit
1c2019fe01
@ -2,9 +2,8 @@
|
|||||||
, fetchFromGitLab
|
, fetchFromGitLab
|
||||||
, meson
|
, meson
|
||||||
, ninja
|
, ninja
|
||||||
, pkgconfig
|
, pkg-config
|
||||||
, python3
|
, python3
|
||||||
, libxml2Python
|
|
||||||
, docbook_xml_dtd_43
|
, docbook_xml_dtd_43
|
||||||
, docbook_xsl
|
, docbook_xsl
|
||||||
, libxslt
|
, libxslt
|
||||||
@ -13,10 +12,12 @@
|
|||||||
, withDblatex ? false, dblatex
|
, withDblatex ? false, dblatex
|
||||||
}:
|
}:
|
||||||
|
|
||||||
stdenv.mkDerivation rec {
|
python3.pkgs.buildPythonApplication rec {
|
||||||
pname = "gtk-doc";
|
pname = "gtk-doc";
|
||||||
version = "1.32";
|
version = "1.32";
|
||||||
|
|
||||||
|
format = "other";
|
||||||
|
|
||||||
src = fetchFromGitLab {
|
src = fetchFromGitLab {
|
||||||
domain = "gitlab.gnome.org";
|
domain = "gitlab.gnome.org";
|
||||||
owner = "GNOME";
|
owner = "GNOME";
|
||||||
@ -32,37 +33,41 @@ stdenv.mkDerivation rec {
|
|||||||
outputDevdoc = "out";
|
outputDevdoc = "out";
|
||||||
|
|
||||||
nativeBuildInputs = [
|
nativeBuildInputs = [
|
||||||
|
pkg-config
|
||||||
gettext
|
gettext
|
||||||
meson
|
meson
|
||||||
ninja
|
ninja
|
||||||
|
libxslt # for xsltproc
|
||||||
];
|
];
|
||||||
|
|
||||||
buildInputs = [
|
buildInputs = [
|
||||||
docbook_xml_dtd_43
|
docbook_xml_dtd_43
|
||||||
docbook_xsl
|
docbook_xsl
|
||||||
libxslt
|
libxslt
|
||||||
pkgconfig
|
] ++ stdenv.lib.optionals withDblatex [
|
||||||
python3
|
dblatex
|
||||||
python3.pkgs.pygments # Needed for https://gitlab.gnome.org/GNOME/gtk-doc/blob/GTK_DOC_1_32/meson.build#L42
|
];
|
||||||
libxml2Python
|
|
||||||
]
|
pythonPath = with python3.pkgs; [
|
||||||
++ stdenv.lib.optional withDblatex dblatex
|
pygments # Needed for https://gitlab.gnome.org/GNOME/gtk-doc/blob/GTK_DOC_1_32/meson.build#L42
|
||||||
;
|
(anytree.override { withGraphviz = false; })
|
||||||
|
lxml
|
||||||
|
];
|
||||||
|
|
||||||
mesonFlags = [
|
mesonFlags = [
|
||||||
"-Dtests=false"
|
"-Dtests=false"
|
||||||
"-Dyelp_manual=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
|
doCheck = false; # requires a lot of stuff
|
||||||
doInstallCheck = false; # fails
|
doInstallCheck = false; # fails
|
||||||
|
|
||||||
|
postFixup = ''
|
||||||
|
# Do not propagate Python
|
||||||
|
substituteInPlace $out/nix-support/propagated-build-inputs \
|
||||||
|
--replace "${python3}" ""
|
||||||
|
'';
|
||||||
|
|
||||||
passthru = {
|
passthru = {
|
||||||
# Consumers are expected to copy the m4 files to their source tree, let them reuse the patch
|
# 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;
|
respect_xml_catalog_files_var_patch = ./respect-xml-catalog-files-var.patch;
|
||||||
|
Loading…
Reference in New Issue
Block a user