summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMario Rodas <marsam@users.noreply.github.com>2021-08-08 04:20:00 +0000
committerMario Rodas <marsam@users.noreply.github.com>2021-08-08 04:20:00 +0000
commit4795a1882d78dcc350730c9ab17a3cacb538abfd (patch)
tree117daaa63befb66883c66ec5c4ebd3f3abcce195
parentnodejs-16_x: add patch for CVE-2021-22930 (diff)
downloadnixpkgs-4795a1882d78dcc350730c9ab17a3cacb538abfd.tar.gz
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 (cherry picked from commit 0066c05ae2cfa7b7d56b8bd47468bb34d45fb092)
-rw-r--r--pkgs/development/web/nodejs/disable-darwin-v8-system-instrumentation.patch16
-rw-r--r--pkgs/development/web/nodejs/v16.nix15
2 files changed, 20 insertions, 11 deletions
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 000000000000..63e9107b33d0
--- /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 494edc1e997b..bee01d7aae2b 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 ];
}