Skip to content

Commit

Permalink
Merge #84
Browse files Browse the repository at this point in the history
84: Fix warning about unlines r=craigem a=erikd



Co-authored-by: Erik de Castro Lopo <erikd@mega-nerd.com>
  • Loading branch information
iohk-bors[bot] and erikd committed Oct 13, 2019
2 parents 001ec35 + 6c95f42 commit f12a605
Show file tree
Hide file tree
Showing 7 changed files with 238 additions and 108 deletions.
125 changes: 85 additions & 40 deletions nix/.stack.nix/cardano-crypto.nix
@@ -1,4 +1,43 @@
{ system, compiler, flags, pkgs, hsPkgs, pkgconfPkgs, ... }:
let
buildDepError = pkg:
builtins.throw ''
The Haskell package set does not contain the package: ${pkg} (build dependency).
If you are using Stackage, make sure that you are using a snapshot that contains the package. Otherwise you may need to update the Hackage snapshot you are using, usually by updating haskell.nix.
'';
sysDepError = pkg:
builtins.throw ''
The Nixpkgs package set does not contain the package: ${pkg} (system dependency).
You may need to augment the system package mapping in haskell.nix so that it can be found.
'';
pkgConfDepError = pkg:
builtins.throw ''
The pkg-conf packages does not contain the package: ${pkg} (pkg-conf dependency).
You may need to augment the pkg-conf package mapping in haskell.nix so that it can be found.
'';
exeDepError = pkg:
builtins.throw ''
The local executable components do not include the component: ${pkg} (executable dependency).
'';
legacyExeDepError = pkg:
builtins.throw ''
The Haskell package set does not contain the package: ${pkg} (executable dependency).
If you are using Stackage, make sure that you are using a snapshot that contains the package. Otherwise you may need to update the Hackage snapshot you are using, usually by updating haskell.nix.
'';
buildToolDepError = pkg:
builtins.throw ''
Neither the Haskell package set or the Nixpkgs package set contain the package: ${pkg} (build tool dependency).
If this is a system dependency:
You may need to augment the system package mapping in haskell.nix so that it can be found.
If this is a Haskell dependency:
If you are using Stackage, make sure that you are using a snapshot that contains the package. Otherwise you may need to update the Hackage snapshot you are using, usually by updating haskell.nix.
'';
in { system, compiler, flags, pkgs, hsPkgs, pkgconfPkgs, ... }:
{
flags = { golden-tests = false; golden-tests-exe = false; };
package = {
Expand All @@ -13,69 +52,75 @@
synopsis = "Cryptography primitives for cardano";
description = "";
buildType = "Simple";
isLocal = true;
};
components = {
"library" = {
depends = [
(hsPkgs.base)
(hsPkgs.memory)
(hsPkgs.deepseq)
(hsPkgs.bytestring)
(hsPkgs.basement)
(hsPkgs.foundation)
(hsPkgs.cryptonite)
(hsPkgs.cryptonite-openssl)
(hsPkgs.hashable)
(hsPkgs.integer-gmp)
(hsPkgs."base" or (buildDepError "base"))
(hsPkgs."memory" or (buildDepError "memory"))
(hsPkgs."deepseq" or (buildDepError "deepseq"))
(hsPkgs."bytestring" or (buildDepError "bytestring"))
(hsPkgs."basement" or (buildDepError "basement"))
(hsPkgs."foundation" or (buildDepError "foundation"))
(hsPkgs."cryptonite" or (buildDepError "cryptonite"))
(hsPkgs."cryptonite-openssl" or (buildDepError "cryptonite-openssl"))
(hsPkgs."hashable" or (buildDepError "hashable"))
(hsPkgs."integer-gmp" or (buildDepError "integer-gmp"))
];
buildable = true;
};
exes = {
"golden-tests" = {
depends = [
(hsPkgs.base)
(hsPkgs.basement)
(hsPkgs.foundation)
(hsPkgs.memory)
(hsPkgs.bytestring)
(hsPkgs.cryptonite)
(hsPkgs.cardano-crypto)
] ++ (pkgs.lib).optional (flags.golden-tests-exe) (hsPkgs.inspector);
(hsPkgs."base" or (buildDepError "base"))
(hsPkgs."basement" or (buildDepError "basement"))
(hsPkgs."foundation" or (buildDepError "foundation"))
(hsPkgs."memory" or (buildDepError "memory"))
(hsPkgs."bytestring" or (buildDepError "bytestring"))
(hsPkgs."cryptonite" or (buildDepError "cryptonite"))
(hsPkgs."cardano-crypto" or (buildDepError "cardano-crypto"))
] ++ (pkgs.lib).optional (flags.golden-tests-exe) (hsPkgs."inspector" or (buildDepError "inspector"));
buildable = if flags.golden-tests-exe then true else false;
};
};
tests = {
"cardano-crypto-test" = {
depends = [
(hsPkgs.base)
(hsPkgs.bytestring)
(hsPkgs.memory)
(hsPkgs.cryptonite)
(hsPkgs.cardano-crypto)
(hsPkgs.basement)
(hsPkgs.foundation)
(hsPkgs."base" or (buildDepError "base"))
(hsPkgs."bytestring" or (buildDepError "bytestring"))
(hsPkgs."memory" or (buildDepError "memory"))
(hsPkgs."cryptonite" or (buildDepError "cryptonite"))
(hsPkgs."cardano-crypto" or (buildDepError "cardano-crypto"))
(hsPkgs."basement" or (buildDepError "basement"))
(hsPkgs."foundation" or (buildDepError "foundation"))
];
buildable = true;
};
"cardano-crypto-golden-tests" = {
depends = [
(hsPkgs.base)
(hsPkgs.basement)
(hsPkgs.foundation)
(hsPkgs.memory)
(hsPkgs.bytestring)
(hsPkgs.cryptonite)
(hsPkgs.cardano-crypto)
] ++ (pkgs.lib).optional (flags.golden-tests) (hsPkgs.inspector);
(hsPkgs."base" or (buildDepError "base"))
(hsPkgs."basement" or (buildDepError "basement"))
(hsPkgs."foundation" or (buildDepError "foundation"))
(hsPkgs."memory" or (buildDepError "memory"))
(hsPkgs."bytestring" or (buildDepError "bytestring"))
(hsPkgs."cryptonite" or (buildDepError "cryptonite"))
(hsPkgs."cardano-crypto" or (buildDepError "cardano-crypto"))
] ++ (pkgs.lib).optional (flags.golden-tests) (hsPkgs."inspector" or (buildDepError "inspector"));
buildable = if flags.golden-tests then true else false;
};
};
benchmarks = {
"cardano-crypto-bench" = {
depends = [
(hsPkgs.base)
(hsPkgs.bytestring)
(hsPkgs.memory)
(hsPkgs.cryptonite)
(hsPkgs.cardano-crypto)
(hsPkgs.gauge)
(hsPkgs."base" or (buildDepError "base"))
(hsPkgs."bytestring" or (buildDepError "bytestring"))
(hsPkgs."memory" or (buildDepError "memory"))
(hsPkgs."cryptonite" or (buildDepError "cryptonite"))
(hsPkgs."cardano-crypto" or (buildDepError "cardano-crypto"))
(hsPkgs."gauge" or (buildDepError "gauge"))
];
buildable = true;
};
};
};
Expand Down
81 changes: 61 additions & 20 deletions nix/.stack.nix/cardano-prelude-test.nix
@@ -1,4 +1,43 @@
{ system, compiler, flags, pkgs, hsPkgs, pkgconfPkgs, ... }:
let
buildDepError = pkg:
builtins.throw ''
The Haskell package set does not contain the package: ${pkg} (build dependency).
If you are using Stackage, make sure that you are using a snapshot that contains the package. Otherwise you may need to update the Hackage snapshot you are using, usually by updating haskell.nix.
'';
sysDepError = pkg:
builtins.throw ''
The Nixpkgs package set does not contain the package: ${pkg} (system dependency).
You may need to augment the system package mapping in haskell.nix so that it can be found.
'';
pkgConfDepError = pkg:
builtins.throw ''
The pkg-conf packages does not contain the package: ${pkg} (pkg-conf dependency).
You may need to augment the pkg-conf package mapping in haskell.nix so that it can be found.
'';
exeDepError = pkg:
builtins.throw ''
The local executable components do not include the component: ${pkg} (executable dependency).
'';
legacyExeDepError = pkg:
builtins.throw ''
The Haskell package set does not contain the package: ${pkg} (executable dependency).
If you are using Stackage, make sure that you are using a snapshot that contains the package. Otherwise you may need to update the Hackage snapshot you are using, usually by updating haskell.nix.
'';
buildToolDepError = pkg:
builtins.throw ''
Neither the Haskell package set or the Nixpkgs package set contain the package: ${pkg} (build tool dependency).
If this is a system dependency:
You may need to augment the system package mapping in haskell.nix so that it can be found.
If this is a Haskell dependency:
If you are using Stackage, make sure that you are using a snapshot that contains the package. Otherwise you may need to update the Hackage snapshot you are using, usually by updating haskell.nix.
'';
in { system, compiler, flags, pkgs, hsPkgs, pkgconfPkgs, ... }:
{
flags = { development = false; };
package = {
Expand All @@ -13,30 +52,32 @@
synopsis = "Utility types and functions for testing Cardano";
description = "Utility types and functions for testing Cardano";
buildType = "Simple";
isLocal = true;
};
components = {
"library" = {
depends = [
(hsPkgs.base)
(hsPkgs.aeson)
(hsPkgs.aeson-pretty)
(hsPkgs.attoparsec)
(hsPkgs.base16-bytestring)
(hsPkgs.bytestring)
(hsPkgs.canonical-json)
(hsPkgs.cardano-prelude)
(hsPkgs.containers)
(hsPkgs.cryptonite)
(hsPkgs.formatting)
(hsPkgs.hedgehog)
(hsPkgs.hspec)
(hsPkgs.pretty-show)
(hsPkgs.QuickCheck)
(hsPkgs.quickcheck-instances)
(hsPkgs.text)
(hsPkgs.template-haskell)
(hsPkgs.time)
(hsPkgs."base" or (buildDepError "base"))
(hsPkgs."aeson" or (buildDepError "aeson"))
(hsPkgs."aeson-pretty" or (buildDepError "aeson-pretty"))
(hsPkgs."attoparsec" or (buildDepError "attoparsec"))
(hsPkgs."base16-bytestring" or (buildDepError "base16-bytestring"))
(hsPkgs."bytestring" or (buildDepError "bytestring"))
(hsPkgs."canonical-json" or (buildDepError "canonical-json"))
(hsPkgs."cardano-prelude" or (buildDepError "cardano-prelude"))
(hsPkgs."containers" or (buildDepError "containers"))
(hsPkgs."cryptonite" or (buildDepError "cryptonite"))
(hsPkgs."formatting" or (buildDepError "formatting"))
(hsPkgs."hedgehog" or (buildDepError "hedgehog"))
(hsPkgs."hspec" or (buildDepError "hspec"))
(hsPkgs."pretty-show" or (buildDepError "pretty-show"))
(hsPkgs."QuickCheck" or (buildDepError "QuickCheck"))
(hsPkgs."quickcheck-instances" or (buildDepError "quickcheck-instances"))
(hsPkgs."text" or (buildDepError "text"))
(hsPkgs."template-haskell" or (buildDepError "template-haskell"))
(hsPkgs."time" or (buildDepError "time"))
];
buildable = true;
};
};
} // rec { src = (pkgs.lib).mkDefault ../.././test; }

0 comments on commit f12a605

Please sign in to comment.