Skip to content

Commit 62d6332

Browse files
author
Marcin Mazurek
authored
Merge pull request #3104 from input-output-hk/chore/ddw-1189-new-cardano-wallet-flake
[DDW-1209, DDW-1189] Daedalus Node/Wallet bump – 1.35.4 / v2023-04-14
2 parents d3cfbfb + b08d041 commit 62d6332

10 files changed

+86
-40
lines changed

CHANGELOG.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,7 @@
88

99
### Chores
1010

11+
- Update `cardano-wallet` to `v2023-04-14` ([PR 3104](https://github.com/input-output-hk/daedalus/pull/3104))
1112
- Prepared an official `aarch64-darwin` build ([PR 3116](https://github.com/input-output-hk/daedalus/pull/3116))
1213
- Added regeneration of dev TLS certificates for cardano-wallet on each nix-shell entry ([PR 3117](https://github.com/input-output-hk/daedalus/pull/3117))
1314
- Updated `@cardano-foundation/ledgerjs-hw-app-cardano` to version `6.0.0` ([PR 3093](https://github.com/input-output-hk/daedalus/pull/3093))

default.nix

Lines changed: 13 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -33,24 +33,23 @@ let
3333
};
3434
pkgs = import sources.nixpkgs { inherit system config; };
3535
sources = localLib.sources // {
36-
cardano-wallet =
37-
if target != "aarch64-darwin"
38-
then localLib.sources.cardano-wallet
39-
else pkgs.runCommand "cardano-wallet" {} ''
40-
cp -r ${localLib.sources.cardano-wallet} $out
41-
chmod -R +w $out
42-
cd $out
43-
patch -p1 -i ${./nix/cardano-wallet--enable-aarch64-darwin.patch}
44-
'';
36+
cardano-wallet = pkgs.runCommand "cardano-wallet" {} ''
37+
cp -r ${localLib.sources.cardano-wallet} $out
38+
chmod -R +w $out
39+
cd $out
40+
patch -p1 -i ${./nix/cardano-wallet--enable-aarch64-darwin.patch}
41+
patch -p1 -i ${./nix/cardano-wallet--expose-windowsPackages.patch}
42+
patch -p1 -i ${./nix/cardano-wallet--proper-runtimeNodePkgs.patch}
43+
'';
4544
};
4645
haskell-nix = walletFlake.inputs.haskellNix.legacyPackages.${system}.haskell-nix;
4746
flake-compat = import sources.flake-compat;
4847
walletFlake = (flake-compat { src = sources.cardano-wallet; }).defaultNix;
49-
walletPackages = with walletFlake.hydraJobs; {
50-
x86_64-windows = linux.windows;
51-
x86_64-linux = linux.native;
52-
x86_64-darwin = macos.intel;
53-
aarch64-darwin = macos.silicon;
48+
walletPackages = {
49+
x86_64-windows = walletFlake.packages.x86_64-linux.windowsPackages;
50+
x86_64-linux = walletFlake.packages.x86_64-linux;
51+
x86_64-darwin = walletFlake.packages.x86_64-darwin;
52+
aarch64-darwin = walletFlake.packages.aarch64-darwin;
5453
}.${target};
5554
walletPkgs = walletFlake.legacyPackages.${system}.pkgs;
5655
cardanoWorldFlake = (flake-compat { src = sources.cardano-world; }).defaultNix.outputs;

installers/common/MacInstaller.hs

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -35,6 +35,7 @@ import Config
3535
import RewriteLibs (chain)
3636
import Types
3737
import Util (exportBuildVars, rewritePackageJson)
38+
import qualified Control.Foldl as Fold
3839

3940
data DarwinConfig = DarwinConfig {
4041
dcAppNameApp :: Text -- ^ Daedalus.app for example
@@ -394,6 +395,10 @@ makeComponentRoot Options{oBackend,oCluster} appRoot darwinConfig@DarwinConfig{d
394395

395396
procs "chmod" ["-R", "+w", tt dir] empty
396397

398+
dylibs <- Turtle.fold (Turtle.find (Turtle.suffix ".dylib") (bridge </> "bin")) Fold.list
399+
forM_ dylibs $ \f ->
400+
cp f (dir </> filename f)
401+
397402
rmtree $ dataDir </> "app/installers"
398403

399404
-- Rewrite libs paths and bundle them

installers/common/WindowsInstaller.hs

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -226,7 +226,10 @@ writeInstallerNSIS outName (Version fullVersion') InstallerConfig{installDirecto
226226
file [] "genesis-shelley.json"
227227
file [] "genesis-alonzo.json"
228228
file [] "libsodium-23.dll"
229+
file [] "libsecp256k1-1.dll"
229230
file [] "libsecp256k1-0.dll"
231+
file [] "libssl-3-x64.dll"
232+
file [] "libcrypto-3-x64.dll"
230233
when (clusterName == Selfnode) $ do
231234
file [] "signing.key"
232235
file [] "delegation.cert"

installers/daedalus-installer.cabal

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -29,6 +29,7 @@ library
2929
, unordered-containers
3030
, containers
3131
, directory
32+
, foldl
3233
, github
3334
, lens-aeson
3435
, megaparsec

nix/cardano-bridge.nix

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@ runCommandCC "daedalus-cardano-bridge" {
1212
cp ${cardano-wallet}/bin/* .
1313
cp -f ${cardano-address}/bin/cardano-address* .
1414
cp -f ${cardano-shell.haskellPackages.cardano-launcher.components.exes.cardano-launcher}/bin/* .
15-
cp -f ${cardano-node}/bin/cardano-node* .
15+
cp -f ${cardano-node}/bin/* .
1616
cp -f ${cardano-cli}/bin/cardano-cli* .
1717
${lib.optionalString (local-cluster != null) ''
1818

nix/cardano-wallet--enable-aarch64-darwin.patch

Lines changed: 1 addition & 21 deletions
Original file line numberDiff line numberDiff line change
@@ -1,25 +1,5 @@
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-
}
211
diff --git a/nix/supported-systems.nix b/nix/supported-systems.nix
22-
index 6e3f0d94e..5de7138b3 100644
2+
index 6e3f0d94e3..5de7138b32 100644
233
--- a/nix/supported-systems.nix
244
+++ b/nix/supported-systems.nix
255
@@ -1,6 +1,5 @@
Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,12 @@
1+
diff --git a/flake.nix b/flake.nix
2+
index af206a740e..ef05414b85 100644
3+
--- a/flake.nix
4+
+++ b/flake.nix
5+
@@ -432,6 +432,7 @@
6+
nixosTests = import ./nix/nixos/tests {
7+
inherit pkgs project;
8+
};
9+
+ windowsPackages = mkPackages project.projectCross.mingwW64;
10+
}) // {
11+
# Continuous integration builds
12+
ci.tests.all = pkgs.releaseTools.aggregate {
Lines changed: 45 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,45 @@
1+
diff --git a/flake.nix b/flake.nix
2+
index af206a740e..dd6d6377e3 100644
3+
--- a/flake.nix
4+
+++ b/flake.nix
5+
@@ -217,7 +217,15 @@
6+
collectChecks
7+
check;
8+
9+
- nodePkgs = cardano-node-1_35_4.packages.${system};
10+
+ cardano-node-1_35_4-patched = (import ./nix/flake-compat.nix {
11+
+ src = pkgs.runCommandLocal "patched-cardano-node" {} ''
12+
+ cp -r ${cardano-node-1_35_4.outPath} $out
13+
+ chmod -R +w $out
14+
+ cat ${./nix/supported-systems.nix} >$out/nix/supported-systems.nix
15+
+ '';
16+
+ }).defaultNix;
17+
+
18+
+ nodePkgs = cardano-node-1_35_4-patched.packages.${system};
19+
20+
project = (import ./nix/haskell.nix
21+
CHaP
22+
@@ -235,6 +243,12 @@
23+
mkPackages = project:
24+
let
25+
coveredProject = project.appendModule { coverage = true; };
26+
+ runtimeNodePkgs = {
27+
+ x86_64-linux = cardano-node-1_35_4-patched.hydraJobs.linux.native;
28+
+ x86_64-windows = cardano-node-1_35_4-patched.hydraJobs.linux.windows;
29+
+ x86_64-darwin = cardano-node-1_35_4-patched.packages.x86_64-darwin;
30+
+ aarch64-darwin = cardano-node-1_35_4-patched.packages.aarch64-darwin;
31+
+ }.${project.pkgs.system};
32+
self = {
33+
# Cardano wallet
34+
cardano-wallet = import ./nix/release-build.nix {
35+
@@ -250,8 +264,8 @@
36+
inherit (project.hsPkgs.cardano-addresses-cli.components.exes) cardano-address;
37+
38+
# Cardano
39+
- inherit (project.hsPkgs.cardano-cli.components.exes) cardano-cli;
40+
- cardano-node = project.hsPkgs.cardano-node.components.exes.cardano-node // {
41+
+ inherit (runtimeNodePkgs) cardano-cli;
42+
+ cardano-node = runtimeNodePkgs.cardano-node // {
43+
deployments = pkgs.cardano-node-deployments;
44+
};
45+

nix/sources.json

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -24,15 +24,15 @@
2424
"url_template": "https://github.com/<owner>/<repo>/archive/<rev>.tar.gz"
2525
},
2626
"cardano-wallet": {
27-
"branch": "v2022-12-14",
27+
"branch": "v2023-04-14",
2828
"description": "Official Wallet Backend & API for Cardano decentralized",
2929
"homepage": null,
3030
"owner": "input-output-hk",
3131
"repo": "cardano-wallet",
32-
"rev": "bbf11d4feefd5b770fb36717ec5c4c5c112aca87",
33-
"sha256": "1gvxmyclarklajifbyi2l8zwc1gqhbdps73rl9if9a3mpn5xngcp",
32+
"rev": "3f9055373c272a4d7b1f9f6bacc1df3b6dc906af",
33+
"sha256": "075p3jy3fx99qfxj294cxqibh1040qn99yx75yhc8an1c2hrzbkp",
3434
"type": "tarball",
35-
"url": "https://github.com/input-output-hk/cardano-wallet/archive/bbf11d4feefd5b770fb36717ec5c4c5c112aca87.tar.gz",
35+
"url": "https://github.com/input-output-hk/cardano-wallet/archive/3f9055373c272a4d7b1f9f6bacc1df3b6dc906af.tar.gz",
3636
"url_template": "https://github.com/<owner>/<repo>/archive/<rev>.tar.gz"
3737
},
3838
"cardano-world": {

0 commit comments

Comments
 (0)