2024-05-13 21:24:10 +00:00
|
|
|
{ lib, fetchFromGitLab, meson, ninja, pkg-config, python3, docbook_xml_dtd_43
|
|
|
|
, docbook-xsl-nons, libxslt, gettext, withDblatex ? false, dblatex
|
2024-05-02 00:46:19 +00:00
|
|
|
# for passthru
|
|
|
|
# , gnome
|
|
|
|
}:
|
|
|
|
|
|
|
|
python3.pkgs.buildPythonApplication rec {
|
|
|
|
pname = "gtk-doc";
|
|
|
|
version = "1.33.2";
|
|
|
|
|
|
|
|
outputDevdoc = "out";
|
|
|
|
|
|
|
|
format = "other";
|
|
|
|
|
|
|
|
src = fetchFromGitLab {
|
|
|
|
domain = "gitlab.gnome.org";
|
|
|
|
owner = "GNOME";
|
|
|
|
repo = pname;
|
|
|
|
rev = version;
|
|
|
|
sha256 = "A6OXpazrJ05SUIO1ZPVN0xHTXOSov8UnPvUolZAv/Iw=";
|
|
|
|
};
|
|
|
|
|
2024-05-13 21:24:10 +00:00
|
|
|
patches = [ ./respect-xml-catalog-files-var.patch ];
|
2024-05-02 00:46:19 +00:00
|
|
|
|
|
|
|
postPatch = ''
|
|
|
|
substituteInPlace meson.build \
|
|
|
|
--replace "pkg-config" "$PKG_CONFIG"
|
|
|
|
'';
|
|
|
|
|
|
|
|
strictDeps = true;
|
|
|
|
|
2024-05-13 21:24:10 +00:00
|
|
|
depsBuildBuild = [ python3 pkg-config ];
|
2024-05-02 00:46:19 +00:00
|
|
|
|
|
|
|
nativeBuildInputs = [
|
|
|
|
pkg-config
|
|
|
|
gettext
|
|
|
|
meson
|
|
|
|
ninja
|
|
|
|
libxslt # for xsltproc
|
|
|
|
];
|
|
|
|
|
2024-05-13 21:24:10 +00:00
|
|
|
buildInputs = [ docbook_xml_dtd_43 docbook-xsl-nons libxslt ]
|
|
|
|
++ lib.optionals withDblatex [ dblatex ];
|
2024-05-02 00:46:19 +00:00
|
|
|
|
|
|
|
pythonPath = with python3.pkgs; [
|
|
|
|
pygments # Needed for https://gitlab.gnome.org/GNOME/gtk-doc/blob/GTK_DOC_1_32/meson.build#L42
|
|
|
|
lxml
|
|
|
|
];
|
|
|
|
|
2024-05-13 21:24:10 +00:00
|
|
|
mesonFlags = [ "-Dtests=false" "-Dyelp_manual=false" ];
|
2024-05-02 00:46:19 +00:00
|
|
|
|
|
|
|
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;
|
|
|
|
# updateScript = gnome.updateScript {
|
|
|
|
# packageName = pname;
|
|
|
|
# versionPolicy = "none";
|
|
|
|
# };
|
|
|
|
# };
|
|
|
|
|
|
|
|
meta = with lib; {
|
2024-05-13 21:24:10 +00:00
|
|
|
description =
|
|
|
|
"Tools to extract documentation embedded in GTK and GNOME source code";
|
2024-05-02 00:46:19 +00:00
|
|
|
homepage = "https://gitlab.gnome.org/GNOME/gtk-doc";
|
|
|
|
license = licenses.gpl2Plus;
|
|
|
|
maintainers = [ ];
|
|
|
|
};
|
|
|
|
}
|