diff options
Diffstat (limited to 'pkgs/development/web/nodejs/v18.nix')
-rw-r--r-- | pkgs/development/web/nodejs/v18.nix | 29 |
1 files changed, 24 insertions, 5 deletions
diff --git a/pkgs/development/web/nodejs/v18.nix b/pkgs/development/web/nodejs/v18.nix index 6b3ca7635e436..ab2edcf5e8c9a 100644 --- a/pkgs/development/web/nodejs/v18.nix +++ b/pkgs/development/web/nodejs/v18.nix @@ -1,4 +1,4 @@ -{ callPackage, lib, overrideCC, pkgs, buildPackages, openssl, python3, enableNpm ? true }: +{ callPackage, lib, overrideCC, pkgs, buildPackages, openssl, python311, fetchpatch2, enableNpm ? true }: let # Clang 16+ cannot build Node v18 due to -Wenum-constexpr-conversion errors. @@ -14,18 +14,37 @@ let inherit openssl; stdenv = ensureCompatibleCC pkgs; buildPackages = buildPackages // { stdenv = ensureCompatibleCC buildPackages; }; - python = python3; + python = python311; }; + + gypPatches = callPackage ./gyp-patches.nix { } ++ [ + ./gyp-patches-pre-v22-import-sys.patch + ]; in buildNodejs { inherit enableNpm; - version = "18.20.2"; - sha256 = "sha256-iq6nycfpJ/sJ2RSY2jEbbk0YIzOQ4jxyOlO4kfrUxz8="; + version = "18.20.4"; + sha256 = "sha256-p2x+oblq62ljoViAYmDICUtiRNZKaWUp0CBUe5qVyio="; patches = [ ./disable-darwin-v8-system-instrumentation.patch ./bypass-darwin-xcrun-node16.patch ./revert-arm64-pointer-auth.patch ./node-npm-build-npm-package-logic.patch ./trap-handler-backport.patch - ]; + ./use-correct-env-in-tests.patch + ./v18-openssl-3.0.14.patch + (fetchpatch2 { + url = "https://github.com/nodejs/node/commit/534c122de166cb6464b489f3e6a9a544ceb1c913.patch"; + hash = "sha256-4q4LFsq4yU1xRwNsM1sJoNVphJCnxaVe2IyL6AeHJ/I="; + }) + (fetchpatch2 { + url = "https://github.com/nodejs/node/commit/87598d4b63ef2c827a2bebdfa0f1540c35718519.patch"; + hash = "sha256-JJi8z9aaWnu/y3nZGOSUfeNzNSCYzD9dzoHXaGkeaEA="; + includes = ["test/common/assertSnapshot.js"]; + }) + (fetchpatch2 { + url = "https://github.com/nodejs/node/commit/d0a6b605fba6cd69a82e6f12ff0363eef8fe1ee9.patch"; + hash = "sha256-TfYal/PikRZHL6zpAlC3SmkYXCe+/8Gs83dLX/X/P/k="; + }) + ] ++ gypPatches; } |