at master 1.9 kB view raw
1{ 2 callPackage, 3 fetchpatch2, 4 openssl, 5 python3, 6 enableNpm ? true, 7}: 8 9let 10 buildNodejs = callPackage ./nodejs.nix { 11 inherit openssl; 12 python = python3; 13 }; 14 15 gypPatches = callPackage ./gyp-patches.nix { } ++ [ 16 # Fixes builds with Nix sandbox on Darwin for gyp. 17 # See https://github.com/NixOS/nixpkgs/issues/261820 18 # and https://github.com/nodejs/gyp-next/pull/216 19 (fetchpatch2 { 20 url = "https://github.com/nodejs/gyp-next/commit/706d04aba5bd18f311dc56f84720e99f64c73466.patch?full_index=1"; 21 hash = "sha256-iV9qvj0meZkgRzFNur2v1jtLZahbqvSJ237NoM8pPZc="; 22 stripLen = 1; 23 extraPrefix = "tools/gyp/"; 24 }) 25 (fetchpatch2 { 26 url = "https://github.com/nodejs/gyp-next/commit/706d04aba5bd18f311dc56f84720e99f64c73466.patch?full_index=1"; 27 hash = "sha256-1iyeeAprmWpmLafvOOXW45iZ4jWFSloWJxQ0reAKBOo="; 28 stripLen = 1; 29 extraPrefix = "deps/npm/node_modules/node-gyp/gyp/"; 30 }) 31 32 ./gyp-patches-pre-v22-import-sys.patch 33 ./gyp-patches-set-fallback-value-for-CLT.patch 34 ]; 35in 36buildNodejs { 37 inherit enableNpm; 38 version = "20.19.5"; 39 sha256 = "230c899f4e2489c4b8d2232edd6cc02f384fb2397c2a246a22e415837ee5da51"; 40 patches = [ 41 ./configure-emulator.patch 42 ./configure-armv6-vfpv2.patch 43 ./node-npm-build-npm-package-logic.patch 44 ./use-correct-env-in-tests.patch 45 ./use-nix-codesign.patch 46 47 # TODO: remove when included in a release 48 (fetchpatch2 { 49 url = "https://github.com/nodejs/node/commit/8caa1dcee63b2c6fd7a9edf9b9a6222b38a2cf62.patch?full_index=1"; 50 hash = "sha256-DtN0bpYfo5twHz2GrLLgq4Bu2gFYTkNPMRKhrgeYRyA="; 51 includes = [ "test/parallel/test-setproctitle.js" ]; 52 }) 53 (fetchpatch2 { 54 url = "https://github.com/nodejs/node/commit/499a5c345165f0d4a94b98d08f1ace7268781564.patch?full_index=1"; 55 hash = "sha256-wF4+CytC1OB5egJGOfLm1USsYY12f9kADymVrxotezE="; 56 }) 57 ] 58 ++ gypPatches; 59}