buildNpmPackage: use installManPage
This commit is contained in:
parent
d84e7a36ca
commit
96e5dce777
2 changed files with 5 additions and 3 deletions
|
@ -27,7 +27,10 @@
|
||||||
npmInstallHook = makeSetupHook
|
npmInstallHook = makeSetupHook
|
||||||
{
|
{
|
||||||
name = "npm-install-hook";
|
name = "npm-install-hook";
|
||||||
propagatedBuildInputs = [ buildPackages.makeWrapper ];
|
propagatedBuildInputs = with buildPackages; [
|
||||||
|
installShellFiles
|
||||||
|
makeWrapper
|
||||||
|
];
|
||||||
substitutions = {
|
substitutions = {
|
||||||
hostNode = "${nodejs}/bin/node";
|
hostNode = "${nodejs}/bin/node";
|
||||||
jq = "${buildPackages.jq}/bin/jq";
|
jq = "${buildPackages.jq}/bin/jq";
|
||||||
|
|
|
@ -25,8 +25,7 @@ npmInstallHook() {
|
||||||
else "invalid type " + $typ | halt_error end' "${npmWorkspace-.}/package.json")
|
else "invalid type " + $typ | halt_error end' "${npmWorkspace-.}/package.json")
|
||||||
|
|
||||||
while IFS= read -r man; do
|
while IFS= read -r man; do
|
||||||
mkdir -p "$out/share/man"
|
installManPage "$packageOut/$man"
|
||||||
ln -s "$packageOut/$man" "$out/share/man"
|
|
||||||
done < <(@jq@ --raw-output '(.man | type) as $typ | if $typ == "string" then .man
|
done < <(@jq@ --raw-output '(.man | type) as $typ | if $typ == "string" then .man
|
||||||
elif $typ == "list" then .man | join("\n")
|
elif $typ == "list" then .man | join("\n")
|
||||||
else "invalid type " + $typ | halt_error end' "${npmWorkspace-.}/package.json")
|
else "invalid type " + $typ | halt_error end' "${npmWorkspace-.}/package.json")
|
||||||
|
|
Loading…
Reference in a new issue