From fc381ddcf9fe3de4842acb0fc5f645965128863e Mon Sep 17 00:00:00 2001 From: Johannes Lund Date: Tue, 25 Aug 2020 10:08:38 +0200 Subject: [PATCH 1/3] Bump cardano-addresses Bump includes: - [Increase default mnemonic phrase length](https://github.com/input-output-hk/cardano-addresses/pull/53) - [Allow to inspect reward accounts wrt #46](https://github.com/input-output-hk/cardano-addresses/pull/56) - [Allow to generate stake addresses #58](https://github.com/input-output-hk/cardano-addresses/pull/58) - [Make 'payment' subcommand generate testnet hrp, wrt #55](https://github.com/input-output-hk/cardano-addresses/pull/59) --- lib/cli/cardano-wallet-cli.cabal | 1 + nix/.stack.nix/default.nix | 1 - stack.yaml | 5 ++++- 3 files changed, 5 insertions(+), 2 deletions(-) diff --git a/lib/cli/cardano-wallet-cli.cabal b/lib/cli/cardano-wallet-cli.cabal index a10a5e9e60a..05b311ac58e 100644 --- a/lib/cli/cardano-wallet-cli.cabal +++ b/lib/cli/cardano-wallet-cli.cabal @@ -35,6 +35,7 @@ library , base , bytestring , cardano-addresses + , cardano-addresses-cli , cardano-wallet-core , contra-tracer , directory diff --git a/nix/.stack.nix/default.nix b/nix/.stack.nix/default.nix index 059583e1a7b..0e117d0c878 100644 --- a/nix/.stack.nix/default.nix +++ b/nix/.stack.nix/default.nix @@ -78,7 +78,6 @@ persistent = ./persistent.nix; persistent-sqlite = ./persistent-sqlite.nix; persistent-template = ./persistent-template.nix; - cardano-addresses = ./cardano-addresses.nix; cardano-transactions = ./cardano-transactions.nix; cardano-binary = ./cardano-binary.nix; cardano-binary-test = ./cardano-binary-test.nix; diff --git a/stack.yaml b/stack.yaml index 712a5f89cc6..fff47cc7934 100644 --- a/stack.yaml +++ b/stack.yaml @@ -40,7 +40,10 @@ extra-deps: - persistent-template - git: https://github.com/input-output-hk/cardano-addresses - commit: 3f11638847bfc8c457dc4bb080c63e5d6de806ee + commit: 618bac90810fee7be324ee70428d9fb31e30abbd + subdirs: + - command-line + - core # Not strictly a dependency at present, but building it here to get # access to the cardano-tx cli. From 8bbf3eccf70ce437239b11edf501c14499322bb5 Mon Sep 17 00:00:00 2001 From: IOHK Date: Tue, 25 Aug 2020 09:29:10 +0000 Subject: [PATCH 2/3] Regenerate nix --- nix/.stack.nix/cardano-addresses-cli.nix | 89 ++++++++++++++++++++++++ nix/.stack.nix/cardano-addresses.nix | 25 +------ nix/.stack.nix/cardano-wallet-cli.nix | 1 + nix/.stack.nix/default.nix | 2 + 4 files changed, 95 insertions(+), 22 deletions(-) create mode 100644 nix/.stack.nix/cardano-addresses-cli.nix diff --git a/nix/.stack.nix/cardano-addresses-cli.nix b/nix/.stack.nix/cardano-addresses-cli.nix new file mode 100644 index 00000000000..8341dd74138 --- /dev/null +++ b/nix/.stack.nix/cardano-addresses-cli.nix @@ -0,0 +1,89 @@ +{ system + , compiler + , flags + , pkgs + , hsPkgs + , pkgconfPkgs + , errorHandler + , config + , ... }: + ({ + flags = { release = false; }; + package = { + specVersion = "1.12"; + identifier = { name = "cardano-addresses-cli"; version = "1.0.0"; }; + license = "Apache-2.0"; + copyright = "2020 IOHK"; + maintainer = "operations@iohk.io"; + author = "IOHK"; + homepage = "https://github.com/input-output-hk/cardano-addresses#readme"; + url = ""; + synopsis = "Utils for constructing a command-line on top of cardano-addresses."; + description = "Please see the README on GitHub at "; + buildType = "Simple"; + isLocal = true; + }; + components = { + "library" = { + depends = [ + (hsPkgs."aeson" or (errorHandler.buildDepError "aeson")) + (hsPkgs."aeson-pretty" or (errorHandler.buildDepError "aeson-pretty")) + (hsPkgs."ansi-terminal" or (errorHandler.buildDepError "ansi-terminal")) + (hsPkgs."base" or (errorHandler.buildDepError "base")) + (hsPkgs."bech32" or (errorHandler.buildDepError "bech32")) + (hsPkgs."bech32-th" or (errorHandler.buildDepError "bech32-th")) + (hsPkgs."bytestring" or (errorHandler.buildDepError "bytestring")) + (hsPkgs."cardano-addresses" or (errorHandler.buildDepError "cardano-addresses")) + (hsPkgs."cardano-crypto" or (errorHandler.buildDepError "cardano-crypto")) + (hsPkgs."code-page" or (errorHandler.buildDepError "code-page")) + (hsPkgs."extra" or (errorHandler.buildDepError "extra")) + (hsPkgs."fmt" or (errorHandler.buildDepError "fmt")) + (hsPkgs."mtl" or (errorHandler.buildDepError "mtl")) + (hsPkgs."optparse-applicative" or (errorHandler.buildDepError "optparse-applicative")) + (hsPkgs."safe" or (errorHandler.buildDepError "safe")) + (hsPkgs."text" or (errorHandler.buildDepError "text")) + ]; + buildable = true; + }; + exes = { + "cardano-address" = { + depends = [ + (hsPkgs."base" or (errorHandler.buildDepError "base")) + (hsPkgs."cardano-addresses-cli" or (errorHandler.buildDepError "cardano-addresses-cli")) + ]; + buildable = true; + }; + }; + tests = { + "unit" = { + depends = [ + (hsPkgs."QuickCheck" or (errorHandler.buildDepError "QuickCheck")) + (hsPkgs."base" or (errorHandler.buildDepError "base")) + (hsPkgs."bech32" or (errorHandler.buildDepError "bech32")) + (hsPkgs."bech32-th" or (errorHandler.buildDepError "bech32-th")) + (hsPkgs."bytestring" or (errorHandler.buildDepError "bytestring")) + (hsPkgs."cardano-addresses" or (errorHandler.buildDepError "cardano-addresses")) + (hsPkgs."cardano-addresses-cli" or (errorHandler.buildDepError "cardano-addresses-cli")) + (hsPkgs."containers" or (errorHandler.buildDepError "containers")) + (hsPkgs."hspec" or (errorHandler.buildDepError "hspec")) + (hsPkgs."memory" or (errorHandler.buildDepError "memory")) + (hsPkgs."process" or (errorHandler.buildDepError "process")) + (hsPkgs."temporary" or (errorHandler.buildDepError "temporary")) + (hsPkgs."text" or (errorHandler.buildDepError "text")) + ]; + build-tools = [ + (hsPkgs.buildPackages.hspec-discover or (pkgs.buildPackages.hspec-discover or (errorHandler.buildToolDepError "hspec-discover"))) + (hsPkgs.buildPackages.cardano-address or (pkgs.buildPackages.cardano-address or (errorHandler.buildToolDepError "cardano-address"))) + ]; + buildable = true; + }; + }; + }; + } // { + src = (pkgs.lib).mkDefault (pkgs.fetchgit { + url = "https://github.com/input-output-hk/cardano-addresses"; + rev = "618bac90810fee7be324ee70428d9fb31e30abbd"; + sha256 = "1hvf8w9kz01jqggmizgy9scwf45rj78dh2np4qpgxcpgmin6ah58"; + }); + postUnpack = "sourceRoot+=/command-line; echo source root reset to \$sourceRoot"; + }) // { cabal-generator = "hpack"; } \ No newline at end of file diff --git a/nix/.stack.nix/cardano-addresses.nix b/nix/.stack.nix/cardano-addresses.nix index 0ebca29fe10..582f0351c12 100644 --- a/nix/.stack.nix/cardano-addresses.nix +++ b/nix/.stack.nix/cardano-addresses.nix @@ -27,8 +27,6 @@ "library" = { depends = [ (hsPkgs."aeson" or (errorHandler.buildDepError "aeson")) - (hsPkgs."aeson-pretty" or (errorHandler.buildDepError "aeson-pretty")) - (hsPkgs."ansi-terminal" or (errorHandler.buildDepError "ansi-terminal")) (hsPkgs."base" or (errorHandler.buildDepError "base")) (hsPkgs."base58-bytestring" or (errorHandler.buildDepError "base58-bytestring")) (hsPkgs."basement" or (errorHandler.buildDepError "basement")) @@ -38,7 +36,6 @@ (hsPkgs."bytestring" or (errorHandler.buildDepError "bytestring")) (hsPkgs."cardano-crypto" or (errorHandler.buildDepError "cardano-crypto")) (hsPkgs."cborg" or (errorHandler.buildDepError "cborg")) - (hsPkgs."code-page" or (errorHandler.buildDepError "code-page")) (hsPkgs."cryptonite" or (errorHandler.buildDepError "cryptonite")) (hsPkgs."deepseq" or (errorHandler.buildDepError "deepseq")) (hsPkgs."digest" or (errorHandler.buildDepError "digest")) @@ -46,43 +43,26 @@ (hsPkgs."extra" or (errorHandler.buildDepError "extra")) (hsPkgs."fmt" or (errorHandler.buildDepError "fmt")) (hsPkgs."memory" or (errorHandler.buildDepError "memory")) - (hsPkgs."optparse-applicative" or (errorHandler.buildDepError "optparse-applicative")) - (hsPkgs."safe" or (errorHandler.buildDepError "safe")) (hsPkgs."text" or (errorHandler.buildDepError "text")) ]; buildable = true; }; - exes = { - "cardano-address" = { - depends = [ - (hsPkgs."base" or (errorHandler.buildDepError "base")) - (hsPkgs."cardano-addresses" or (errorHandler.buildDepError "cardano-addresses")) - ]; - buildable = true; - }; - }; tests = { "unit" = { depends = [ (hsPkgs."QuickCheck" or (errorHandler.buildDepError "QuickCheck")) (hsPkgs."base" or (errorHandler.buildDepError "base")) - (hsPkgs."base58-bytestring" or (errorHandler.buildDepError "base58-bytestring")) (hsPkgs."bech32" or (errorHandler.buildDepError "bech32")) - (hsPkgs."bech32-th" or (errorHandler.buildDepError "bech32-th")) (hsPkgs."binary" or (errorHandler.buildDepError "binary")) (hsPkgs."bytestring" or (errorHandler.buildDepError "bytestring")) (hsPkgs."cardano-addresses" or (errorHandler.buildDepError "cardano-addresses")) (hsPkgs."cardano-crypto" or (errorHandler.buildDepError "cardano-crypto")) - (hsPkgs."containers" or (errorHandler.buildDepError "containers")) (hsPkgs."hspec" or (errorHandler.buildDepError "hspec")) (hsPkgs."memory" or (errorHandler.buildDepError "memory")) - (hsPkgs."process" or (errorHandler.buildDepError "process")) - (hsPkgs."temporary" or (errorHandler.buildDepError "temporary")) (hsPkgs."text" or (errorHandler.buildDepError "text")) ]; build-tools = [ (hsPkgs.buildPackages.hspec-discover or (pkgs.buildPackages.hspec-discover or (errorHandler.buildToolDepError "hspec-discover"))) - (hsPkgs.buildPackages.cardano-address or (pkgs.buildPackages.cardano-address or (errorHandler.buildToolDepError "cardano-address"))) ]; buildable = true; }; @@ -91,7 +71,8 @@ } // { src = (pkgs.lib).mkDefault (pkgs.fetchgit { url = "https://github.com/input-output-hk/cardano-addresses"; - rev = "3f11638847bfc8c457dc4bb080c63e5d6de806ee"; - sha256 = "1hvs3p6yanfdr512csa3v822y3846r2hmwb7njr83s3w7dpgzj9n"; + rev = "618bac90810fee7be324ee70428d9fb31e30abbd"; + sha256 = "1hvf8w9kz01jqggmizgy9scwf45rj78dh2np4qpgxcpgmin6ah58"; }); + postUnpack = "sourceRoot+=/core; echo source root reset to \$sourceRoot"; }) // { cabal-generator = "hpack"; } \ No newline at end of file diff --git a/nix/.stack.nix/cardano-wallet-cli.nix b/nix/.stack.nix/cardano-wallet-cli.nix index 5379013be73..ed3ac74bb00 100644 --- a/nix/.stack.nix/cardano-wallet-cli.nix +++ b/nix/.stack.nix/cardano-wallet-cli.nix @@ -32,6 +32,7 @@ (hsPkgs."base" or (errorHandler.buildDepError "base")) (hsPkgs."bytestring" or (errorHandler.buildDepError "bytestring")) (hsPkgs."cardano-addresses" or (errorHandler.buildDepError "cardano-addresses")) + (hsPkgs."cardano-addresses-cli" or (errorHandler.buildDepError "cardano-addresses-cli")) (hsPkgs."cardano-wallet-core" or (errorHandler.buildDepError "cardano-wallet-core")) (hsPkgs."contra-tracer" or (errorHandler.buildDepError "contra-tracer")) (hsPkgs."directory" or (errorHandler.buildDepError "directory")) diff --git a/nix/.stack.nix/default.nix b/nix/.stack.nix/default.nix index 0e117d0c878..15005c767b2 100644 --- a/nix/.stack.nix/default.nix +++ b/nix/.stack.nix/default.nix @@ -78,6 +78,8 @@ persistent = ./persistent.nix; persistent-sqlite = ./persistent-sqlite.nix; persistent-template = ./persistent-template.nix; + cardano-addresses-cli = ./cardano-addresses-cli.nix; + cardano-addresses = ./cardano-addresses.nix; cardano-transactions = ./cardano-transactions.nix; cardano-binary = ./cardano-binary.nix; cardano-binary-test = ./cardano-binary-test.nix; From 017e5c45abec25a15979e6723d773cd05884fc9b Mon Sep 17 00:00:00 2001 From: Rodney Lorrimar Date: Tue, 25 Aug 2020 20:29:30 +1000 Subject: [PATCH 3/3] nix: update cardano-address package names --- default.nix | 2 +- nix/haskell.nix | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/default.nix b/default.nix index 5a831c2bc43..ce7f68ff01a 100644 --- a/default.nix +++ b/default.nix @@ -83,7 +83,7 @@ let inherit (haskellPackages.ouroboros-consensus-byron.components.exes) db-converter; # adrestia tool belt inherit (haskellPackages.bech32.components.exes) bech32; - inherit (haskellPackages.cardano-addresses.components.exes) cardano-address; + inherit (haskellPackages.cardano-addresses-cli.components.exes) cardano-address; inherit (haskellPackages.cardano-transactions.components.exes) cardano-tx; cardano-wallet-jormungandr = import ./nix/package-jormungandr.nix { diff --git a/nix/haskell.nix b/nix/haskell.nix index 8d5975c831b..4d1667f1216 100644 --- a/nix/haskell.nix +++ b/nix/haskell.nix @@ -136,7 +136,7 @@ let # Add shell completions for tools. packages.cardano-node.components.exes.cardano-cli.postInstall = optparseCompletionPostInstall + libSodiumPostInstall; packages.cardano-node.components.exes.cardano-node.postInstall = optparseCompletionPostInstall + libSodiumPostInstall; - packages.cardano-addresses.components.exes.cardano-address.postInstall = optparseCompletionPostInstall; + packages.cardano-addresses-cli.components.exes.cardano-address.postInstall = optparseCompletionPostInstall; packages.cardano-transactions.components.exes.cardano-tx.postInstall = optparseCompletionPostInstall; packages.bech32.components.exes.bech32.postInstall = optparseCompletionPostInstall; }