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