6 , gobject-introspection
7 , desktopToDarwinBundle
16 gtk4' = gtk4.override { x11Support = true; };
17 pango' = pango.override { withIntrospection = true; };
19 crystal.buildCrystalPackage rec {
23 src = fetchFromGitHub {
28 hash = "sha256-cloaGlHjtwrjuPGzAG55B58w307R+TO+MixAWTw2ags=";
32 # 1) fixed gi-crystal binding generator command
33 # 2) fixed docset generator command
34 # 3) added commands to build gschemas and update icon-cache
39 # added chmod +w for copied docs to prevent error:
40 # `Error opening file with mode 'wb': '.../style.css': Permission denied`
41 ./enable-write-permissions.patch
45 substituteInPlace src/doc2dash/create_gtk_docset.cr \
46 --replace-fail 'basedir = Path.new("/usr/share/doc")' 'basedir = Path.new(ARGV[0]? || "gtk-docs")'
49 shardsFile = ./shards.nix;
55 ] ++ lib.optionals stdenv.isDarwin [ desktopToDarwinBundle ];
65 buildTargets = [ "configure" "rtfm" "docsets" ];
70 for file in "${gtk4'.devdoc}"/share/doc/*; do
71 ln -s "$file" "gtk-doc/$(basename "$file")"
74 for file in "${pango'.devdoc}"/share/doc/*; do
75 ln -s "$file" "gtk-doc/$(basename "$file")"
78 for file in "${libadwaita.devdoc}"/share/doc/*; do
79 ln -s "$file" "gtk-doc/$(basename "$file")"
84 description = "Dash/docset reader with built in documentation for Crystal and GTK APIs";
85 homepage = "https://github.com/hugopl/rtfm/";
86 license = licenses.mit;
88 maintainers = with maintainers; [ sund3RRR ];