1{ lib
2, fetchurl
3, meson
4, ninja
5, python3
6, gnome
7}:
8
9python3.pkgs.buildPythonApplication rec {
10 pname = "gi-docgen";
11 version = "2024.1";
12
13 format = "other";
14
15 src = fetchurl {
16 url = "mirror://gnome/sources/gi-docgen/${lib.versions.major version}/gi-docgen-${version}.tar.xz";
17 hash = "sha256-hwx3+WIEYszknjVUKkLcFhL8hYcz6D274kjFNUWK7B4=";
18 };
19
20 depsBuildBuild = [
21 python3
22 ];
23
24 nativeBuildInputs = [
25 meson
26 ninja
27 ];
28
29 pythonPath = with python3.pkgs; [
30 jinja2
31 markdown
32 markupsafe
33 packaging
34 pygments
35 toml # remove once python311 is the default
36 typogrify
37 ];
38
39 doCheck = false; # no tests
40
41 postFixup = ''
42 # Do not propagate Python
43 substituteInPlace $out/nix-support/propagated-build-inputs \
44 --replace "${python3}" ""
45 '';
46
47 passthru = {
48 updateScript = gnome.updateScript {
49 packageName = "gi-docgen";
50 };
51 };
52
53 meta = with lib; {
54 description = "Documentation generator for GObject-based libraries";
55 mainProgram = "gi-docgen";
56 homepage = "https://gitlab.gnome.org/GNOME/gi-docgen";
57 license = licenses.asl20; # OR GPL-3.0-or-later
58 maintainers = teams.gnome.members;
59 };
60}