New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
nix-daemon.sh: Export MANPATH #1782
Conversation
I like trying to get this to work out-of-the-box but this might open up a can of worms. There's lots of environment variables like this but I don't think we want to update Nix for all of them (INFOPATH, DICPATH, etc.) I have a custom way to set this that works pretty well but involves using I think a more Nix-compatible approach might be possible if we made "man" look for man pages in |
Do you have a suggestion on how to achieve this? I'm fine with either updating or dropping this PR if there's a better way. |
I.e. iterate over $NIX_PROFILES. (Reminds me, single user Nix doesn't setup $NIX_PROFILES.) |
We just got rid of |
On Linux at least, we could just set Unfortunately this isn't true (apparently) on BSD or OSX, and so perhaps is not something we can use. Two ideas:
Finally, man by default actually searches PATH and looks for pages nearby. I think this is fairly standard. Unfortunately it only looks in "./man" and "../man" (and man1, etc) -- which is a bummer since we store man pages in /share/man ("../share/man" relative to PATH entries). I had the silly idea of just adding /share/bin to PATH but apparently man only searches around if the path exists, how reasonable of it. Creating a dummy set of directories like: /dummy/bin And then PATH=/dummy/bin:$PATH man Does the trick. It's a kludge for sure, though :). |
Oh, I see much of this was discussed in the linked issue. I suppose we might as well append to it if already set. @FRidh: what did you have in mind re:derivations? A "append-to-manpath" package you install? |
@dtzWill Basically a wrapper around |
|
Thank you for all the replies. From what I gathered, the preferred solution for this is a bit outside of my knowledge right now (I don't even understand much yet about what a derivation is, just trying out Nix for a short moment), and I don't think I have the time to invest on this. For now I can just work around this by manually appending the MANPATH directly to my shell config files. @FRidh if you deem that this PR is not the way to go then feel free to close this! I really appreciate the input. |
@bobbypriambodo I am not a maintainer of this repo, just a contributor, and what I gave is just my view on the matter ;) I think this is best discussed further in NixOS/nixpkgs#23601. |
I marked this as stale due to inactivity. → More info |
I closed this issue due to inactivity. → More info |
As Darwin installation defaults to multi-user,
nix-daemon.sh
is sourced instead ofnix.sh
. However MANPATHs are not exported, causing not-found failures when invokingnix-env --help
(or othernix-*
commands) andman <cmd>
where<cmd>
is any program installed via nix. Related issue here.Suggestions welcome as I am currently just starting out with nix :)