diff options
Diffstat (limited to 'nixpkgs/pkgs/build-support/node/import-npm-lock/hooks/default.nix')
-rw-r--r-- | nixpkgs/pkgs/build-support/node/import-npm-lock/hooks/default.nix | 13 |
1 files changed, 13 insertions, 0 deletions
diff --git a/nixpkgs/pkgs/build-support/node/import-npm-lock/hooks/default.nix b/nixpkgs/pkgs/build-support/node/import-npm-lock/hooks/default.nix new file mode 100644 index 000000000000..5990371def91 --- /dev/null +++ b/nixpkgs/pkgs/build-support/node/import-npm-lock/hooks/default.nix @@ -0,0 +1,13 @@ +{ callPackage, lib, makeSetupHook, srcOnly, nodejs }: +{ + npmConfigHook = makeSetupHook + { + name = "npm-config-hook"; + substitutions = { + nodeSrc = srcOnly nodejs; + nodeGyp = "${nodejs}/lib/node_modules/npm/node_modules/node-gyp/bin/node-gyp.js"; + canonicalizeSymlinksScript = ./canonicalize-symlinks.js; + storePrefix = builtins.storeDir; + }; + } ./npm-config-hook.sh; +} |