3
0
Fork 0
forked from mirrors/nixpkgs
Mario Rodas 2021-08-08 04:20:00 +00:00 committed by Raphael Megzari
parent 11ce8e0760
commit 0066c05ae2
2 changed files with 20 additions and 11 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 -DSYSTEM_INSTRUMENTATION. Enables OS-dependent event tracing
'v8_enable_system_instrumentation': 1,
}, {

View file

@ -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 ];
}