-
-
Notifications
You must be signed in to change notification settings - Fork 15.1k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #262124 from tie/node-darwin-sandbox
nodejs: fix sandboxed build on darwin
- Loading branch information
Showing
8 changed files
with
136 additions
and
35 deletions.
There are no files selected for viewing
This file was deleted.
Oops, something went wrong.
24 changes: 24 additions & 0 deletions
24
pkgs/development/web/nodejs/gyp-patches-pre-v22-import-sys.patch
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,24 @@ | ||
Add missing import statement for gyp-patches.nix. | ||
|
||
--- a/deps/npm/node_modules/node-gyp/gyp/pylib/gyp/generator/make.py | ||
+++ b/deps/npm/node_modules/node-gyp/gyp/pylib/gyp/generator/make.py | ||
@@ -25,6 +25,7 @@ | ||
import os | ||
import re | ||
import subprocess | ||
+import sys | ||
import gyp | ||
import gyp.common | ||
import gyp.xcode_emulation | ||
|
||
--- a/tools/gyp/pylib/gyp/generator/make.py | ||
+++ b/tools/gyp/pylib/gyp/generator/make.py | ||
@@ -25,6 +25,7 @@ | ||
import os | ||
import re | ||
import subprocess | ||
+import sys | ||
import gyp | ||
import gyp.common | ||
import gyp.xcode_emulation | ||
|
14 changes: 14 additions & 0 deletions
14
pkgs/development/web/nodejs/gyp-patches-v22-import-sys.patch
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,14 @@ | ||
For some reason Node.js v22 has two different GYP versions vendored, and | ||
only one of them contains `import sys`. | ||
|
||
--- a/deps/npm/node_modules/node-gyp/gyp/pylib/gyp/generator/make.py | ||
+++ b/deps/npm/node_modules/node-gyp/gyp/pylib/gyp/generator/make.py | ||
@@ -25,6 +25,7 @@ | ||
import os | ||
import re | ||
import subprocess | ||
+import sys | ||
import gyp | ||
import gyp.common | ||
import gyp.xcode_emulation | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,22 @@ | ||
{ fetchpatch2 }: | ||
let | ||
name = "gyp-darwin-sandbox.patch"; | ||
url = "https://github.com/nodejs/gyp-next/commit/706d04aba5bd18f311dc56f84720e99f64c73466.patch"; | ||
in | ||
[ | ||
# Fixes builds with Nix sandbox on Darwin for gyp. | ||
# See https://github.com/NixOS/nixpkgs/issues/261820 | ||
# and https://github.com/nodejs/gyp-next/pull/216 | ||
(fetchpatch2 { | ||
inherit name url; | ||
hash = "sha256-l8FzgLq9CbVJCkXfnTyDQ+vXKCz65wpaffE74oSU+kY="; | ||
stripLen = 1; | ||
extraPrefix = "tools/gyp/"; | ||
}) | ||
(fetchpatch2 { | ||
inherit name url; | ||
hash = "sha256-UVUn4onXfJgFoAdApLAbliiBgM9rxDdIo53WjFryoBI="; | ||
stripLen = 1; | ||
extraPrefix = "deps/npm/node_modules/node-gyp/gyp/"; | ||
}) | ||
] |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters