From 96e5dce777a58991536de20a0decd504d185210d Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Robert=20Sch=C3=BCtz?= Date: Fri, 18 Aug 2023 21:07:39 -0700 Subject: [PATCH] buildNpmPackage: use installManPage --- pkgs/build-support/node/build-npm-package/hooks/default.nix | 5 ++++- .../node/build-npm-package/hooks/npm-install-hook.sh | 3 +-- 2 files changed, 5 insertions(+), 3 deletions(-) diff --git a/pkgs/build-support/node/build-npm-package/hooks/default.nix b/pkgs/build-support/node/build-npm-package/hooks/default.nix index c34709335ff7..3f2b0adf1668 100644 --- a/pkgs/build-support/node/build-npm-package/hooks/default.nix +++ b/pkgs/build-support/node/build-npm-package/hooks/default.nix @@ -27,7 +27,10 @@ npmInstallHook = makeSetupHook { name = "npm-install-hook"; - propagatedBuildInputs = [ buildPackages.makeWrapper ]; + propagatedBuildInputs = with buildPackages; [ + installShellFiles + makeWrapper + ]; substitutions = { hostNode = "${nodejs}/bin/node"; jq = "${buildPackages.jq}/bin/jq"; diff --git a/pkgs/build-support/node/build-npm-package/hooks/npm-install-hook.sh b/pkgs/build-support/node/build-npm-package/hooks/npm-install-hook.sh index efbe7fbffc19..64ddcbd567fc 100644 --- a/pkgs/build-support/node/build-npm-package/hooks/npm-install-hook.sh +++ b/pkgs/build-support/node/build-npm-package/hooks/npm-install-hook.sh @@ -25,8 +25,7 @@ npmInstallHook() { else "invalid type " + $typ | halt_error end' "${npmWorkspace-.}/package.json") while IFS= read -r man; do - mkdir -p "$out/share/man" - ln -s "$packageOut/$man" "$out/share/man" + installManPage "$packageOut/$man" done < <(@jq@ --raw-output '(.man | type) as $typ | if $typ == "string" then .man elif $typ == "list" then .man | join("\n") else "invalid type " + $typ | halt_error end' "${npmWorkspace-.}/package.json")