nodejs_22: use shared SQLite (#352147)

authored by Emily and committed by GitHub 0b8a6f36 81fb40d3

+17 -3
+11 -3
pkgs/development/web/nodejs/nodejs.nix
··· 1 - { lib, stdenv, fetchurl, openssl, python, zlib, libuv, http-parser, icu, bash 2 , ninja, pkgconf, unixtools, runCommand, buildPackages 3 , testers 4 # for `.pkgs` attribute ··· 97 # TODO: also handle MIPS flags (mips_arch, mips_fpu, mips_float_abi). 98 99 useSharedHttpParser = !stdenv.hostPlatform.isDarwin && lib.versionOlder "${majorVersion}.${minorVersion}" "11.4"; 100 101 - sharedLibDeps = { inherit openssl zlib libuv; } // (lib.optionalAttrs useSharedHttpParser { inherit http-parser; }); 102 103 copyLibHeaders = 104 map ··· 151 # wrappers over the corresponding JS scripts. There are some packages though 152 # that use bash wrappers, e.g. polaris-web. 153 buildInputs = lib.optionals stdenv.hostPlatform.isDarwin [ CoreServices ApplicationServices ] 154 - ++ [ zlib libuv openssl http-parser icu bash ]; 155 156 nativeBuildInputs = 157 [
··· 1 + { lib, stdenv, fetchurl, openssl, python, zlib, libuv, sqlite, http-parser, icu, bash 2 , ninja, pkgconf, unixtools, runCommand, buildPackages 3 , testers 4 # for `.pkgs` attribute ··· 97 # TODO: also handle MIPS flags (mips_arch, mips_fpu, mips_float_abi). 98 99 useSharedHttpParser = !stdenv.hostPlatform.isDarwin && lib.versionOlder "${majorVersion}.${minorVersion}" "11.4"; 100 + useSharedSQLite = lib.versionAtLeast version "22.5"; 101 102 + sharedLibDeps = { 103 + inherit openssl zlib libuv; 104 + } // (lib.optionalAttrs useSharedHttpParser { 105 + inherit http-parser; 106 + }) // (lib.optionalAttrs useSharedSQLite { 107 + inherit sqlite; 108 + }); 109 110 copyLibHeaders = 111 map ··· 158 # wrappers over the corresponding JS scripts. There are some packages though 159 # that use bash wrappers, e.g. polaris-web. 160 buildInputs = lib.optionals stdenv.hostPlatform.isDarwin [ CoreServices ApplicationServices ] 161 + ++ [ zlib libuv openssl http-parser icu bash ] 162 + ++ lib.optionals useSharedSQLite [ sqlite ]; 163 164 nativeBuildInputs = 165 [
+6
pkgs/development/web/nodejs/v22.nix
··· 18 ./node-npm-build-npm-package-logic.patch 19 ./use-correct-env-in-tests.patch 20 ./bin-sh-node-run-v22.patch 21 ]; 22 }
··· 18 ./node-npm-build-npm-package-logic.patch 19 ./use-correct-env-in-tests.patch 20 ./bin-sh-node-run-v22.patch 21 + 22 + # Patch to use the shared version of SQLite instead of the one vendored upstream: 23 + (fetchpatch2 { 24 + url = "https://github.com/nodejs/node/commit/32f7d5ad1cf79e7e731e1bb7ac967f4f2a3194cf.patch?full_index=1"; 25 + hash = "sha256-dyUr3caGfetrXgfAl+CLE1LKKetDZCpPwMg4EM98rqI="; 26 + }) 27 ]; 28 }