nodejs: set strictDeps and patch bash shebangs

This commit is contained in:
Ivan Trubach 2023-07-18 18:47:45 +03:00
parent e29c330939
commit 65ff987f80

View file

@ -1,4 +1,4 @@
{ lib, stdenv, fetchurl, openssl, python, zlib, libuv, util-linux, http-parser, runtimeShellPackage { lib, stdenv, fetchurl, openssl, python, zlib, libuv, util-linux, http-parser, bash
, pkg-config, which, buildPackages , pkg-config, which, buildPackages
# for `.pkgs` attribute # for `.pkgs` attribute
, callPackage , callPackage
@ -50,13 +50,17 @@ let
inherit sha256; inherit sha256;
}; };
strictDeps = true;
CC_host = "cc"; CC_host = "cc";
CXX_host = "c++"; CXX_host = "c++";
depsBuildBuild = [ buildPackages.stdenv.cc openssl libuv zlib icu ]; depsBuildBuild = [ buildPackages.stdenv.cc openssl libuv zlib icu ];
# NB: technically, we do not need bash in build inputs since all scripts are
# wrappers over the corresponding JS scripts. There are some packages though
# that use bash wrappers, e.g. polaris-web.
buildInputs = lib.optionals stdenv.isDarwin [ CoreServices ApplicationServices ] buildInputs = lib.optionals stdenv.isDarwin [ CoreServices ApplicationServices ]
++ lib.optional isCross runtimeShellPackage # for patchShebangs ++ [ zlib libuv openssl http-parser icu bash ];
++ [ zlib libuv openssl http-parser icu ];
nativeBuildInputs = [ which pkg-config python ] nativeBuildInputs = [ which pkg-config python ]
++ lib.optionals stdenv.isDarwin [ xcbuild ]; ++ lib.optionals stdenv.isDarwin [ xcbuild ];