Merge pull request #197012 from marsam/init-nodejs-v19

nodejs-19_x: init at 19.0.0
This commit is contained in:
Mario Rodas 2022-10-22 05:28:46 -05:00 committed by GitHub
commit 41751078fd
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
4 changed files with 48 additions and 3 deletions

View File

@ -0,0 +1,16 @@
Disable v8 system instrumentation on Darwin
On Darwin, the v8 system instrumentation requires the header "os/signpost.h"
which is available since apple_sdk 11+. See: https://github.com/nodejs/node/issues/39584
--- old/tools/v8_gypfiles/features.gypi
+++ new/tools/v8_gypfiles/features.gypi
@@ -62,7 +62,7 @@
}, {
'is_component_build': 0,
}],
- ['OS == "win" or OS == "mac"', {
+ ['OS == "win"', {
# Sets -DENABLE_SYSTEM_INSTRUMENTATION. Enables OS-dependent event tracing
'v8_enable_system_instrumentation': 1,
}, {

View File

@ -67,7 +67,7 @@ let
configureFlags = let
isCross = stdenv.hostPlatform != stdenv.buildPlatform;
inherit (stdenv.hostPlatform) gcc isAarch32;
in sharedConfigureFlags ++ [
in sharedConfigureFlags ++ optionals (versionOlder version "19") [
"--without-dtrace"
] ++ (optionals isCross [
"--cross-compiling"

View File

@ -0,0 +1,25 @@
{ callPackage, openssl, fetchpatch, python3, enableNpm ? true }:
let
buildNodejs = callPackage ./nodejs.nix {
inherit openssl;
python = python3;
};
in
buildNodejs {
inherit enableNpm;
version = "19.0.0";
sha256 = "sha256-C3LSB6WBXxznskezPL+aLIb20BJT+jmQyXROJdl1BQ0=";
patches = [
(fetchpatch {
# Fixes cross compilation to aarch64-linux by reverting https://github.com/nodejs/node/pull/43200
name = "revert-arm64-pointer-auth.patch";
url = "https://github.com/nodejs/node/pull/43200/commits/d42c42cc8ac652ab387aa93205aed6ece8a5040a.patch";
sha256 = "sha256-ipGzg4lEoftTJbt6sW+0QJO/AZqHvUkFKe0qlum+iLY=";
revert = true;
})
./disable-darwin-v8-system-instrumentation-node19.patch
./bypass-darwin-xcrun-node16.patch
];
}

View File

@ -8697,9 +8697,13 @@ with pkgs;
nodejs-slim-18_x = callPackage ../development/web/nodejs/v18.nix {
enableNpm = false;
};
nodejs-19_x = callPackage ../development/web/nodejs/v19.nix { };
nodejs-slim-19_x = callPackage ../development/web/nodejs/v19.nix {
enableNpm = false;
};
# Update this when adding the newest nodejs major version!
nodejs_latest = nodejs-18_x;
nodejs-slim_latest = nodejs-slim-18_x;
nodejs_latest = nodejs-19_x;
nodejs-slim_latest = nodejs-slim-19_x;
nodePackages_latest = dontRecurseIntoAttrs nodejs_latest.pkgs;