@@ -30,14 +30,14 @@ rec {
3030 # patches = pkgs.lib.optional pkgs.stdenv.isDarwin (njPath + "/bypass-xcodebuild.diff");
3131 # };
3232
33- nodejs = pkgs . nodejs-14_x . overrideAttrs ( drv : {
33+ nodejs = pkgs . nodejs-18_x . overrideAttrs ( drv : {
3434 # XXX: we don’t want `bypass-xcodebuild.diff`, rather we supply
3535 # the pure `xcbuild` – without that, `blake2` doesn’t build,
3636 # cf. <https://github.com/NixOS/nixpkgs/blob/29ae6a1f3d7a8886b3772df4dc42a13817875c7d/pkgs/development/web/nodejs/bypass-xcodebuild.diff>
3737 patches = [ ] ;
3838 } ) ;
3939
40- nodePackages = pkgs . nodePackages . override { nodejs = nodejs ; } ;
40+ nodePackages = pkgs . nodePackages . override { inherit nodejs ; } ;
4141
4242 yarn = ( pkgs . yarn . override { inherit nodejs ; } ) . overrideAttrs ( drv : {
4343 # XXX: otherwise, unable to run our package.json scripts in Nix sandbox (patchShebangs doesn’t catch this)
5050 # Nixpkgs master @ 2022-07-18
5151 # Why → newer `yarn2nix` uses `deep-equal` to see if anything changed in the lockfile, we need that.
5252 source = pkgs . fetchzip {
53- url = "https://github.com/NixOS/nixpkgs/archive/qe4d49de45a3b5dbcb881656b4e3986e666141ea9 .tar.gz" ;
54- sha256 = "0y0c9ybkcfmjgrl93wzzlk7ii95kh2fb4v5ac5w6rmcsq2ff3yaz " ;
53+ url = "https://github.com/NixOS/nixpkgs/archive/e4d49de45a3b5dbcb881656b4e3986e666141ea9 .tar.gz" ;
54+ hash = "sha256-X/nhnMCa1Wx4YapsspyAs6QYz6T/85FofrI6NpdPDHg= " ;
5555 } ;
5656 subdir = builtins . path { path = source + "/pkgs/development/tools/yarn2nix-moretea/yarn2nix" ; } ;
5757 in
@@ -135,7 +135,7 @@ rec {
135135 # XXX: don’t use fetchzip, we need the raw .tar.gz in `patchElectronRebuild` below
136136 src = pkgs . fetchurl {
137137 url = "https://electronjs.org/headers/v${ electronVersion } /node-v${ electronVersion } -headers.tar.gz" ;
138- hash = "sha256-+FZ1EYV6tiZZUFulFYtq1pr861EhBaMlHRgP5H9ENmw =" ;
138+ hash = "sha256-er08CKt3fwotSjYxqdzpm8Q0YjvD1PhfNBDZ3Jozsvk =" ;
139139 } ;
140140 } ''
141141 tar -xf $src
@@ -144,16 +144,18 @@ rec {
144144 '' ;
145145
146146 electronShaSums = pkgs . fetchurl {
147+ name = "electronShaSums-${ electronVersion } " ; # cache invalidation
147148 url = "https://github.com/electron/electron/releases/download/v${ electronVersion } /SHASUMS256.txt" ;
148- hash = "sha256-NiUplP/dqmynH2ZN97kJVqMkzSLOLi3JR1T/OWHiOiA =" ;
149+ hash = "sha256-75bNqt2c7u/fm0P2Ha6NvkbGThEifIHXl2x5UCdy4fM =" ;
149150 } ;
150151
151152 electronCacheHash = builtins . hashString "sha256"
152153 "https://github.com/electron/electron/releases/download/v${ electronVersion } " ;
153154
154155 electronChromedriverShaSums = pkgs . fetchurl {
156+ name = "electronChromedriverShaSums-${ electronChromedriverVersion } " ; # cache invalidation
155157 url = "https://github.com/electron/electron/releases/download/v${ electronChromedriverVersion } /SHASUMS256.txt" ;
156- sha256 = "07xxam8dvn1aixvx39gd5x3yc1bs6i599ywxwi5cbkpf957ilpcx " ;
158+ hash = "sha256-nV0aT0nuzsVK5J37lEo0egXmRy/tpdF3jyrY3VBVvR8= " ;
157159 } ;
158160
159161 electronChromedriverCacheHash = builtins . hashString "sha256"
@@ -176,15 +178,7 @@ rec {
176178 patchElectronRebuild = pkgs . writeShellScriptBin "patch-electron-rebuild" ''
177179 echo 'Patching electron-rebuild to force our Node.js headers…'
178180
179- nodeGypJs=lib/src/module-type/node-gyp.js
180- if [ ! -e $nodeGypJs ] ; then
181- # makes it work both here, and in shell.nix:
182- nodeGypJs="node_modules/electron-rebuild/$nodeGypJs"
183- fi
184- if [ ! -e $nodeGypJs ] ; then
185- echo >&2 'fatal: shouldn’t happen unless electron-rebuild changes'
186- exit 1
187- fi
181+ nodeGypJs="node_modules/@electron/rebuild/lib/module-type/node-gyp/node-gyp.js"
188182
189183 # Patch idempotently (matters in repetitive shell.nix):
190184 if ! grep -qF ${ commonSources . electronHeaders . src } $nodeGypJs ; then
0 commit comments