Skip to content

Commit 1e3a5e6

Browse files
committed
[DDW-1220] Update cardano-node to 8.1.1 (via cardano-wallet)
1 parent c90fea0 commit 1e3a5e6

File tree

5 files changed

+83
-74
lines changed

5 files changed

+83
-74
lines changed

flake.lock

Lines changed: 6 additions & 6 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

flake.nix

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33

44
inputs = {
55
nixpkgs.url = "github:nixos/nixpkgs/nixpkgs-22.11-darwin";
6-
cardano-wallet-unpatched.url = "github:input-output-hk/cardano-wallet/v2023-04-14";
6+
cardano-wallet-unpatched.url = "github:cardano-foundation/cardano-wallet/pull/4003/head"; # TODO: PR→release
77
cardano-wallet-unpatched.flake = false; # otherwise, +10k quadratic dependencies in flake.lock…
88
cardano-world.url = "github:input-output-hk/cardano-world/a0a315100ee320395be97fcc83f46678d5a7fb6e";
99
cardano-world.flake = false; # otherwise, +19k quadratic dependencies in flake.lock…
Lines changed: 32 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,12 +1,40 @@
1+
diff --git a/flake.nix b/flake.nix
2+
index 37ea1cfa12..8d0871d52b 100644
3+
--- a/flake.nix
4+
+++ b/flake.nix
5+
@@ -217,8 +217,22 @@
6+
collectChecks
7+
check;
8+
9+
- nodePkgs = cardano-node-runtime.legacyPackages.${system};
10+
- nodeProject = cardano-node-runtime.project.${system};
11+
+ cardano-node-runtime-patched =
12+
+ if system != "aarch64-darwin"
13+
+ then cardano-node-runtime
14+
+ else (import ./nix/flake-compat.nix {
15+
+ src = {
16+
+ outPath = toString (pkgs.runCommandLocal "patched-cardano-node" {} ''
17+
+ cp -r ${cardano-node-runtime} $out
18+
+ chmod -R +w $out
19+
+ cat ${./nix/supported-systems.nix} >$out/nix/supported-systems.nix
20+
+ '');
21+
+ inherit (cardano-node-runtime.sourceInfo) rev shortRev lastModified lastModifiedDate;
22+
+ };
23+
+ }).defaultNix;
24+
+
25+
+ nodePkgs = cardano-node-runtime-patched.legacyPackages.${system};
26+
+ nodeProject = cardano-node-runtime-patched.project.${system};
27+
28+
project = (import ./nix/haskell.nix
29+
CHaP
130
diff --git a/nix/supported-systems.nix b/nix/supported-systems.nix
2-
index 6e3f0d94e3..5de7138b32 100644
31+
index 6e3f0d94e3..a0c0ae17dc 100644
332
--- a/nix/supported-systems.nix
433
+++ b/nix/supported-systems.nix
5-
@@ -1,6 +1,5 @@
6-
[
34+
@@ -2,5 +2,5 @@
735
"x86_64-linux"
836
"x86_64-darwin"
9-
- # TODO: Enable aarch64-darwin when there are Hydra builders for it
37+
# TODO: Enable aarch64-darwin when there are Hydra builders for it
1038
- # "aarch64-darwin"
1139
+ "aarch64-darwin"
1240
]

nix/cardano-wallet--proper-runtimeNodePkgs.patch

Lines changed: 0 additions & 45 deletions
This file was deleted.

nix/old-default.nix

Lines changed: 44 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -21,26 +21,52 @@ let
2121
});
2222
};
2323
};
24-
walletFlake = (import inputs.flake-compat {
25-
# FIXME: add patches in `flake.nix` after <https://github.com/NixOS/nix/issues/3920>
26-
src = pkgs.runCommand "cardano-wallet" {} ''
27-
cp -r ${inputs.cardano-wallet-unpatched} $out
28-
chmod -R +w $out
29-
cd $out
30-
patch -p1 -i ${./cardano-wallet--enable-aarch64-darwin.patch}
31-
patch -p1 -i ${./cardano-wallet--expose-windowsPackages.patch}
32-
patch -p1 -i ${./cardano-wallet--proper-runtimeNodePkgs.patch}
33-
'';
34-
}).defaultNix // {
35-
inherit (inputs.cardano-wallet-unpatched) rev shortRev sourceInfo;
36-
};
24+
flake-compat = import inputs.flake-compat;
25+
26+
walletFlake = let
27+
unpatched = inputs.cardano-wallet-unpatched;
28+
in (flake-compat {
29+
src = {
30+
outPath = toString (pkgs.runCommand "source" {} ''
31+
cp -r ${unpatched} $out
32+
chmod -R +w $out
33+
cd $out
34+
patch -p1 -i ${./cardano-wallet--enable-aarch64-darwin.patch}
35+
patch -p1 -i ${./cardano-wallet--expose-windowsPackages.patch}
36+
'');
37+
inherit (unpatched) rev shortRev lastModified lastModifiedDate;
38+
};
39+
}).defaultNix;
40+
41+
nodeFlake = let
42+
unpatched = walletFlake.inputs.cardano-node-runtime;
43+
in (flake-compat {
44+
src = {
45+
outPath = toString (pkgs.runCommand "source" {} ''
46+
cp -r ${unpatched} $out
47+
chmod -R +w $out
48+
cd $out
49+
cp ${walletFlake}/nix/supported-systems.nix $out/nix/supported-systems.nix
50+
'');
51+
inherit (unpatched.sourceInfo) rev shortRev lastModified lastModifiedDate;
52+
};
53+
}).defaultNix;
54+
3755
walletPackages = {
3856
x86_64-windows = walletFlake.packages.x86_64-linux.windowsPackages;
3957
x86_64-linux = walletFlake.packages.x86_64-linux;
4058
x86_64-darwin = walletFlake.packages.x86_64-darwin;
4159
aarch64-darwin = walletFlake.packages.aarch64-darwin;
4260
}.${target};
43-
cardanoWorldFlake = (import inputs.flake-compat { src = inputs.cardano-world; }).defaultNix.outputs;
61+
62+
nodePackages = {
63+
x86_64-windows = nodeFlake.legacyPackages.x86_64-linux.hydraJobs.windows; # a bug in ${cardano-node}/flake.nix
64+
x86_64-linux = nodeFlake.packages.x86_64-linux;
65+
x86_64-darwin = nodeFlake.packages.x86_64-darwin;
66+
aarch64-darwin = nodeFlake.packages.aarch64-darwin;
67+
}.${target};
68+
69+
cardanoWorldFlake = (flake-compat { src = inputs.cardano-world; }).defaultNix.outputs;
4470
crossSystem = {
4571
x86_64-windows = pkgs.lib.systems.examples.mingwW64;
4672
}.${target} or null;
@@ -50,7 +76,7 @@ let
5076
ostable.aarch64-darwin = "macos64-arm";
5177

