nodejs: fix impure configure phase

When running configurePhase from impure build environment (i.e. nix
develop), default ./configure script was selecting wrong, impure Python
installation.
https://github.com/nodejs/node/blob/d57af10d1be390f4e33e6efe596133de9da36c86/configure#L7-L15
This commit is contained in:
Ivan Trubach
2024-06-30 09:54:32 +03:00
parent ae3742c661
commit f2f7ea87e8
+5 -2
View File
@@ -60,8 +60,6 @@ let
NIX_CFLAGS_COMPILE = "-D__ENVIRONMENT_MAC_OS_X_VERSION_MIN_REQUIRED__=101300";
};
CC_host = "cc";
CXX_host = "c++";
depsBuildBuild = [ buildPackages.stdenv.cc openssl libuv zlib icu ];
# NB: technically, we do not need bash in build inputs since all scripts are
@@ -106,6 +104,11 @@ let
dontDisableStatic = true;
configureScript = writeScript "nodejs-configure" ''
export CC_host="$CC_FOR_BUILD" CXX_host="$CXX_FOR_BUILD"
exec ${python.executable} configure.py "$@"
'';
enableParallelBuilding = true;
# Don't allow enabling content addressed conversion as `nodejs`