about summary refs log tree commit diff
path: root/pkgs/build-support
diff options
context:
space:
mode:
authorgithub-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>2023-08-19 06:01:31 +0000
committerGitHub <noreply@github.com>2023-08-19 06:01:31 +0000
commitc9e2cfa3f4b7d8fe3c10b9b69cefb4e0d1d2316b (patch)
tree4486185235f5cdfcd1b4b083e4418723cba42cb1 /pkgs/build-support
parente59aa3c2159df8cd1c45a5dfe6013312398b0fe9 (diff)
parent1e271fd42a992c51aedd3a802d26602de5e7a6df (diff)
Merge staging-next into staging
Diffstat (limited to 'pkgs/build-support')
-rw-r--r--pkgs/build-support/node/build-npm-package/hooks/npm-install-hook.sh7
1 files changed, 7 insertions, 0 deletions
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 b17fb552cc6b5..efbe7fbffc198 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
@@ -24,6 +24,13 @@ npmInstallHook() {
         elif $typ == "object" then .bin | to_entries | map(.key + " " + .value) | join("\n")
         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"
+    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")
+
     local -r nodeModulesPath="$packageOut/node_modules"
 
     if [ ! -d "$nodeModulesPath" ]; then