1+ { system
2+ , compiler
3+ , flags
4+ , pkgs
5+ , hsPkgs
6+ , pkgconfPkgs
7+ , errorHandler
8+ , config
9+ , ... } :
10+ {
11+ flags = { golden-tests = false ; golden-tests-exe = false ; } ;
12+ package = {
13+ specVersion = "1.10" ;
14+ identifier = { name = "cardano-crypto" ; version = "1.1.0" ; } ;
15+ license = "MIT" ;
16+ copyright = "2016-2017 IOHK" ;
17+ 18+ author = "Vincent Hanquez" ;
19+ homepage = "https://github.com/input-output-hk/cardano-crypto#readme" ;
20+ url = "" ;
21+ synopsis = "Cryptography primitives for cardano" ;
22+ description = "" ;
23+ buildType = "Simple" ;
24+ isLocal = true ;
25+ detailLevel = "FullDetails" ;
26+ licenseFiles = [ "LICENSE" ] ;
27+ dataDir = "." ;
28+ dataFiles = [ ] ;
29+ extraSrcFiles = [ "README.md" "cbits/*.h" "cbits/ed25519/*.h" ] ;
30+ extraTmpFiles = [ ] ;
31+ extraDocFiles = [ ] ;
32+ } ;
33+ components = {
34+ "library" = {
35+ depends = [
36+ ( hsPkgs . "base" or ( errorHandler . buildDepError "base" ) )
37+ ( hsPkgs . "memory" or ( errorHandler . buildDepError "memory" ) )
38+ ( hsPkgs . "deepseq" or ( errorHandler . buildDepError "deepseq" ) )
39+ ( hsPkgs . "bytestring" or ( errorHandler . buildDepError "bytestring" ) )
40+ ( hsPkgs . "basement" or ( errorHandler . buildDepError "basement" ) )
41+ ( hsPkgs . "foundation" or ( errorHandler . buildDepError "foundation" ) )
42+ ( hsPkgs . "cryptonite" or ( errorHandler . buildDepError "cryptonite" ) )
43+ ( hsPkgs . "hashable" or ( errorHandler . buildDepError "hashable" ) )
44+ ( hsPkgs . "integer-gmp" or ( errorHandler . buildDepError "integer-gmp" ) )
45+ ] ;
46+ buildable = true ;
47+ modules = [
48+ "Cardano/Crypto/Wallet"
49+ "Cardano/Crypto/Wallet/Encrypted"
50+ "Cardano/Crypto/Wallet/Types"
51+ "Cardano/Crypto/Wallet/Pure"
52+ "Cardano/Crypto/Encoding/BIP39"
53+ "Cardano/Crypto/Encoding/Seed"
54+ "Crypto/Math/Edwards25519"
55+ "Crypto/Math/Bits"
56+ "Crypto/Math/Bytes"
57+ "Crypto/Math/NatMath"
58+ "Crypto/ECC/Ed25519Donna"
59+ "Crypto/ECC/Ed25519BIP32"
60+ "Crypto/Encoding/BIP39"
61+ "Crypto/Encoding/BIP39/Dictionary"
62+ "Crypto/Encoding/BIP39/English"
63+ "Cardano/Internal/Compat"
64+ ] ;
65+ cSources = [ "cbits/ed25519/ed25519.c" "cbits/encrypted_sign.c" ] ;
66+ hsSourceDirs = [ "src" ] ;
67+ includeDirs = [ "cbits/ed25519" "cbits" ] ;
68+ } ;
69+ exes = {
70+ "golden-tests" = {
71+ depends = [
72+ ( hsPkgs . "base" or ( errorHandler . buildDepError "base" ) )
73+ ( hsPkgs . "basement" or ( errorHandler . buildDepError "basement" ) )
74+ ( hsPkgs . "foundation" or ( errorHandler . buildDepError "foundation" ) )
75+ ( hsPkgs . "memory" or ( errorHandler . buildDepError "memory" ) )
76+ ( hsPkgs . "bytestring" or ( errorHandler . buildDepError "bytestring" ) )
77+ ( hsPkgs . "cryptonite" or ( errorHandler . buildDepError "cryptonite" ) )
78+ ( hsPkgs . "cardano-crypto" or ( errorHandler . buildDepError "cardano-crypto" ) )
79+ ] ++ ( pkgs . lib ) . optional ( flags . golden-tests-exe ) ( hsPkgs . "inspector" or ( errorHandler . buildDepError "inspector" ) ) ;
80+ buildable = if flags . golden-tests-exe then true else false ;
81+ modules = [ "Test/Orphans" ] ;
82+ hsSourceDirs = [ "test" ] ;
83+ mainPath = [ "GoldenTest.hs" ] ++ [ "" ] ;
84+ } ;
85+ } ;
86+ tests = {
87+ "cardano-crypto-test" = {
88+ depends = [
89+ ( hsPkgs . "base" or ( errorHandler . buildDepError "base" ) )
90+ ( hsPkgs . "bytestring" or ( errorHandler . buildDepError "bytestring" ) )
91+ ( hsPkgs . "memory" or ( errorHandler . buildDepError "memory" ) )
92+ ( hsPkgs . "cryptonite" or ( errorHandler . buildDepError "cryptonite" ) )
93+ ( hsPkgs . "cardano-crypto" or ( errorHandler . buildDepError "cardano-crypto" ) )
94+ ( hsPkgs . "basement" or ( errorHandler . buildDepError "basement" ) )
95+ ( hsPkgs . "foundation" or ( errorHandler . buildDepError "foundation" ) )
96+ ] ;
97+ buildable = true ;
98+ modules = [
99+ "Test/Crypto"
100+ "Test/Crypto/Encoding"
101+ "Test/Crypto/Encoding/BIP39"
102+ "Test/Cardano"
103+ "Test/Cardano/Crypto"
104+ "Test/Cardano/Crypto/Encoding"
105+ "Test/Cardano/Crypto/Encoding/Seed"
106+ "Utils"
107+ ] ;
108+ hsSourceDirs = [ "test" ] ;
109+ mainPath = [ "Spec.hs" ] ;
110+ } ;
111+ "cardano-crypto-golden-tests" = {
112+ depends = [
113+ ( hsPkgs . "base" or ( errorHandler . buildDepError "base" ) )
114+ ( hsPkgs . "basement" or ( errorHandler . buildDepError "basement" ) )
115+ ( hsPkgs . "foundation" or ( errorHandler . buildDepError "foundation" ) )
116+ ( hsPkgs . "memory" or ( errorHandler . buildDepError "memory" ) )
117+ ( hsPkgs . "bytestring" or ( errorHandler . buildDepError "bytestring" ) )
118+ ( hsPkgs . "cryptonite" or ( errorHandler . buildDepError "cryptonite" ) )
119+ ( hsPkgs . "cardano-crypto" or ( errorHandler . buildDepError "cardano-crypto" ) )
120+ ] ++ ( pkgs . lib ) . optional ( flags . golden-tests ) ( hsPkgs . "inspector" or ( errorHandler . buildDepError "inspector" ) ) ;
121+ buildable = if flags . golden-tests then true else false ;
122+ modules = [ "Test/Orphans" ] ;
123+ hsSourceDirs = [ "test" ] ;
124+ mainPath = [ "GoldenTest.hs" ] ;
125+ } ;
126+ } ;
127+ benchmarks = {
128+ "cardano-crypto-bench" = {
129+ depends = [
130+ ( hsPkgs . "base" or ( errorHandler . buildDepError "base" ) )
131+ ( hsPkgs . "bytestring" or ( errorHandler . buildDepError "bytestring" ) )
132+ ( hsPkgs . "memory" or ( errorHandler . buildDepError "memory" ) )
133+ ( hsPkgs . "cryptonite" or ( errorHandler . buildDepError "cryptonite" ) )
134+ ( hsPkgs . "cardano-crypto" or ( errorHandler . buildDepError "cardano-crypto" ) )
135+ ( hsPkgs . "gauge" or ( errorHandler . buildDepError "gauge" ) )
136+ ] ;
137+ buildable = true ;
138+ hsSourceDirs = [ "benchs" ] ;
139+ } ;
140+ } ;
141+ } ;
142+ } // {
143+ src = ( pkgs . lib ) . mkDefault ( pkgs . fetchgit {
144+ url = "0" ;
145+ rev = "minimal" ;
146+ sha256 = "" ;
147+ } ) // {
148+ url = "0" ;
149+ rev = "minimal" ;
150+ sha256 = "" ;
151+ } ;
152+ }
0 commit comments