I can’t seem to install the manpages related to pthread_cond_* (example) on NixOS 19.09. I have manpages and posix_man_pages listed in my environment.systemPackages, and have the options documentation = { dev.enable = true; doc.enable = true; }; all set in my configuration.nix. I also tried updating mandb manually to no avail. Any ideas on how I can install these man pages?
The documentation options are all set to true. I’m trying this as normal user. I also get the expected behavior for other tools, e.g.:
% nix-shell -p pv
% manpath
[...]:/nix/store/p0swm9ajh7j1bblbzm2gzd14j7wvbfv5-pv-1.6.6/share/man:[...]:/run/current-system/sw/share/man:/nix/var/nix/profiles/default/share/man
% man pv
[ works ]
GCC or clang both don’t work:
% nix-shell -p gcc clang
% manpath
/nix/store/hdybipp5dymakgkp14z7gnp5da23n0zf-patchelf-0.9/share/man:/nix/store/9aqz6pkigya6idg8r7wrvbxwlay30bs0-clang-7.1.0/share/man:/nix/store/w9l2nmg6pclz944f33zg17bpgvq27f4f-findutils-4.7.0/share/man:/nix/store/48jg7qxx2i3ndgr1b67imy6qr2nvsfjx-diffutils-3.7/share/man:/nix/store/5gqv9dn7yih5hsz5by9mxhf2384zjsza-gnused-4.8/share/man:/nix/store/rdl0mdfawd3gyv45nml3n6iw134d2g8h-gnugrep-3.4/share/man:/nix/store/c98k0shcp2yp69g81mqhbqw3xbxvnk0r-gnutar-1.32/share/man:/nix/store/smccfl7q9cz2ilzds5rg6f02l41s647p-patch-2.7.6/share/man:/run/current-system/sw/share/man:/nix/var/nix/profiles/default/share/man
% man gcc
No manual entry for gcc
% man clang
No manual entry for clang
I think the issue with gcc is that the man page is in separate output which nix-shell does not add to the environment. pv seems to have only single output that also includes the man page.
The clang man page is in the clang-manpages package, no idea why. Passing it to nix-shell -p does not add it to the environment though, also no idea why.
You can make these pages accessible by putting gcc or clang-manpages in your environment.systemPackages or installing them with nix-env which installs all outputs:
By default all outputs are installed for each derivation. That can be reduced by setting meta.outputsToInstall.