mirror of
https://github.com/NixOS/nixpkgs.git
synced 2024-11-26 00:43:20 +00:00
nodejs_18: pin to Python 3.11, fix tests with OpenSSL 3.0.14
This commit is contained in:
parent
8424135139
commit
7c1177c514
24
pkgs/development/web/nodejs/v18-openssl-3.0.14.patch
Normal file
24
pkgs/development/web/nodejs/v18-openssl-3.0.14.patch
Normal file
@ -0,0 +1,24 @@
|
||||
diff --git a/test/parallel/test-tls-alpn-server-client.js b/test/parallel/test-tls-alpn-server-client.js
|
||||
index 522dd34ad2..3f0ee2a0f9 100644
|
||||
--- a/test/parallel/test-tls-alpn-server-client.js
|
||||
+++ b/test/parallel/test-tls-alpn-server-client.js
|
||||
@@ -195,7 +195,8 @@ function TestALPNCallback() {
|
||||
|
||||
// Callback picks 2nd preference => undefined => ALPN rejected:
|
||||
assert.strictEqual(results[1].server, undefined);
|
||||
- assert.strictEqual(results[1].client.error.code, 'ECONNRESET');
|
||||
+ const allowedErrors = ['ECONNRESET', 'ERR_SSL_TLSV1_ALERT_NO_APPLICATION_PROTOCOL'];
|
||||
+ assert.ok(allowedErrors.includes(results[1].client.error.code), `'${results[1].client.error.code}' was not one of ${allowedErrors}.`);
|
||||
|
||||
TestBadALPNCallback();
|
||||
});
|
||||
@@ -218,7 +219,8 @@ function TestBadALPNCallback() {
|
||||
runTest(clientsOptions, serverOptions, function(results) {
|
||||
// Callback returns 'http/5' => doesn't match client ALPN => error & reset
|
||||
assert.strictEqual(results[0].server, undefined);
|
||||
- assert.strictEqual(results[0].client.error.code, 'ECONNRESET');
|
||||
+ const allowedErrors = ['ECONNRESET', 'ERR_SSL_TLSV1_ALERT_NO_APPLICATION_PROTOCOL'];
|
||||
+ assert.ok(allowedErrors.includes(results[0].client.error.code), `'${results[0].client.error.code}' was not one of ${allowedErrors}.`);
|
||||
|
||||
TestALPNOptionsCallback();
|
||||
});
|
@ -1,4 +1,4 @@
|
||||
{ callPackage, lib, overrideCC, pkgs, buildPackages, openssl, python3, fetchpatch2, 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,7 +14,7 @@ let
|
||||
inherit openssl;
|
||||
stdenv = ensureCompatibleCC pkgs;
|
||||
buildPackages = buildPackages // { stdenv = ensureCompatibleCC buildPackages; };
|
||||
python = python3;
|
||||
python = python311;
|
||||
};
|
||||
in
|
||||
buildNodejs {
|
||||
@ -28,6 +28,7 @@ buildNodejs {
|
||||
./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=";
|
||||
|
Loading…
Reference in New Issue
Block a user