Skip to content

Commit 1a335cd

Browse files
committed
[DW-1213] Fix the x86_64-darwin build
1 parent 1155de3 commit 1a335cd

File tree

3 files changed

+9
-6
lines changed

3 files changed

+9
-6
lines changed

nix/any-darwin.nix

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -290,8 +290,8 @@ in rec {
290290
url = "https://github.com/electron/electron/releases/download/v${electronVersion}/electron-v${electronVersion}-darwin-${archSuffix}.zip";
291291
hash =
292292
if archSuffix == "x64"
293-
then "sha256-a/CXlNbwILuq+AandY2hJRN7PJZkb0UD64G5VB5Q4C8="
294-
else "sha256-N03fBYF5SzHu6QCCgXL5IYGTwDLA5Gv/z6xq7JXCLxo=";
293+
then "sha256-I/d/vecsrYMV59Nw2SnNzrVAj1UzSUJB/F3VA9itDNw="
294+
else "sha256-Up0HRemSeMZvYxyB7b7yKlrYhxMyNmAC7dNxtAmFCyQ=";
295295
};
296296

297297
electronChromedriver = pkgs.fetchurl {

nix/new-common.nix

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -31,10 +31,13 @@ rec {
3131
# };
3232

3333
nodejs = pkgs.nodejs-18_x.overrideAttrs (drv: {
34-
# XXX: we don’t want `bypass-xcodebuild.diff`, rather we supply
34+
# XXX: we don’t want `bypass-xcodebuild.diff` or `bypass-darwin-xcrun-node16.patch`, 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>
37-
patches = [];
37+
patches = pkgs.lib.filter (patch: !(
38+
pkgs.lib.hasInfix "bypass-xcodebuild" patch ||
39+
pkgs.lib.hasInfix "bypass-darwin-xcrun" patch
40+
)) drv.patches;
3841
});
3942

4043
nodePackages = pkgs.nodePackages.override { inherit nodejs; };

scripts/rebuild-native-modules.sh

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -17,8 +17,8 @@ find . -type f -name '*.node' -not -path '*/@swc*/*' -exec rm -vf {} ';'
1717
# doesn’t work reliably.
1818
nix run -L .#internal.mainnet.newCommon.patchElectronRebuild
1919

20-
# XXX: Electron 24.2 requires c++17:
21-
sed -r 's,std=c\+\+14,std=c++17,g' -i node_modules/usb/binding.gyp
20+
# XXX: Electron 24.2 requires c++17, not 14 (or old 1y):
21+
sed -r 's,std=c\+\+(14|1y),std=c++17,g' -i node_modules/usb/binding.gyp
2222

2323
# TODO: do we really need to run `electron-rebuild` 3×?
2424

0 commit comments

Comments
 (0)