Merge pull request #253156 from SuperSandro2000/nodejs

nodejs: remove references to build dependencies

authored by Mario Rodas and committed by GitHub f268bc17 43def450

+10 -5
+10 -5
pkgs/development/web/nodejs/nodejs.nix
··· 1 - { lib, stdenv, fetchurl, openssl, python, zlib, libuv, util-linux, http-parser, bash 2 , pkg-config, which, buildPackages 3 # for `.pkgs` attribute 4 , callPackage ··· 6 , writeScript, coreutils, gnugrep, jq, curl, common-updater-scripts, nix, runtimeShell 7 , gnupg 8 , darwin, xcbuild 9 - , procps, icu 10 }: 11 12 { enableNpm ? true, version, sha256, patches ? [] } @args: ··· 69 buildInputs = lib.optionals stdenv.isDarwin [ CoreServices ApplicationServices ] 70 ++ [ zlib libuv openssl http-parser icu bash ]; 71 72 - nativeBuildInputs = [ which pkg-config python ] 73 ++ lib.optionals stdenv.isDarwin [ xcbuild ]; 74 75 - outputs = [ "out" "libv8" ]; 76 setOutputFlags = false; 77 moveToDev = false; 78 ··· 157 done 158 ''} 159 160 # install the missing headers for node-gyp 161 - cp -r ${lib.concatStringsSep " " copyLibHeaders} $out/include/node 162 163 # assemble a static v8 library and put it in the 'libv8' output 164 mkdir -p $libv8/lib
··· 1 + { lib, stdenv, fetchurl, nukeReferences, openssl, python, zlib, libuv, http-parser, bash 2 , pkg-config, which, buildPackages 3 # for `.pkgs` attribute 4 , callPackage ··· 6 , writeScript, coreutils, gnugrep, jq, curl, common-updater-scripts, nix, runtimeShell 7 , gnupg 8 , darwin, xcbuild 9 + , icu 10 }: 11 12 { enableNpm ? true, version, sha256, patches ? [] } @args: ··· 69 buildInputs = lib.optionals stdenv.isDarwin [ CoreServices ApplicationServices ] 70 ++ [ zlib libuv openssl http-parser icu bash ]; 71 72 + nativeBuildInputs = [ nukeReferences which pkg-config python ] 73 ++ lib.optionals stdenv.isDarwin [ xcbuild ]; 74 75 + outputs = [ "out" "dev" "libv8" ]; 76 setOutputFlags = false; 77 moveToDev = false; 78 ··· 157 done 158 ''} 159 160 + # remove references to build time dependencies 161 + nuke-refs $out/bin/node 162 + 163 + moveToOutput "include" "$dev" 164 + 165 # install the missing headers for node-gyp 166 + cp -r ${lib.concatStringsSep " " copyLibHeaders} $dev/include/node 167 168 # assemble a static v8 library and put it in the 'libv8' output 169 mkdir -p $libv8/lib