From c2b5f26f90ff44474003da5b91025b67bb30853b Mon Sep 17 00:00:00 2001 From: Antoine du Hamel Date: Mon, 16 Feb 2026 23:29:58 +0100 Subject: [PATCH] pkgsi686Linux.nodejs-slim: fix build --- .../web/nodejs/sab-test-32bit.patch | 27 ------------------- pkgs/development/web/nodejs/v24.nix | 7 +++-- 2 files changed, 5 insertions(+), 29 deletions(-) delete mode 100644 pkgs/development/web/nodejs/sab-test-32bit.patch diff --git a/pkgs/development/web/nodejs/sab-test-32bit.patch b/pkgs/development/web/nodejs/sab-test-32bit.patch deleted file mode 100644 index c90e36b1df6c..000000000000 --- a/pkgs/development/web/nodejs/sab-test-32bit.patch +++ /dev/null @@ -1,27 +0,0 @@ -diff --git a/test/parallel/test-internal-util-construct-sab.js b/test/parallel/test-internal-util-construct-sab.js -index 5ff9b09f8e7d36..403b59809e47d2 100644 ---- a/test/parallel/test-internal-util-construct-sab.js -+++ b/test/parallel/test-internal-util-construct-sab.js -@@ -3,16 +3,20 @@ - - require('../common'); - const assert = require('assert'); -+const { kMaxLength } = require('buffer'); - const { isSharedArrayBuffer } = require('util/types'); - const { constructSharedArrayBuffer } = require('internal/util'); - - // We're testing that we can construct a SAB even when the global is not exposed. - assert.strictEqual(typeof SharedArrayBuffer, 'undefined'); - --for (const length of [undefined, 0, 1, 2 ** 32]) { -+for (const length of [undefined, 0, 1, 2 ** 16]) { - assert(isSharedArrayBuffer(constructSharedArrayBuffer(length))); - } - --for (const length of [-1, Number.MAX_SAFE_INTEGER + 1, 2 ** 64]) { -+// Specifically test the following cases: -+// - out-of-range allocation requests should not crash the process -+// - no int64 overflow -+for (const length of [-1, kMaxLength + 1, 2 ** 64]) { - assert.throws(() => constructSharedArrayBuffer(length), RangeError); - } diff --git a/pkgs/development/web/nodejs/v24.nix b/pkgs/development/web/nodejs/v24.nix index 739af04e5307..9c03efa9da32 100644 --- a/pkgs/development/web/nodejs/v24.nix +++ b/pkgs/development/web/nodejs/v24.nix @@ -69,7 +69,10 @@ buildNodejs { ++ lib.optionals stdenv.is32bit [ # see: https://github.com/nodejs/node/issues/58458 ./v24-32bit.patch - # see: https://github.com/nodejs/node/issues/61025 - ./sab-test-32bit.patch + # TODO: remove once included in an future upstream release + (fetchpatch2 { + url = "https://github.com/nodejs/node/commit/f13d7bf69a7f1642fb5b1b624eff1a50ceb71849.patch?full_index=1"; + hash = "sha256-4PZq1gG/K+FwAM06VIXYoSNJeOYe37kfKW0jqczeXbc="; + }) ]; }