2021-02-05 17:12:51 +00:00
|
|
|
{ lib
|
2020-04-24 23:36:52 +00:00
|
|
|
, fetchFromGitLab
|
|
|
|
, meson
|
|
|
|
, ninja
|
|
|
|
, pkg-config
|
|
|
|
, python3
|
|
|
|
, docbook_xml_dtd_43
|
2021-03-09 03:18:52 +00:00
|
|
|
, docbook-xsl-nons
|
2020-04-24 23:36:52 +00:00
|
|
|
, libxslt
|
|
|
|
, gettext
|
2021-05-20 23:08:51 +00:00
|
|
|
, gnome
|
2020-04-24 23:36:52 +00:00
|
|
|
, withDblatex ? false, dblatex
|
|
|
|
}:
|
|
|
|
|
|
|
|
python3.pkgs.buildPythonApplication rec {
|
|
|
|
pname = "gtk-doc";
|
2021-03-09 03:18:52 +00:00
|
|
|
version = "1.33.2";
|
|
|
|
|
|
|
|
outputDevdoc = "out";
|
2020-04-24 23:36:52 +00:00
|
|
|
|
|
|
|
format = "other";
|
|
|
|
|
|
|
|
src = fetchFromGitLab {
|
|
|
|
domain = "gitlab.gnome.org";
|
|
|
|
owner = "GNOME";
|
|
|
|
repo = pname;
|
2020-11-12 09:05:59 +00:00
|
|
|
rev = version;
|
2021-03-09 03:18:52 +00:00
|
|
|
sha256 = "A6OXpazrJ05SUIO1ZPVN0xHTXOSov8UnPvUolZAv/Iw=";
|
2020-04-24 23:36:52 +00:00
|
|
|
};
|
|
|
|
|
|
|
|
patches = [
|
|
|
|
passthru.respect_xml_catalog_files_var_patch
|
|
|
|
];
|
|
|
|
|
2021-05-20 23:08:51 +00:00
|
|
|
strictDeps = true;
|
|
|
|
|
|
|
|
depsBuildBuild = [
|
|
|
|
python3
|
|
|
|
pkg-config
|
|
|
|
];
|
|
|
|
|
2020-04-24 23:36:52 +00:00
|
|
|
nativeBuildInputs = [
|
|
|
|
pkg-config
|
|
|
|
gettext
|
|
|
|
meson
|
|
|
|
ninja
|
|
|
|
libxslt # for xsltproc
|
|
|
|
];
|
|
|
|
|
|
|
|
buildInputs = [
|
|
|
|
docbook_xml_dtd_43
|
2021-03-09 03:18:52 +00:00
|
|
|
docbook-xsl-nons
|
2020-04-24 23:36:52 +00:00
|
|
|
libxslt
|
2021-02-05 17:12:51 +00:00
|
|
|
] ++ lib.optionals withDblatex [
|
2020-04-24 23:36:52 +00:00
|
|
|
dblatex
|
|
|
|
];
|
|
|
|
|
|
|
|
pythonPath = with python3.pkgs; [
|
|
|
|
pygments # Needed for https://gitlab.gnome.org/GNOME/gtk-doc/blob/GTK_DOC_1_32/meson.build#L42
|
|
|
|
lxml
|
|
|
|
];
|
|
|
|
|
|
|
|
mesonFlags = [
|
|
|
|
"-Dtests=false"
|
|
|
|
"-Dyelp_manual=false"
|
|
|
|
];
|
|
|
|
|
|
|
|
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;
|
2021-05-20 23:08:51 +00:00
|
|
|
updateScript = gnome.updateScript {
|
2020-04-24 23:36:52 +00:00
|
|
|
packageName = pname;
|
|
|
|
versionPolicy = "none";
|
|
|
|
};
|
|
|
|
};
|
|
|
|
|
2021-02-05 17:12:51 +00:00
|
|
|
meta = with lib; {
|
2020-04-24 23:36:52 +00:00
|
|
|
description = "Tools to extract documentation embedded in GTK and GNOME source code";
|
2021-03-09 03:18:52 +00:00
|
|
|
homepage = "https://gitlab.gnome.org/GNOME/gtk-doc";
|
|
|
|
license = licenses.gpl2Plus;
|
|
|
|
maintainers = teams.gnome.members ++ (with maintainers; [ pSub ]);
|
2020-04-24 23:36:52 +00:00
|
|
|
};
|
|
|
|
}
|