/
plutus-tx-plugin.nix
137 lines (137 loc) · 5.32 KB
/
plutus-tx-plugin.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
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
{ system
, compiler
, flags
, pkgs
, hsPkgs
, pkgconfPkgs
, errorHandler
, config
, ... }:
{
flags = { use-ghc-stub = false; };
package = {
specVersion = "2.2";
identifier = { name = "plutus-tx-plugin"; version = "0.1.0.0"; };
license = "Apache-2.0";
copyright = "";
maintainer = "michael.peyton-jones@iohk.io";
author = "Michael Peyton Jones";
homepage = "";
url = "";
synopsis = "The Plutus Tx compiler and GHC plugin";
description = "The Plutus Tx compiler and GHC plugin.";
buildType = "Simple";
isLocal = true;
detailLevel = "FullDetails";
licenseFiles = [ "LICENSE" "NOTICE" ];
dataDir = ".";
dataFiles = [];
extraSrcFiles = [];
extraTmpFiles = [];
extraDocFiles = [ "README.md" ];
};
components = {
"library" = {
depends = [
(hsPkgs."base" or (errorHandler.buildDepError "base"))
(hsPkgs."bytestring" or (errorHandler.buildDepError "bytestring"))
(hsPkgs."containers" or (errorHandler.buildDepError "containers"))
(hsPkgs."extra" or (errorHandler.buildDepError "extra"))
(hsPkgs."flat" or (errorHandler.buildDepError "flat"))
(hsPkgs."ghc-prim" or (errorHandler.buildDepError "ghc-prim"))
(hsPkgs."plutus-core" or (errorHandler.buildDepError "plutus-core"))
(hsPkgs."lens" or (errorHandler.buildDepError "lens"))
(hsPkgs."mtl" or (errorHandler.buildDepError "mtl"))
(hsPkgs."prettyprinter" or (errorHandler.buildDepError "prettyprinter"))
(hsPkgs."template-haskell" or (errorHandler.buildDepError "template-haskell"))
(hsPkgs."text" or (errorHandler.buildDepError "text"))
(hsPkgs."transformers" or (errorHandler.buildDepError "transformers"))
(hsPkgs."plutus-tx" or (errorHandler.buildDepError "plutus-tx"))
(hsPkgs."array" or (errorHandler.buildDepError "array"))
] ++ (if flags.use-ghc-stub
then [
(hsPkgs."plutus-ghc-stub" or (errorHandler.buildDepError "plutus-ghc-stub"))
]
else [ (hsPkgs."ghc" or (errorHandler.buildDepError "ghc")) ]);
buildable = true;
modules = [
"PlutusTx/Compiler/Binders"
"PlutusTx/Compiler/Builtins"
"PlutusTx/Compiler/Expr"
"PlutusTx/Compiler/Kind"
"PlutusTx/Compiler/Laziness"
"PlutusTx/Compiler/Names"
"PlutusTx/Compiler/Type"
"PlutusTx/Compiler/Types"
"PlutusTx/Compiler/Utils"
"PlutusTx/PIRTypes"
"PlutusTx/PLCTypes"
"PlutusTx/Plugin"
"PlutusTx/Compiler/Error"
];
hsSourceDirs = [ "src" ];
};
tests = {
"plutus-tx-tests" = {
depends = [
(hsPkgs."base" or (errorHandler.buildDepError "base"))
(hsPkgs."flat" or (errorHandler.buildDepError "flat"))
(hsPkgs."deepseq" or (errorHandler.buildDepError "deepseq"))
(hsPkgs."filepath" or (errorHandler.buildDepError "filepath"))
(hsPkgs."integer-gmp" or (errorHandler.buildDepError "integer-gmp"))
(hsPkgs."plutus-core" or (errorHandler.buildDepError "plutus-core"))
(hsPkgs."plutus-tx" or (errorHandler.buildDepError "plutus-tx"))
(hsPkgs."plutus-tx-plugin" or (errorHandler.buildDepError "plutus-tx-plugin"))
(hsPkgs."prettyprinter" or (errorHandler.buildDepError "prettyprinter"))
(hsPkgs."mtl" or (errorHandler.buildDepError "mtl"))
(hsPkgs."template-haskell" or (errorHandler.buildDepError "template-haskell"))
(hsPkgs."tasty" or (errorHandler.buildDepError "tasty"))
(hsPkgs."tasty-hedgehog" or (errorHandler.buildDepError "tasty-hedgehog"))
(hsPkgs."tasty-hunit" or (errorHandler.buildDepError "tasty-hunit"))
(hsPkgs."text" or (errorHandler.buildDepError "text"))
(hsPkgs."hedgehog" or (errorHandler.buildDepError "hedgehog"))
(hsPkgs."lens" or (errorHandler.buildDepError "lens"))
(hsPkgs."ghc-prim" or (errorHandler.buildDepError "ghc-prim"))
(hsPkgs."containers" or (errorHandler.buildDepError "containers"))
];
buildable = if flags.use-ghc-stub then false else true;
modules = [
"Budget/Lib"
"Budget/Spec"
"IsData/Spec"
"Lift/Spec"
"Plugin/Spec"
"Plugin/Basic/Spec"
"Plugin/Data/Spec"
"Plugin/Errors/Spec"
"Plugin/Functions/Spec"
"Plugin/Laziness/Spec"
"Plugin/NoTrace/Spec"
"Plugin/Primitives/Spec"
"Plugin/Profiling/Spec"
"Plugin/Typeclasses/Spec"
"Plugin/Typeclasses/Lib"
"Plugin/Coverage/Spec"
"Plugin/Lib"
"StdLib/Spec"
"TH/Spec"
"TH/TestTH"
"Lib"
];
hsSourceDirs = [ "test" ];
mainPath = [ "Spec.hs" ];
};
};
};
} // {
src = (pkgs.lib).mkDefault (pkgs.fetchgit {
url = "14";
rev = "minimal";
sha256 = "";
}) // {
url = "14";
rev = "minimal";
sha256 = "";
};
postUnpack = "sourceRoot+=/plutus-tx-plugin; echo source root reset to \$sourceRoot";
}