From fd10a13538d851187e83bd0a344f2de6bb6a702a Mon Sep 17 00:00:00 2001 From: Nikola Glumac Date: Mon, 24 Feb 2020 10:57:01 +0100 Subject: [PATCH 1/5] Bump cardano-wallet revision --- CHANGELOG.md | 1 + nix/sources.json | 6 +++--- 2 files changed, 4 insertions(+), 3 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 378d2612b1..d7e96e5483 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -17,6 +17,7 @@ Changelog - Implemented acceptance tests for wallet delegation ([PR 1814](https://github.com/input-output-hk/daedalus/pull/1814)) - Improved loading state of the "Stake pools" screen ([PR 1814](https://github.com/input-output-hk/daedalus/pull/1814)) - Updated `cardano-wallet` to version `2020-02-17` ([PR 1856](https://github.com/input-output-hk/daedalus/pull/1856)) +- Updated `cardano-wallet` to revision `5439e692` ([PR 1862](https://github.com/input-output-hk/daedalus/pull/1862)) ## 2.1.0-ITN1 diff --git a/nix/sources.json b/nix/sources.json index 121a750f10..fa0a33ddff 100644 --- a/nix/sources.json +++ b/nix/sources.json @@ -29,10 +29,10 @@ "homepage": null, "owner": "input-output-hk", "repo": "cardano-wallet", - "rev": "fb516756e2429daa83542e6e0d95a61c0ff53dc4", - "sha256": "0qcw3a6fy5g6ai3xml6ngwi3vrsmyznpc0n36y94k3jm9ni2k1s2", + "rev": "5439e69248d1b6763ff2dc6f08a0e3420211d42e", + "sha256": "09jhp2fgfngk4b6zydipvkwn6hvay33a9x5ilybk08cr8jqshgfm", "type": "tarball", - "url": "https://github.com/input-output-hk/cardano-wallet/archive/fb516756e2429daa83542e6e0d95a61c0ff53dc4.tar.gz", + "url": "https://github.com/input-output-hk/cardano-wallet/archive/5439e69248d1b6763ff2dc6f08a0e3420211d42e.tar.gz", "url_template": "https://github.com///archive/.tar.gz", "version": "v2020-02-17" }, From d042be7628904a763fa583aee0b930efef13e898 Mon Sep 17 00:00:00 2001 From: Nikola Glumac Date: Mon, 24 Feb 2020 17:13:43 +0100 Subject: [PATCH 2/5] Update cardano-wallet revision to the one which includes Windows CI build fix --- CHANGELOG.md | 2 +- nix/sources.json | 6 +++--- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index d7e96e5483..4a3a5a4b1f 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -17,7 +17,7 @@ Changelog - Implemented acceptance tests for wallet delegation ([PR 1814](https://github.com/input-output-hk/daedalus/pull/1814)) - Improved loading state of the "Stake pools" screen ([PR 1814](https://github.com/input-output-hk/daedalus/pull/1814)) - Updated `cardano-wallet` to version `2020-02-17` ([PR 1856](https://github.com/input-output-hk/daedalus/pull/1856)) -- Updated `cardano-wallet` to revision `5439e692` ([PR 1862](https://github.com/input-output-hk/daedalus/pull/1862)) +- Updated `cardano-wallet` to revision `573a7038` ([PR 1862](https://github.com/input-output-hk/daedalus/pull/1862)) ## 2.1.0-ITN1 diff --git a/nix/sources.json b/nix/sources.json index fa0a33ddff..c83a707b73 100644 --- a/nix/sources.json +++ b/nix/sources.json @@ -29,10 +29,10 @@ "homepage": null, "owner": "input-output-hk", "repo": "cardano-wallet", - "rev": "5439e69248d1b6763ff2dc6f08a0e3420211d42e", - "sha256": "09jhp2fgfngk4b6zydipvkwn6hvay33a9x5ilybk08cr8jqshgfm", + "rev": "573a7038c87fcd77b567ab021017622e9982a4a7", + "sha256": "1yfgjzfvw3ggkh9cg62a7xmb6zy8if149cx066b9vrla5rqk5mnm", "type": "tarball", - "url": "https://github.com/input-output-hk/cardano-wallet/archive/5439e69248d1b6763ff2dc6f08a0e3420211d42e.tar.gz", + "url": "https://github.com/input-output-hk/cardano-wallet/archive/573a7038c87fcd77b567ab021017622e9982a4a7.tar.gz", "url_template": "https://github.com///archive/.tar.gz", "version": "v2020-02-17" }, From 6d49eac520a594cf1e62d9c25ea555a4bdb4dc53 Mon Sep 17 00:00:00 2001 From: Michael Bishop Date: Mon, 24 Feb 2020 20:15:38 -0400 Subject: [PATCH 3/5] use the right lib for crossSystem --- default.nix | 22 ++++++++++++---------- 1 file changed, 12 insertions(+), 10 deletions(-) diff --git a/default.nix b/default.nix index 748b367c02..236796b107 100644 --- a/default.nix +++ b/default.nix @@ -16,16 +16,18 @@ let systemTable = { x86_64-windows = builtins.currentSystem; }; - crossSystemTable = { + crossSystemTable = lib: { x86_64-windows = lib.systems.examples.mingwW64; }; system = systemTable.${target} or target; pkgs = localLib.iohkNix.getPkgsDefault { inherit system config; }; - crossSystem = crossSystemTable.${target} or null; + sources = localLib.sources; + walletPkgs = import (import "${sources.cardano-wallet}/nix/sources.nix").nixpkgs {}; + inherit (pkgs.lib) optionalString optional; + crossSystem = lib: (crossSystemTable.${target} or (x: null)) lib; # TODO, nsis cant cross-compile with the nixpkgs daedalus currently uses nsisNixPkgs = import localLib.sources.nixpkgs-nsis {}; installPath = ".daedalus"; - lib = pkgs.lib; cardanoSL = localLib.cardanoSL { inherit target; }; needSignedBinaries = (signingKeys != null) || (HSMServer != null); buildNumSuffix = if buildNum == null then "" else ("-${builtins.toString buildNum}"); @@ -43,8 +45,8 @@ let bridgeTable = { jormungandr = self.callPackage ./nix/jormungandr-bridge.nix {}; }; - cardano-wallet = import self.sources.cardano-wallet { inherit system crossSystem; gitrev = self.sources.cardano-wallet.rev; }; - cardano-shell = import self.sources.cardano-shell { inherit system crossSystem; }; + cardano-wallet = import self.sources.cardano-wallet { inherit system; gitrev = self.sources.cardano-wallet.rev; crossSystem = crossSystem walletPkgs.lib; }; + cardano-shell = import self.sources.cardano-shell { inherit system; crossSystem = crossSystem pkgs.lib; }; # a cross-compiled fastlist for the ps-list package fastlist = pkgs.pkgsCross.mingwW64.callPackage ./nix/fastlist.nix {}; @@ -147,13 +149,13 @@ let cp $installerConfigPath installer-config.json export LANG=en_US.UTF-8 - make-installer --os win64 -o $out --cluster ${cluster} ${lib.optionalString (buildNum != null) "--build-job ${buildNum}"} buildkite-cross + make-installer --os win64 -o $out --cluster ${cluster} ${optionalString (buildNum != null) "--build-job ${buildNum}"} buildkite-cross mkdir $out cp daedalus.nsi uninstaller.nsi $out/ cp $launcherConfigPath $out/launcher-config.yaml - ${lib.optionalString self.launcherConfigs.installerConfig.hasBlock0 "cp ${self.launcherConfigs.installerConfig.block0} $out/block-0.bin"} - ${lib.optionalString (cluster != "selfnode") "cp ${self.launcherConfigs.jormungandr-config} $out/jormungandr-config.yaml"} + ${optionalString self.launcherConfigs.installerConfig.hasBlock0 "cp ${self.launcherConfigs.installerConfig.block0} $out/block-0.bin"} + ${optionalString (cluster != "selfnode") "cp ${self.launcherConfigs.jormungandr-config} $out/jormungandr-config.yaml"} ''; unsignedUninstaller = pkgs.runCommand "uninstaller" { buildInputs = [ self.nsis self.wine ]; } '' @@ -189,7 +191,7 @@ let in pkgs.runCommand "win64-installer-${cluster}" { buildInputs = [ self.daedalus-installer self.nsis pkgs.unzip pkgs.jq self.yaml2json - ] ++ lib.optional (fudgeConfig != null) self.configMutator; + ] ++ optional (fudgeConfig != null) self.configMutator; } '' echo '~~~ Preparing files for installer' mkdir home @@ -223,7 +225,7 @@ let fi cp -v ${./utils/jormungandr/selfnode/genesis.yaml} genesis.yaml chmod -R +w . - ${lib.optionalString (fudgeConfig != null) '' + ${optionalString (fudgeConfig != null) '' set -x KEY=$(yaml2json launcher-config.yaml | jq .configuration.key -r) config-mutator configuration.yaml ''${KEY} ${toString fudgeConfig.applicationVersion} > temp From 3ce679a23bdb5a4e8264ac07fae1aca5271161a0 Mon Sep 17 00:00:00 2001 From: Michael Bishop Date: Mon, 24 Feb 2020 20:59:08 -0400 Subject: [PATCH 4/5] and fix libffi --- default.nix | 3 ++- nix/jormungandr-bridge.nix | 2 +- 2 files changed, 3 insertions(+), 2 deletions(-) diff --git a/default.nix b/default.nix index 236796b107..517973e2ed 100644 --- a/default.nix +++ b/default.nix @@ -23,6 +23,7 @@ let pkgs = localLib.iohkNix.getPkgsDefault { inherit system config; }; sources = localLib.sources; walletPkgs = import (import "${sources.cardano-wallet}/nix/sources.nix").nixpkgs {}; + shellPkgs = import (import "${sources.cardano-shell}/nix/sources.nix").nixpkgs {}; inherit (pkgs.lib) optionalString optional; crossSystem = lib: (crossSystemTable.${target} or (x: null)) lib; # TODO, nsis cant cross-compile with the nixpkgs daedalus currently uses @@ -46,7 +47,7 @@ let jormungandr = self.callPackage ./nix/jormungandr-bridge.nix {}; }; cardano-wallet = import self.sources.cardano-wallet { inherit system; gitrev = self.sources.cardano-wallet.rev; crossSystem = crossSystem walletPkgs.lib; }; - cardano-shell = import self.sources.cardano-shell { inherit system; crossSystem = crossSystem pkgs.lib; }; + cardano-shell = import self.sources.cardano-shell { inherit system; crossSystem = crossSystem shellPkgs.lib; }; # a cross-compiled fastlist for the ps-list package fastlist = pkgs.pkgsCross.mingwW64.callPackage ./nix/fastlist.nix {}; diff --git a/nix/jormungandr-bridge.nix b/nix/jormungandr-bridge.nix index ac87c1653b..22afae1070 100644 --- a/nix/jormungandr-bridge.nix +++ b/nix/jormungandr-bridge.nix @@ -2,7 +2,7 @@ let commonLib = import ../lib.nix {}; - pkgsCross = import cardano-wallet.pkgs.path { crossSystem = pkgs.lib.systems.examples.mingwW64; config = {}; overlays = []; }; + pkgsCross = import cardano-wallet.pkgs.path { crossSystem = cardano-wallet.pkgs.lib.systems.examples.mingwW64; config = {}; overlays = []; }; in pkgs.runCommandCC "daedalus-bridge" { passthru = { node-version = cardano-wallet.jormungandr.version; From 3e7195f188995a66737135a80cf110a4674b6968 Mon Sep 17 00:00:00 2001 From: Michael Bishop Date: Mon, 24 Feb 2020 21:12:48 -0400 Subject: [PATCH 5/5] fix crossSystem typo and cardano-shell --- default.nix | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/default.nix b/default.nix index 517973e2ed..e071e1464e 100644 --- a/default.nix +++ b/default.nix @@ -22,10 +22,10 @@ let system = systemTable.${target} or target; pkgs = localLib.iohkNix.getPkgsDefault { inherit system config; }; sources = localLib.sources; - walletPkgs = import (import "${sources.cardano-wallet}/nix/sources.nix").nixpkgs {}; - shellPkgs = import (import "${sources.cardano-shell}/nix/sources.nix").nixpkgs {}; + walletPkgs = import "${sources.cardano-wallet}/nix" {}; + shellPkgs = (import "${sources.cardano-shell}/nix/iohk-common.nix").getPkgs {}; inherit (pkgs.lib) optionalString optional; - crossSystem = lib: (crossSystemTable.${target} or (x: null)) lib; + crossSystem = lib: (crossSystemTable lib).${target} or null; # TODO, nsis cant cross-compile with the nixpkgs daedalus currently uses nsisNixPkgs = import localLib.sources.nixpkgs-nsis {}; installPath = ".daedalus";