Devhelp: documentation books or useless?

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).


  • How can I add e.g. the GTK+ documentation to devhelp?
  • Or is devhelp just useless on NixOS?

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 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.

1 Like

Hmm, I’ve set, added gtk3 to environment.systemPackages, and then run nixos-rebuild switch.
But still devhelp does not find anyhting.

Any ideas?

Yeah, GTK is one of the packages that we are not building docs for at the moment:

Since we build it even for GLib

there is no excuse. Opened a pull request adding them:

2 Likes fixes the blank page issue.