diff options
Diffstat (limited to 'pkgs/development/web/nodejs/v23.nix')
| -rw-r--r-- | pkgs/development/web/nodejs/v23.nix | 34 |
1 files changed, 31 insertions, 3 deletions
diff --git a/pkgs/development/web/nodejs/v23.nix b/pkgs/development/web/nodejs/v23.nix index 633ad20dcfed..beee5147bac4 100644 --- a/pkgs/development/web/nodejs/v23.nix +++ b/pkgs/development/web/nodejs/v23.nix @@ -1,6 +1,7 @@ { lib, stdenv, + buildPackages, callPackage, fetchpatch2, openssl, @@ -19,15 +20,42 @@ buildNodejs { version = "23.11.0"; sha256 = "f2c5db21fc5d3c3d78c7e8823bff770cef0da8078c3b5ac4fa6d17d5a41be99d"; patches = - [ - ./configure-emulator.patch + ( + if (stdenv.hostPlatform.emulatorAvailable buildPackages) then + [ + ./configure-emulator.patch + ] + else + [ + (fetchpatch2 { + url = "https://raw.githubusercontent.com/buildroot/buildroot/2f0c31bffdb59fb224387e35134a6d5e09a81d57/package/nodejs/nodejs-src/0003-include-obj-name-in-shared-intermediate.patch"; + hash = "sha256-3g4aS+NmmUYNOYRNc6UMJKYoaTlpP5Knt9UHegx+o0Y="; + }) + ] + ) + ++ lib.optionals (stdenv.hostPlatform != stdenv.buildPlatform && stdenv.hostPlatform.isFreeBSD) [ + # This patch is concerning. + # https://github.com/nodejs/node/issues/54576 + # It is only supposed to affect clang >= 17, but I'm seeing it on clang 19. + # I'm keeping the predicate for this patch pretty strict out of caution, + # so if you see the error it's supposed to prevent, feel free to loosen it. + (fetchpatch2 { + url = "https://raw.githubusercontent.com/rubyjs/libv8-node/62476a398d4c9c1a670240a3b070d69544be3761/patch/v8-no-assert-trivially-copyable.patch"; + hash = "sha256-hSTLljmVzYmc3WAVeRq9EPYluXGXFeWVXkykufGQPVw="; + }) + ] + ++ [ ./configure-armv6-vfpv2.patch ./disable-darwin-v8-system-instrumentation-node19.patch ./bypass-darwin-xcrun-node16.patch ./node-npm-build-npm-package-logic.patch ./use-correct-env-in-tests.patch ./bin-sh-node-run-v22.patch - + # fix test failure on macos 15.4 + (fetchpatch2 { + url = "https://github.com/nodejs/node/commit/33f6e1ea296cd20366ab94e666b03899a081af94.patch?full_index=1"; + hash = "sha256-aVBMcQlhQeviUQpMIfC988jjDB2BgYzlMYsq+w16mzU="; + }) ] ++ lib.optionals (!stdenv.buildPlatform.isDarwin) [ # test-icu-env is failing without the reverts |
