From f75d50324faf773abf9c66c04fa1ff1fe2bf0919 Mon Sep 17 00:00:00 2001 From: Antoine du Hamel Date: Sun, 21 Jul 2024 12:55:04 +0200 Subject: [PATCH] nodejs: use upstream patch instead of custom one --- .../web/nodejs/use-correct-env-in-tests.patch | 7 ------- pkgs/development/web/nodejs/v18.nix | 9 +++++++++ pkgs/development/web/nodejs/v20.nix | 8 ++++++++ pkgs/development/web/nodejs/v22.nix | 8 ++++++++ 4 files changed, 25 insertions(+), 7 deletions(-) diff --git a/pkgs/development/web/nodejs/use-correct-env-in-tests.patch b/pkgs/development/web/nodejs/use-correct-env-in-tests.patch index d2fda8d2cead..070d0e1ddfc3 100644 --- a/pkgs/development/web/nodejs/use-correct-env-in-tests.patch +++ b/pkgs/development/web/nodejs/use-correct-env-in-tests.patch @@ -1,12 +1,5 @@ `/usr/bin/env` is not available. ---- old/test/common/assertSnapshot.js -+++ new/test/common/assertSnapshot.js -@@ -81,2 +81,2 @@ async function spawnAndAssert(filename, transform = (x) => x, { tty = false, ... -- const executable = tty ? 'tools/pseudo-tty.py' : process.execPath; -- const args = tty ? [process.execPath, ...flags, filename] : [...flags, filename]; -+ const executable = tty ? 'python3' : process.execPath; -+ const args = tty ? ['tools/pseudo-tty.py', process.execPath, ...flags, filename] : [...flags, filename]; --- old/test/parallel/test-child-process-default-options.js +++ new/test/parallel/test-child-process-default-options.js @@ -35 +35 @@ if (isWindows) { diff --git a/pkgs/development/web/nodejs/v18.nix b/pkgs/development/web/nodejs/v18.nix index 1101fbdf725d..ab2edcf5e8c9 100644 --- a/pkgs/development/web/nodejs/v18.nix +++ b/pkgs/development/web/nodejs/v18.nix @@ -37,5 +37,14 @@ buildNodejs { 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; } diff --git a/pkgs/development/web/nodejs/v20.nix b/pkgs/development/web/nodejs/v20.nix index bf0e2f7feffb..1688eca1d2da 100644 --- a/pkgs/development/web/nodejs/v20.nix +++ b/pkgs/development/web/nodejs/v20.nix @@ -27,5 +27,13 @@ buildNodejs { url = "https://github.com/nodejs/node/commit/14863e80584e579fd48c55f6373878c821c7ff7e.patch"; hash = "sha256-I7Wjc7DE059a/ZyXAvAqEGvDudPjxQqtkBafckHCFzo="; }) + (fetchpatch2 { + url = "https://github.com/nodejs/node/commit/87598d4b63ef2c827a2bebdfa0f1540c35718519.patch"; + hash = "sha256-efRJ2nN9QXaT91SQTB+ESkHvXtBq30Cb9BEDEZU9M/8="; + }) + (fetchpatch2 { + url = "https://github.com/nodejs/node/commit/d0a6b605fba6cd69a82e6f12ff0363eef8fe1ee9.patch"; + hash = "sha256-TfYal/PikRZHL6zpAlC3SmkYXCe+/8Gs83dLX/X/P/k="; + }) ] ++ gypPatches; } diff --git a/pkgs/development/web/nodejs/v22.nix b/pkgs/development/web/nodejs/v22.nix index 44737d2ba8ec..6d34a1907263 100644 --- a/pkgs/development/web/nodejs/v22.nix +++ b/pkgs/development/web/nodejs/v22.nix @@ -20,5 +20,13 @@ buildNodejs { ./node-npm-build-npm-package-logic.patch ./use-correct-env-in-tests.patch ./bin-sh-node-run-v22.patch + (fetchpatch2 { + url = "https://github.com/nodejs/node/commit/87598d4b63ef2c827a2bebdfa0f1540c35718519.patch"; + hash = "sha256-efRJ2nN9QXaT91SQTB+ESkHvXtBq30Cb9BEDEZU9M/8="; + }) + (fetchpatch2 { + url = "https://github.com/nodejs/node/commit/d0a6b605fba6cd69a82e6f12ff0363eef8fe1ee9.patch"; + hash = "sha256-TfYal/PikRZHL6zpAlC3SmkYXCe+/8Gs83dLX/X/P/k="; + }) ] ++ gypPatches; }