Skip to content
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

Saner defaults for MANPATH #2565

Closed
wants to merge 1 commit into from
Closed

Saner defaults for MANPATH #2565

wants to merge 1 commit into from

Conversation

jvassev
Copy link

@jvassev jvassev commented Dec 6, 2018

Very few systems explicitly define the manpath. When installing on
arbitrary linux, the nix-installed manapages are not discovered. To do
so always add NIX_LINK, then /usr/share/man if it exists.

@vcunat
Copy link
Member

vcunat commented Dec 7, 2018

I can't see how /usr/share/man is relevant to nix-installed man pages.

@edolstra
Copy link
Member

edolstra commented Dec 7, 2018

The problem with setting MANPATH is that it overrides man's default search path, which might include more entries than /usr/share/man (e.g. /usr/local/share/man).

@vcunat
Copy link
Member

vcunat commented Dec 7, 2018

Hmm, I see the problem (or one at least). The behavior of man searching "relative" to $PATH still isn't common, I guess? For example, with the default man from nixpkgs we don't need any $MANPATH at all and it just works thanks to $PATH.

@jvassev
Copy link
Author

jvassev commented Dec 7, 2018

This is how I got here:

  1. install nix on centos using the documented way to do so
  2. nix-env -i tree
  3. man tree
  4. "No manual entry for tree"

If I just define MANPATH then tree's man page is found.

Also it makes sense to include /usr/local/share/man in the default case as well.

Very few systems explicitly define the manpath. When installing on
arbitrary linux, the nix-installed manapages are not discovered. To do
so always add NIX_LINK, then /usr/share/man if it exists.
@jvassev
Copy link
Author

jvassev commented Dec 7, 2018

@vcunat

Yes, the man on centos is version 1.6f. If I install man from nixpkgs I get version 1.6g which finds all man pages.

@vcunat
Copy link
Member

vcunat commented Dec 9, 2018

Right, that seems the best work-around to me. We might still improve compatibility with legacy man versions, but honestly I don't feel like putting energy into that.

@stale
Copy link

stale bot commented Feb 13, 2021

I marked this as stale due to inactivity. → More info

@stale stale bot added the stale label Feb 13, 2021
@stale
Copy link

stale bot commented Apr 16, 2022

I closed this issue due to inactivity. → More info

@stale stale bot closed this Apr 16, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants