Stream: nix

Topic: Man pages with home-manager


view this post on Zulip Drew Jose (Jan 24 2024 at 11:07):

Got inspired to finally try out the flake life after yesterday's talk. Problem is, all manpages from other packages not installed by nix (like ld) are not available anymore. Is there a package for man pages, or a setting in home manager I can use?

view this post on Zulip Srid (Jan 24 2024 at 17:26):

man pages should generally be available if the package in question includes them.

Using https://github.com/juspay/nix-dev-home, I can see that both fd and ripgrep has them. Try:

$ man fd
$ man rg

image.png

view this post on Zulip Srid (Jan 24 2024 at 17:27):

Incidentally, there's a module for man in home-manager: programs.main: https://github.com/nix-community/home-manager/blob/master/modules/programs/man.nix

view this post on Zulip Srid (Jan 24 2024 at 17:32):

Oh I misunderstood your question. You mean for packages not installed by Nix. Do you have an example?

view this post on Zulip Srid (Jan 24 2024 at 17:33):

I can access ld's man page on macOS:

❯ man -d ld
-- Using pager: /usr/bin/less -s
-- Using manual sections: 1:8:2:3:3lua:n:4:5:6:7:9:l
-- Searching PATH for man directories
--   Adding /usr/local/share/man to manpath
--   Adding /usr/share/man to manpath
--   Adding /etc/profiles/per-user/srid/share/man to manpath
--   Adding /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX.sdk/usr/share/man to manpath
--   Adding /Applications/Xcode.app/Contents/Developer/usr/share/man to manpath
--   Adding /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/share/man to manpath
-- Adding default manpath entries
-- Parsing config file: /etc/man.conf
-- Using manual path: /usr/local/share/man:/usr/share/man:/etc/profiles/per-user/srid/share/man:/Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX.sdk/usr/share/man:/Applications/Xcode.app/Contents/Developer/usr/share/man:/Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/share/man
-- Using locale paths: en_CA.UTF-8:en.UTF-8:.
-- Using non-standard page width: 242
-- Searching for ld
--     Found manpage /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/share/man/man1/ld.1
--     Skipping catpage: non-standard page width
-- Command: cd /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/share/man && /usr/bin/zcat -f "/Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/share/man/man1/ld.1" | /usr/bin/mandoc -O width=242 | /usr/bin/less -s

view this post on Zulip Drew Jose (Jan 25 2024 at 04:34):

I get a large stderr output when invoking man -d ld:
out.txt

view this post on Zulip Srid (Jan 25 2024 at 04:35):

Out of curiosity, what's the output of nix run nixpkgs#nix-health?

view this post on Zulip Srid (Jan 25 2024 at 04:36):

Your output shows a lot of,

can't open directory /nix/store/rj8w6wj160k1sblhjp5fsgjbfz3si51w-home-manager-path/share/man/cat3.Z: No such file or directory

Which indicates that something's wrong


Last updated: Nov 15 2024 at 12:33 UTC