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

Man pages are not installed with Nix 2.26.1 #12382

Open
3 of 5 tasks
hja3 opened this issue Jan 30, 2025 · 4 comments
Open
3 of 5 tasks

Man pages are not installed with Nix 2.26.1 #12382

hja3 opened this issue Jan 30, 2025 · 4 comments

Comments

@hja3
Copy link

hja3 commented Jan 30, 2025

Platform

  • Linux: OpenMandriva
  • macOS
  • WSL

Additional information

Performed a multi-user installation the usual way (i.e. via https://nixos.org/download/), which completed without error. After installation, however, I discovered that the man pages for the nix- utilities are unavailable.

Output

Output
[user@laptop ~]$ nix-env --version
nix-env (Nix) 2.26.1
[user@laptop ~]$ nix-env --help
No manual entry for nix-env
[user@laptop ~]$ ls -al /nix/var/nix/profiles/default/share/
total 0
dr-xr-xr-x 1 user user 44 Jan  1  1970 .
dr-xr-xr-x 1 user user 42 Jan  1  1970 ..
dr-xr-xr-x 1 user user 22 Jan  1  1970 bash-completion
dr-xr-xr-x 1 user user 40 Jan  1  1970 fish
dr-xr-xr-x 1 user user 28 Jan  1  1970 zsh

As shown in the output above, the nix-env --help command fails and the man directory in the default profile is absent.

Checklist


Add 👍 to issues you find important.

@hja3 hja3 added the installer label Jan 30, 2025
@devatbosch
Copy link

Hi @hja3 ,

I would like to take a look on this issue, Could you please share, If there is something else I also need to take care while reproducing this issue at my end?

Meanwhile let me try...

@abathur
Copy link
Member

abathur commented Jan 30, 2025

What does echo $MANPATH report? Does it work if you run MANPATH= man nix?

@hja3
Copy link
Author

hja3 commented Jan 30, 2025

MANPATH is empty

[user@laptop ~]$ echo $MANPATH

The manpath command produces the following output

[user@laptop ~]$ manpath
/home/user/.nix-profile/share/man:/usr/local/share/man:/usr/share/man

Man pages for programs installed into my personal nix profile work as they should.

Trying out the command you suggest did not appear to work

[user@laptop ~]$ MANPATH= man nix
No manual entry for nix
[user@laptop ~]$ MANPATH=man nix
error: no subcommand specified
Try 'nix --help' for more information.

Switching over to root's profile, on 2.26.1 I get the following output

[root@laptop user]# nix-env --version
nix-env (Nix) 2.26.1
[root@laptop user]# manpath
/usr/share/man:/usr/local/share/man
[root@laptop user]# nix-env --help
No manual entry for nix-env

Switching profiles to a generation with nix 2.24.12 installed, results in the following

[root@laptop user]# nix-env --switch-generation 6
switching profile from version 1 to 6
[root@laptop user]# nix-env --version
nix-env (Nix) 2.24.12
[root@laptop user]# manpath
/root/.nix-profile/share/man:/nix/var/nix/profiles/default/share/man:/usr/share/man:/usr/local/share/man
[root@laptop user]# nix-env --help
nix‐env(1)                                 General Commands Manual                                 nix‐env(1)

Name
       nix‐env ‐ manipulate or query Nix user environments

Synopsis
       nix‐env  operation  [options]  [arguments…]  [‐‐option  name  value] [‐‐arg name value] [‐‐argstr name
       value] [{‐‐file | ‐f} path] [{‐‐profile | ‐p} path] [‐‐system‐filter system] [‐‐dry‐run]
...

Everying works as it should.

Finally, from my user account, on 2.24.12, I get the following output

[user@laptop ~]$ nix-env --version
nix-env (Nix) 2.24.12
[user@laptop ~]$ manpath
/home/user/.nix-profile/share/man:/nix/var/nix/profiles/default/share/man:/usr/local/share/man:/usr/share/man
[user@laptop ~]$ nix-env --help
nix‐env(1)                                 General Commands Manual                                 nix‐env(1)

Name
       nix‐env ‐ manipulate or query Nix user environments
...

It has properly configured both the user profile and default profile man paths, and everything works as it should.

As far as I can tell, the problem is that the man pages for 2.26.1 are simply absent.

@hja3
Copy link
Author

hja3 commented Jan 30, 2025

While man pages for nix- commands does not appear to be available on 2.26.1, documentation for the experimental nix command does seem to work. Both nix --help and nix env --help display the documentation pages they ought to, for example.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

3 participants