nixpkgs mirror (for testing)
github.com/NixOS/nixpkgs
nix
1{
2 lib,
3 fetchpatch2,
4 patch_npm ? true,
5 patch_tools ? true,
6}:
7let
8 url = "https://github.com/nodejs/gyp-next/commit/8224deef984add7e7afe846cfb82c9d3fa6da1fb.patch?full_index=1";
9in
10lib.optionals patch_tools [
11 # Fixes builds with Nix sandbox on Darwin for gyp.
12 (fetchpatch2 {
13 inherit url;
14 hash = "sha256-kvCMpedjrY64BlaC1R0NVjk/vIVivYAGVgWwMEGeP6k=";
15 stripLen = 1;
16 extraPrefix = "tools/gyp/";
17 })
18]
19++ lib.optionals patch_npm [
20 (fetchpatch2 {
21 inherit url;
22 hash = "sha256-cXTwmCRHrNhuY1+3cD/EvU0CJ+1Nk4TRh6c3twvfaW8=";
23 stripLen = 1;
24 extraPrefix = "deps/npm/node_modules/node-gyp/gyp/";
25 })
26]
27++ [
28 ./gyp-patches-set-fallback-value-for-CLT-darwin.patch
29]