docs: add urlmap to gi-docgen

This commit is contained in:
Aylur
2024-09-05 00:24:09 +02:00
parent 44e0b9e736
commit ee8ed80bf2
+19 -5
View File
@@ -16,8 +16,18 @@
mkdir -p $out/${outPath}
gi-docgen generate -C ${data} ${output}/share/gir-1.0/${name}-0.1.gir
cp -r ${name}-0.1/* $out/${outPath}
echo ${data} >> $out/data.txt
'';
urlMap = builtins.toJSON [
["GLib" "https://docs.gtk.org/glib/"]
["GObject" "https://docs.gtk.org/gobject/"]
["Gio" "https://docs.gtk.org/gio/"]
["Gdk" "https://docs.gtk.org/gdk4/"]
["Gtk" "https://docs.gtk.org/gtk4/"]
["GdkPixbuf" "https://docs.gtk.org/gdk-pixbuf/"]
];
genLib = name: namespace: description: {
authors ? "Aylur",
dependencies ? {},
@@ -31,15 +41,19 @@
library = {
inherit description authors;
license = "LGPL-2.1";
browse_url = "https://github.com/Aylur/Astal";
repository_url = "https://github.com/Aylur/Aylur.git";
browse_url = "https://github.com/aylur/astal";
repository_url = "https://github.com/aylur/aylur.git";
website_url = "https://aylur.github.io/astal";
dependencies = ["GObject-2.0"] ++ (builtins.attrNames dependencies);
};
dependencies = {
inherit (dependency) "GObject-2.0";
inherit dependencies;
extra = {
urlmap_file = pkgs.writeText "urlmap" ''
baseURLs = ${urlMap}
'';
};
dependencies = dependencies // dependency;
};
};