This repository was archived by the owner on Aug 18, 2020. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathcardano-binary-test.nix
86 lines (80 loc) · 3.87 KB
/
cardano-binary-test.nix
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
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 = {
specVersion = "1.10";
identifier = { name = "cardano-binary-test"; version = "1.3.0"; };
license = "MIT";
copyright = "2019 IOHK";
maintainer = "[email protected]";
author = "IOHK";
homepage = "";
url = "";
synopsis = "Test helpers from cardano-binary exposed to other packages";
description = "Test helpers from cardano-binary exposed to other packages";
buildType = "Simple";
isLocal = true;
};
components = {
"library" = {
depends = [
(hsPkgs."base" or (buildDepError "base"))
(hsPkgs."bytestring" or (buildDepError "bytestring"))
(hsPkgs."cardano-binary" or (buildDepError "cardano-binary"))
(hsPkgs."cardano-prelude" or (buildDepError "cardano-prelude"))
(hsPkgs."cardano-prelude-test" or (buildDepError "cardano-prelude-test"))
(hsPkgs."cborg" or (buildDepError "cborg"))
(hsPkgs."containers" or (buildDepError "containers"))
(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."vector" or (buildDepError "vector"))
];
buildable = true;
};
};
} // {
src = (pkgs.lib).mkDefault (pkgs.fetchgit {
url = "https://github.com/input-output-hk/cardano-base";
rev = "5c575d46afbfe333de0ccba70b084db8302abf42";
sha256 = "1v1q20fjb6klcdhl9mhpvd10j6vc7biwk91dgyfp6ld7xvj2703x";
});
postUnpack = "sourceRoot+=/binary/test; echo source root reset to \$sourceRoot";
}