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: Make it findable by manpages #99051

Merged
merged 1 commit into from Oct 1, 2020
Merged

Conversation

@Infinisil
Copy link
Member

@Infinisil Infinisil commented Sep 29, 2020

Motivation for this change

Previously nix-shell -p man-pages wouldn't work, because man by
default looks up man pages only for the packages that appear in PATH.
Since man-pages didn't have anything in $out/bin though, it wouldn't be
put on PATH.

This fixes that by just creating an empty $out/bin

Things done
  • Tested with nix-shell -p manpages -I nixpkgs=$PWD --run 'man getchar'
Previously `nix-shell -p man-pages` wouldn't work, because `man` by
default looks up man pages only for the packages that appear in PATH.
Since man-pages didn't have anything in $out/bin though, it wouldn't be
put on PATH.

This fixes that by just creating an empty $out/bin
@Infinisil Infinisil changed the title man-pages: Make it findable by manpages man-pages: Make it findable by man Sep 29, 2020
@Infinisil Infinisil changed the title man-pages: Make it findable by man man-pages: Make it findable by manpages Sep 29, 2020
@Infinisil Infinisil merged commit 5ce1f9d into NixOS:master Oct 1, 2020
19 of 20 checks passed
19 of 20 checks passed
@github-actions[bot]
tests tests
Details
@github-actions[bot]
action
Details
@ofborg[bot]
man-pages, man-pages.passthru.tests on x86_64-darwin
Details
@ofborg[bot]
man-pages, man-pages.passthru.tests on aarch64-linux No attempt
Details
@ofborg[bot]
Evaluation Performance Report Evaluator Performance Report
Details
@github-actions[bot]
Wait for ofborg
Details
@ofborg[bot]
grahamcofborg-eval ^.^!
Details
@ofborg[bot]
grahamcofborg-eval-check-maintainers matching changed paths to changed attrs...
Details
@ofborg[bot]
grahamcofborg-eval-check-meta config.nix: checkMeta = true
Details
@ofborg[bot]
grahamcofborg-eval-darwin nix-instantiate --arg nixpkgs { outPath=./.; revCount=999999; shortRev="75d24ef"; rev="75d24ef5e7148918f9df38042982f67446ee37a8"; } ./pkgs/t
Details
@ofborg[bot]
grahamcofborg-eval-lib-tests nix-build --arg pkgs import ./. {} ./lib/tests/release.nix
Details
@ofborg[bot]
grahamcofborg-eval-nixos nix-instantiate --arg nixpkgs { outPath=./.; revCount=999999; shortRev="75d24ef"; rev="75d24ef5e7148918f9df38042982f67446ee37a8"; } ./nixos/
Details
@ofborg[bot]
grahamcofborg-eval-nixos-manual nix-instantiate --arg nixpkgs { outPath=./.; revCount=999999; shortRev="75d24ef"; rev="75d24ef5e7148918f9df38042982f67446ee37a8"; } ./nixos/
Details
@ofborg[bot]
grahamcofborg-eval-nixos-options nix-instantiate --arg nixpkgs { outPath=./.; revCount=999999; shortRev="75d24ef"; rev="75d24ef5e7148918f9df38042982f67446ee37a8"; } ./nixos/
Details
@ofborg[bot]
grahamcofborg-eval-nixpkgs-manual nix-instantiate --arg nixpkgs { outPath=./.; revCount=999999; shortRev="75d24ef"; rev="75d24ef5e7148918f9df38042982f67446ee37a8"; } ./pkgs/t
Details
@ofborg[bot]
grahamcofborg-eval-nixpkgs-tarball nix-instantiate --arg nixpkgs { outPath=./.; revCount=999999; shortRev="75d24ef"; rev="75d24ef5e7148918f9df38042982f67446ee37a8"; } ./pkgs/t
Details
@ofborg[bot]
grahamcofborg-eval-nixpkgs-unstable-jobset nix-instantiate --arg nixpkgs { outPath=./.; revCount=999999; shortRev="75d24ef"; rev="75d24ef5e7148918f9df38042982f67446ee37a8"; } ./pkgs/t
Details
@ofborg[bot]
grahamcofborg-eval-package-list nix-env -qa --json --file .
Details
@ofborg[bot]
grahamcofborg-eval-package-list-no-aliases nix-env -qa --json --file . --arg config { allowAliases = false; }
Details
@ofborg[bot]
man-pages, man-pages.passthru.tests on x86_64-linux Success
Details
@Infinisil Infinisil deleted the man-pages-bin branch Oct 1, 2020
@Infinisil
Copy link
Member Author

@Infinisil Infinisil commented Oct 1, 2020

Backported to 20.09 in 9d69eb7

@worldofpeace
Copy link
Contributor

@worldofpeace worldofpeace commented Oct 1, 2020

Thanks for fixing this 👍

@jeff-hykin
Copy link

@jeff-hykin jeff-hykin commented Nov 10, 2020

I think this might still be an issue on Mac OS (should I open up an issue?)
Screen Shot 2020-11-10 at 11 35 24 AM

Screen Shot 2020-11-10 at 11 37 47 AM

Same result using man-pages instead

@Infinisil
Copy link
Member Author

@Infinisil Infinisil commented Nov 10, 2020

@jeff-hykin This packages doesn't provide the man binary, it provides man pages for many C development things. This PR makes e.g. this work:

$ nix-shell -p manpages man less -I nixpkgs=$PWD --pure --run 'man puts'

@jeff-hykin
Copy link

@jeff-hykin jeff-hykin commented Nov 10, 2020

Thanks @Infinisil 👍

@jeff-hykin
Copy link

@jeff-hykin jeff-hykin commented Nov 10, 2020

Screen Shot 2020-11-10 at 3 07 42 PM

(^ This is why I didn't use man, but ... your example still works so I guess the package just didn't set a name)

Screen Shot 2020-11-10 at 3 09 33 PM

@Infinisil
Copy link
Member Author

@Infinisil Infinisil commented Nov 10, 2020

Ah, man is an alias to man-db, so searching for man-db should find it

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

Successfully merging this pull request may close these issues.

None yet

3 participants