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

tmux (and possibly others): missing man-pages when installed via nix-shell #25483

Closed
steveej opened this issue May 3, 2017 · 17 comments
Closed
Labels
0.kind: regression Something that worked before working no longer

Comments

@steveej
Copy link
Contributor

steveej commented May 3, 2017

Issue description

I generally expect $out/share/man to contain the man-pages that come installed with the package, and often that is the case. So for nix-shell I wrote a snippet that concats the MANPATH accordingly. AFAIU this is similar to what NixOS does for profiles. The problem is that not every package seems to install manpages when installed with nix-shell.

Steps to reproduce

$ nix-shell -p tmux tree
these paths will be fetched (0.03 MiB download, 0.08 MiB unpacked):
  /nix/store/dzg9qyyamyl80y1ngyrm6fkjam7y7g1j-tree-1.7.0
fetching path ‘/nix/store/dzg9qyyamyl80y1ngyrm6fkjam7y7g1j-tree-1.7.0’...

*** Downloading ‘https://cache.nixos.org/nar/12qgijxvjqkk4y1fr7gc6znfm392akv23f1kbwgj7hjdgj9irmbq.nar.xz’ to ‘/nix/store/dzg9qyyamyl80y1ngyrm6fkjam7y7g1j-tree-1.7.0’...
  % Total    % Received % Xferd  Average Speed   Time    Time     Time  Current
                                 Dload  Upload   Total   Spent    Left  Speed
100 32256  100 32256    0     0  53562      0 --:--:-- --:--:-- --:--:-- 53581

[nix-shell:~]$ tree $(dirname $(which tmux))/.. 
/nix/store/idhifnqv5rsh105y4fpmbf8rk6rvp65c-tmux-2.3/bin/..
├── bin
│   └── tmux
└── share
    └── bash-completion
        └── completions
            └── tmux

4 directories, 2 files

Technical details

  • System: Debian 8 / NixOS 17.09pre106299.7f3b857d0d (Hummingbird)
  • Nix version: nix-env (Nix) 1.11.7
  • Nixpkgs version: 17.03pre102064.8fcd1a0
@danbst
Copy link
Contributor

danbst commented May 4, 2017

It's not a case for multiple output packages. See https://github.com/NixOS/nixpkgs/blob/master/pkgs/tools/misc/tmux/default.nix#L18
The man page resides in pkgs.tmux.man subattribute

@FRidh
Copy link
Member

FRidh commented May 8, 2017

As pointed out by @danbst they're in a separate attribute that you would have to include.
In a pure environment that would be

$ nix-shell -p tmux tmux.man man less --pure

@FRidh FRidh closed this as completed May 8, 2017
@steveej
Copy link
Contributor Author

steveej commented May 8, 2017

@FRidh what you suggest will not work, because MANPATH is not automatically set within nix-shells. I mentioned this briefly in the issue description but it is not part of the actual issue.

If you try it you'll see

$ nix-shell -p tmux tmux.man man less --pure

[nix-shell:~]$ man tmux
No manual entry for tmux

@danbst
Copy link
Contributor

danbst commented May 9, 2017

In that case I think this is legitimate issue. Setting man path isn't strict requirement when "building" a package, that explains why it doesn't work now.

@FRidh
Copy link
Member

FRidh commented May 9, 2017

Actually, I can't reproduce the error, but that seems to be due to an impurity. Even with

nix-shell -p tmux man less --pure

I get the man pages, so it somehow still seems to find the ones that I've installed.

@fpletz
Copy link
Member

fpletz commented May 10, 2017

@fpletz fpletz reopened this May 10, 2017
@fpletz fpletz added the 0.kind: regression Something that worked before working no longer label May 10, 2017
@veprbl
Copy link
Member

veprbl commented May 14, 2017

Could this be related to NixOS/nix#1379 ?

@stale

This comment has been minimized.

@stale stale bot added the 2.status: stale https://github.com/NixOS/nixpkgs/blob/master/.github/STALE-BOT.md label Jun 5, 2020
@steveej
Copy link
Contributor Author

steveej commented Jun 11, 2020

If you try it you'll see

$ nix-shell -p tmux tmux.man man less --pure

[nix-shell:~]$ man tmux
No manual entry for tmux

This is still reproducible for me today.

@stale stale bot removed the 2.status: stale https://github.com/NixOS/nixpkgs/blob/master/.github/STALE-BOT.md label Jun 11, 2020
@stale

This comment has been minimized.

@stale stale bot added the 2.status: stale https://github.com/NixOS/nixpkgs/blob/master/.github/STALE-BOT.md label Dec 9, 2020
@steveej
Copy link
Contributor Author

steveej commented Dec 9, 2020

This is still reproducible for me today.

Still true :-)

@stale stale bot removed the 2.status: stale https://github.com/NixOS/nixpkgs/blob/master/.github/STALE-BOT.md label Dec 9, 2020
@stale
Copy link

stale bot commented Jun 9, 2021

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

@stale stale bot added the 2.status: stale https://github.com/NixOS/nixpkgs/blob/master/.github/STALE-BOT.md label Jun 9, 2021
@steveej
Copy link
Contributor Author

steveej commented Jun 10, 2021

$ nix-shell -p tmux tmux.man man less --pure --run "man tmux"
No manual entry for tmux

@stale stale bot removed the 2.status: stale https://github.com/NixOS/nixpkgs/blob/master/.github/STALE-BOT.md label Jun 10, 2021
@Artturin
Copy link
Member

Artturin commented Jun 16, 2022

this is fixed in nix shell

$ man feh
No manual entry for feh
$ nix shell nixpkgs#feh --command man feh && echo worked
worked

May have been fixed by NixOS/nix#6426

we add man to outputsToInstall automatically in

outputsToInstall =
let
hasOutput = out: builtins.elem out outputs;
in [( lib.findFirst hasOutput null (["bin" "out"] ++ outputs) )]
++ lib.optional (hasOutput "man") "man";

nix-repl> feh.meta.outputsToInstall
[ "out" "man" ]

@KAction
Copy link
Contributor

KAction commented Jun 16, 2022

; nix shell 'nixpkgs#feh' --command man feh && echo worked
No manual entry for feh

@Artturin
Copy link
Member

what nix version?

@KAction
Copy link
Contributor

KAction commented Jun 16, 2022

; nix --version
nix (Nix) 2.9.1

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
0.kind: regression Something that worked before working no longer
Projects
None yet
Development

No branches or pull requests

7 participants