From 0066c05ae2cfa7b7d56b8bd47468bb34d45fb092 Mon Sep 17 00:00:00 2001 From: Mario Rodas Date: Sun, 8 Aug 2021 04:20:00 +0000 Subject: [PATCH] nodejs-16_x: 16.5.0 -> 16.6.1 https://github.com/nodejs/node/releases/tag/v16.6.0 https://github.com/nodejs/node/releases/tag/v16.6.1 --- ...isable-darwin-v8-system-instrumentation.patch | 16 ++++++++++++++++ pkgs/development/web/nodejs/v16.nix | 15 ++++----------- 2 files changed, 20 insertions(+), 11 deletions(-) create mode 100644 pkgs/development/web/nodejs/disable-darwin-v8-system-instrumentation.patch diff --git a/pkgs/development/web/nodejs/disable-darwin-v8-system-instrumentation.patch b/pkgs/development/web/nodejs/disable-darwin-v8-system-instrumentation.patch new file mode 100644 index 00000000000..63e9107b33d --- /dev/null +++ b/pkgs/development/web/nodejs/disable-darwin-v8-system-instrumentation.patch @@ -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 -DSYSTEM_INSTRUMENTATION. Enables OS-dependent event tracing + 'v8_enable_system_instrumentation': 1, + }, { diff --git a/pkgs/development/web/nodejs/v16.nix b/pkgs/development/web/nodejs/v16.nix index 494edc1e997..bee01d7aae2 100644 --- a/pkgs/development/web/nodejs/v16.nix +++ b/pkgs/development/web/nodejs/v16.nix @@ -1,4 +1,4 @@ -{ callPackage, openssl, python3, fetchpatch, enableNpm ? true }: +{ callPackage, openssl, python3, enableNpm ? true }: let buildNodejs = callPackage ./nodejs.nix { @@ -8,14 +8,7 @@ let in buildNodejs { inherit enableNpm; - version = "16.5.0"; - sha256 = "16dapj5pm2y1m3ldrjjlz8rq9axk85nn316iz02nk6qjs66y6drz"; - patches = [ - # Fix CVE-2021-22930 https://github.com/nodejs/node/pull/39423. - # It should be fixed by Node.js 16.6.0, but currently it fails to build on Darwin - (fetchpatch { - url = "https://github.com/nodejs/node/commit/9d950a0956bf2c3dd87bacb56807f37e16a91db4.patch"; - sha256 = "1narhk5dqdkbndh9hg0dn5ghhgrd6gsamjqszpivmp33nl5hgsx3"; - }) - ]; + version = "16.6.1"; + sha256 = "0mz5wfhf2k1qf3d57h4r8b30izhyg93g5m9c8rljlzy6ih2ymcbr"; + patches = [ ./disable-darwin-v8-system-instrumentation.patch ]; }