5278
packages = self: {
53-
inherit walletFlake cardanoWorldFlake cluster pkgs target;
79+
inherit walletFlake nodeFlake cardanoWorldFlake cluster pkgs target;
5480
inherit (walletFlake.legacyPackages.${system}.pkgs) cardanoLib;
5581
daedalus-bridge = self.callPackage ./cardano-bridge.nix {};
5682

@@ -59,10 +85,10 @@ let
5985
inherit (walletPackages) mock-token-metadata-server;
6086
cardano-shell = import inputs.cardano-shell { inherit system crossSystem; };
6187
local-cluster = if cluster == "selfnode" then walletPackages.local-cluster else null;
62-
cardano-node = walletPackages.cardano-node;
63-
cardanoNodeVersion = self.cardano-node.version + "-" + builtins.substring 0 9 walletFlake.inputs.cardano-node-1_35_4.rev;
88+
cardano-node = nodePackages.cardano-node;
89+
cardanoNodeVersion = self.cardano-node.identifier.version + "-" + builtins.substring 0 9 nodeFlake.rev;
6490
cardanoWalletVersion = self.daedalus-bridge.wallet-version + "-" + builtins.substring 0 9 walletFlake.rev;
65-
cardano-cli = walletPackages.cardano-cli;
91+
cardano-cli = nodePackages.cardano-cli;
6692

6793
launcherConfigs = self.callPackage ./launcher-config.nix {
6894
inherit devShell system;

0 commit comments

Comments
 (0)