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