nodePackages.node-gyp: local nodejs header files

From within the sandbox, it couldn't be possible to do HTTP requests so we need
to make `node-gyp` aware of local `nodejs` and use header files out of it
instead of attempt to download it and fail.
launchpad/nixpkgs/master
olebedev 3 years ago committed by olebedev
parent 2457ddc952
commit 98b9a7fdea
No known key found for this signature in database
GPG Key ID: 548A423AE8849EE8
  1. 10
      pkgs/development/node-packages/default.nix

@ -198,6 +198,16 @@ let
'';
};
node-gyp = super.node-gyp.override {
nativeBuildInputs = [ pkgs.makeWrapper ];
# Teach node-gyp to use nodejs headers locally rather that download them form https://nodejs.org.
# This is important when build nodejs packages in sandbox.
postInstall = ''
wrapProgram "$out/bin/node-gyp" \
--set npm_config_nodedir ${nodejs}
'';
};
node-inspector = super.node-inspector.override {
buildInputs = [ self.node-pre-gyp ];
meta.broken = since "10";

Loading…
Cancel
Save