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

nodejs: Install npm manpages #56226

Merged
merged 1 commit into from Mar 15, 2019

Conversation

marsam
Copy link
Contributor

@marsam marsam commented Feb 23, 2019

Motivation for this change
Things done
  • Tested using sandboxing (nix.useSandbox on NixOS, or option sandbox in nix.conf on non-NixOS)
  • Built on platform(s)
    • NixOS
    • macOS
    • other Linux distributions
  • Tested via one or more NixOS test(s) if existing and applicable for the change (look inside nixos/tests)
  • Tested compilation of all pkgs that depend on this change using nix-shell -p nox --run "nox-review wip"
  • Tested execution of all binary files (usually in ./result/bin/)
  • Determined the impact on package closure size (by running nix path-info -S before and after)
  • Assured whether relevant documentation is up to date
  • Fits CONTRIBUTING.md.

@@ -97,6 +97,12 @@ in
${optionalString enableNpm ''
mkdir -p $out/share/bash-completion/completions/
$out/bin/npm completion > $out/share/bash-completion/completions/npm
for dir in "$out/lib/node_modules/npm/man/"*; do
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

You might be able to just do mkdir -p $out/share/ && ln -s $out/lib/node_modules/npm/man $out/share/man

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

unfortunately is not going to work, because node ships node(1) manpage

$ exa -T result/share/man
result/share/man
└── man1
   └── node.1.gz

and with this PR I want to add the npm remaining manpages from npm

$ exa -T result/share/man
result/share/man
├── man1
│  ├── node.1.gz
│  ├── npm-access.1 -> ../../../lib/node_modules/npm/man/man1/npm-access.1
|  ⋮
│  ├── npm.1 -> ../../../lib/node_modules/npm/man/man1/npm.1
│  └── npx.1 -> ../../../lib/node_modules/npm/man/man1/npx.1
├── man5
│  ├── npm-folders.5 -> ../../../lib/node_modules/npm/man/man5/npm-folders.5
|  ⋮
│  └── package.json.5 -> ../../../lib/node_modules/npm/man/man5/package.json.5
└── man7
   ├── npm-coding-style.7 -> ../../../lib/node_modules/npm/man/man7/npm-coding-style.7
   ⋮
   ├── removing-npm.7 -> ../../../lib/node_modules/npm/man/man7/removing-npm.7
   └── semver.7 -> ../../../lib/node_modules/npm/man/man7/semver.7

@matthewbauer matthewbauer merged commit d3dd087 into NixOS:master Mar 15, 2019
@marsam marsam deleted the nodejs-install-npm-manpages branch March 15, 2019 19:40
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants