Skip to content

Commit

Permalink
nodejs: fix impure configure phase
Browse files Browse the repository at this point in the history
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
  • Loading branch information
tie committed Jun 30, 2024
1 parent ae3742c commit f2f7ea8
Showing 1 changed file with 5 additions and 2 deletions.
7 changes: 5 additions & 2 deletions pkgs/development/web/nodejs/nodejs.nix
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down Expand Up @@ -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`
Expand Down

0 comments on commit f2f7ea8

Please sign in to comment.