Merge pull request #133319 from olebedev/teach-node-gyp-to-use-nodejs-headers-locally

nodePackages.node-gyp: local nodejs header files
This commit is contained in:
Sandro 2021-08-10 23:05:45 +02:00 committed by GitHub
commit 46ece17527
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -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";