docsets.gtk: init

This commit is contained in:
2024-11-05 02:29:22 +00:00
parent 1a09d9abe9
commit 4be8a54866
2 changed files with 13 additions and 0 deletions

View File

@@ -60,6 +60,7 @@ in {
];
sane.programs.docsets.config.pkgs = with pkgs; [
# packages which ship docsets natively:
docsets.gtk
docsets.nix-builtins
docsets.nixpkgs-lib
docsets.rust-std

View File

@@ -0,0 +1,12 @@
{
rtfm,
runCommandLocal,
}:
# rtfm docset viewer actually ships Crystal and Gtk docsets (the latter of which includes several deps like Gdk, Pango, etc),
# so just extract those.
# N.B.: `rtfm` depends on `webkitgtk_6_0` -- costly! TODO: may be possible to set `buildTargets = [ "docsets" ]` to avoid the gui deps.
# TODO: rtfm's docsets don't include Info.plist: is that a problem?
runCommandLocal "gtk.docset" { } ''
mkdir -p $out/share/docsets
cp -R ${rtfm}/share/rtfm/docsets/Gtk.docset $out/share/docsets/gtk.docset
''