Skip to content

Commit faaf57e

Browse files
committed
[DDW-1110] Patch cardano-wallet in our tree to enable Apple Silicon builds
1 parent 92e706a commit faaf57e

File tree

2 files changed

+41
-2
lines changed

2 files changed

+41
-2
lines changed

default.nix

Lines changed: 9 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -31,7 +31,14 @@ let
3131
};
3232
};
3333
pkgs = import sources.nixpkgs { inherit system config; };
34-
sources = localLib.sources;
34+
sources = localLib.sources // {
35+
cardano-wallet = pkgs.runCommand "cardano-wallet" {} ''
36+
cp -r ${localLib.sources.cardano-wallet} $out
37+
chmod -R +w $out
38+
cd $out
39+
patch -p1 -i ${./nix/cardano-wallet--enable-aarch64-darwin.patch}
40+
'';
41+
};
3542
haskellNix = import sources."haskell.nix" {};
3643
inherit (import haskellNix.sources.nixpkgs-unstable haskellNix.nixpkgsArgs) haskell-nix;
3744
flake-compat = import sources.flake-compat;
@@ -61,7 +68,7 @@ let
6168
ostable.aarch64-darwin = "macos64-arm";
6269

6370
packages = self: {
64-
inherit cluster pkgs version target nodeImplementation;
71+
inherit walletFlake cluster pkgs version target nodeImplementation;
6572
cardanoLib = localLib.iohkNix.cardanoLib;
6673
daedalus-bridge = self.bridgeTable.${nodeImplementation};
6774

Lines changed: 32 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,32 @@
1+
diff --git a/flake.nix b/flake.nix
2+
index e17573394..9afa5b2bd 100644
3+
--- a/flake.nix
4+
+++ b/flake.nix
5+
@@ -388,7 +388,14 @@
6+
lib.recursiveUpdate (removeAttrs systems [ "systemHydraJobs" "systemHydraJobsPr" "systemHydraJobsBors" ])
7+
{
8+
inherit overlay nixosModule nixosModules;
9+
- hydraJobs = mkHydraJobs systems.systemHydraJobs;
10+
+ # Temporarily fix some merge bug – @michalrus
11+
+ hydraJobs =
12+
+ let hj = mkHydraJobs systems.systemHydraJobs; in
13+
+ hj // {
14+
+ macos = hj.macos // {
15+
+ silicon = systems.systemHydraJobs.aarch64-darwin.macos.silicon;
16+
+ };
17+
+ };
18+
hydraJobsPr = mkHydraJobs systems.systemHydraJobsPr;
19+
hydraJobsBors = mkHydraJobs systems.systemHydraJobsBors;
20+
}
21+
diff --git a/nix/supported-systems.nix b/nix/supported-systems.nix
22+
index 6e3f0d94e..5de7138b3 100644
23+
--- a/nix/supported-systems.nix
24+
+++ b/nix/supported-systems.nix
25+
@@ -1,6 +1,5 @@
26+
[
27+
"x86_64-linux"
28+
"x86_64-darwin"
29+
- # TODO: Enable aarch64-darwin when there are Hydra builders for it
30+
- # "aarch64-darwin"
31+
+ "aarch64-darwin"
32+
]

0 commit comments

Comments
 (0)