Loading pkgs/development/web/nodejs/nodejs.nix +8 −2 Original line number Diff line number Diff line Loading @@ -137,10 +137,16 @@ let "build-node-api-tests" "tooltest" "cctest" "test-ci-js" ]; checkFlags = [ # Do not create __pycache__ when running tests. checkFlags = [ "PYTHONDONTWRITEBYTECODE=1" ]; "PYTHONDONTWRITEBYTECODE=1" "FLAKY_TESTS=skip" # Skip some tests that are not passing in this context "CI_SKIP_TESTS=test-setproctitle,test-tls-cli-max-version-1.3,test-tls-client-auth,test-child-process-exec-env,test-fs-write-stream-eagain,test-tls-sni-option,test-https-foafssl,test-child-process-uid-gid,test-process-euid-egid,test-process-initgroups,test-process-uid-gid,test-process-setgroups" ]; postInstall = '' HOST_PATH=$out/bin patchShebangs --host $out Loading pkgs/development/web/nodejs/use-correct-env-in-tests.patch 0 → 100644 +24 −0 Original line number Diff line number Diff line `/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) { - child = spawn('/usr/bin/env', [], {}); + child = spawn('env', [], {}); --- old/test/parallel/test-child-process-env.js +++ new/test/parallel/test-child-process-env.js @@ -51 +51 @@ if (isWindows) { - child = spawn('/usr/bin/env', [], { env }); + child = spawn('env', [], { env }); --- old/test/parallel/test-child-process-exec-env.js +++ new/test/parallel/test-child-process-exec-env.js @@ -47 +47 @@ if (!isWindows) { - child = exec('/usr/bin/env', { env: { 'HELLO': 'WORLD' } }, after); + child = exec('env', { env: { 'HELLO': 'WORLD' } }, after); pkgs/development/web/nodejs/v18.nix +6 −1 Original line number Diff line number Diff line { callPackage, lib, overrideCC, pkgs, buildPackages, openssl, python3, enableNpm ? true }: { callPackage, lib, overrideCC, pkgs, buildPackages, openssl, python3, fetchpatch2, enableNpm ? true }: let # Clang 16+ cannot build Node v18 due to -Wenum-constexpr-conversion errors. Loading Loading @@ -27,5 +27,10 @@ buildNodejs { ./revert-arm64-pointer-auth.patch ./node-npm-build-npm-package-logic.patch ./trap-handler-backport.patch ./use-correct-env-in-tests.patch (fetchpatch2 { url = "https://github.com/nodejs/node/commit/534c122de166cb6464b489f3e6a9a544ceb1c913.patch"; hash = "sha256-4q4LFsq4yU1xRwNsM1sJoNVphJCnxaVe2IyL6AeHJ/I="; }) ]; } pkgs/development/web/nodejs/v20.nix +6 −1 Original line number Diff line number Diff line { callPackage, openssl, python3, enableNpm ? true }: { callPackage, fetchpatch2, openssl, python3, enableNpm ? true }: let buildNodejs = callPackage ./nodejs.nix { Loading @@ -15,5 +15,10 @@ buildNodejs { ./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 (fetchpatch2 { url = "https://github.com/nodejs/node/commit/534c122de166cb6464b489f3e6a9a544ceb1c913.patch"; hash = "sha256-4q4LFsq4yU1xRwNsM1sJoNVphJCnxaVe2IyL6AeHJ/I="; }) ]; } pkgs/development/web/nodejs/v22.nix +6 −1 Original line number Diff line number Diff line { callPackage, openssl, python3, enableNpm ? true }: { callPackage, fetchpatch2, openssl, python3, enableNpm ? true }: let buildNodejs = callPackage ./nodejs.nix { Loading @@ -14,5 +14,10 @@ buildNodejs { ./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 (fetchpatch2 { url = "https://github.com/nodejs/node/commit/534c122de166cb6464b489f3e6a9a544ceb1c913.patch"; hash = "sha256-4q4LFsq4yU1xRwNsM1sJoNVphJCnxaVe2IyL6AeHJ/I="; }) ]; } Loading
pkgs/development/web/nodejs/nodejs.nix +8 −2 Original line number Diff line number Diff line Loading @@ -137,10 +137,16 @@ let "build-node-api-tests" "tooltest" "cctest" "test-ci-js" ]; checkFlags = [ # Do not create __pycache__ when running tests. checkFlags = [ "PYTHONDONTWRITEBYTECODE=1" ]; "PYTHONDONTWRITEBYTECODE=1" "FLAKY_TESTS=skip" # Skip some tests that are not passing in this context "CI_SKIP_TESTS=test-setproctitle,test-tls-cli-max-version-1.3,test-tls-client-auth,test-child-process-exec-env,test-fs-write-stream-eagain,test-tls-sni-option,test-https-foafssl,test-child-process-uid-gid,test-process-euid-egid,test-process-initgroups,test-process-uid-gid,test-process-setgroups" ]; postInstall = '' HOST_PATH=$out/bin patchShebangs --host $out Loading
pkgs/development/web/nodejs/use-correct-env-in-tests.patch 0 → 100644 +24 −0 Original line number Diff line number Diff line `/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) { - child = spawn('/usr/bin/env', [], {}); + child = spawn('env', [], {}); --- old/test/parallel/test-child-process-env.js +++ new/test/parallel/test-child-process-env.js @@ -51 +51 @@ if (isWindows) { - child = spawn('/usr/bin/env', [], { env }); + child = spawn('env', [], { env }); --- old/test/parallel/test-child-process-exec-env.js +++ new/test/parallel/test-child-process-exec-env.js @@ -47 +47 @@ if (!isWindows) { - child = exec('/usr/bin/env', { env: { 'HELLO': 'WORLD' } }, after); + child = exec('env', { env: { 'HELLO': 'WORLD' } }, after);
pkgs/development/web/nodejs/v18.nix +6 −1 Original line number Diff line number Diff line { callPackage, lib, overrideCC, pkgs, buildPackages, openssl, python3, enableNpm ? true }: { callPackage, lib, overrideCC, pkgs, buildPackages, openssl, python3, fetchpatch2, enableNpm ? true }: let # Clang 16+ cannot build Node v18 due to -Wenum-constexpr-conversion errors. Loading Loading @@ -27,5 +27,10 @@ buildNodejs { ./revert-arm64-pointer-auth.patch ./node-npm-build-npm-package-logic.patch ./trap-handler-backport.patch ./use-correct-env-in-tests.patch (fetchpatch2 { url = "https://github.com/nodejs/node/commit/534c122de166cb6464b489f3e6a9a544ceb1c913.patch"; hash = "sha256-4q4LFsq4yU1xRwNsM1sJoNVphJCnxaVe2IyL6AeHJ/I="; }) ]; }
pkgs/development/web/nodejs/v20.nix +6 −1 Original line number Diff line number Diff line { callPackage, openssl, python3, enableNpm ? true }: { callPackage, fetchpatch2, openssl, python3, enableNpm ? true }: let buildNodejs = callPackage ./nodejs.nix { Loading @@ -15,5 +15,10 @@ buildNodejs { ./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 (fetchpatch2 { url = "https://github.com/nodejs/node/commit/534c122de166cb6464b489f3e6a9a544ceb1c913.patch"; hash = "sha256-4q4LFsq4yU1xRwNsM1sJoNVphJCnxaVe2IyL6AeHJ/I="; }) ]; }
pkgs/development/web/nodejs/v22.nix +6 −1 Original line number Diff line number Diff line { callPackage, openssl, python3, enableNpm ? true }: { callPackage, fetchpatch2, openssl, python3, enableNpm ? true }: let buildNodejs = callPackage ./nodejs.nix { Loading @@ -14,5 +14,10 @@ buildNodejs { ./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 (fetchpatch2 { url = "https://github.com/nodejs/node/commit/534c122de166cb6464b489f3e6a9a544ceb1c913.patch"; hash = "sha256-4q4LFsq4yU1xRwNsM1sJoNVphJCnxaVe2IyL6AeHJ/I="; }) ]; }