NixOS/Nixpkgs includes the package devhelp, which is usually used as documentation-browser for GTK+ and other libraries. But devhelp does not find any documentation, and it seems that NixOS/Nixpkgs does not contain any documentation files (or: seems to remove it by default: NixOS - Nixpkgs 21.05 manual).
So:
How can I add e.g. the GTK+ documentation to devhelp?
Hi, I commonly use Devhelp to browse documentation.
When a package builds Devhelp books or gtk-doc docs, they are moved to devdoc output of a package by multiple outputs hook. If the output does not exists, they are removed. Unfortunately some packages still lack that output, or do not build the books at all.
If you enable documentation.dev.enable in your configuration.nix and install packages that have devdoc output to your system profile, Devhelp will be able to find them.
You can also run it without installing the libraries system-wide, which I prefer, using something like env XDG_DATA_DIRS=$(nix-build -A networkmanager.devdoc --no-link)/share devhelp but it is a PITA.
We should add a setup hook, that will set the environment variable appropriately when in a nix-shell.
Hmm, I’ve set documentation.dev.enable=true, added gtk3 to environment.systemPackages, and then run nixos-rebuild switch.
But still devhelp does not find anyhting.