forked from basicswap/basicswap
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathguix.scm
158 lines (152 loc) · 5.13 KB
/
guix.scm
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
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
(define-module (guix)
#:use-module (guix packages)
#:use-module ((guix licenses) #:prefix license:)
#:use-module (guix build-system python)
#:use-module (guix build-system pyproject)
#:use-module (guix build-system gnu)
#:use-module (guix git-download)
#:use-module (guix download)
#:use-module (guix search-paths)
#:use-module (gnu packages)
#:use-module (gnu packages pkg-config)
#:use-module (gnu packages autotools)
#:use-module (gnu packages certs)
#:use-module (gnu packages check)
#:use-module (gnu packages cmake)
#:use-module (gnu packages databases)
#:use-module (gnu packages finance)
#:use-module (gnu packages gnupg)
#:use-module (gnu packages python)
#:use-module (gnu packages python-build)
#:use-module (gnu packages python-check)
#:use-module (gnu packages python-crypto)
#:use-module (gnu packages python-science)
#:use-module (gnu packages python-xyz)
#:use-module (gnu packages libffi)
#:use-module (gnu packages license))
(define libsecp256k1-basicswap
(package
(name "libsecp256k1-basicswap")
(version "basicswap_v0.2")
(source (origin
(method git-fetch)
(uri (git-reference
(url "https://github.com/basicswap/secp256k1")
(commit version)))
(sha256
(base32
"0zvqgswmy1q46nmpjn388pljvl65x3y2k4caw742m3j121jqmfgx"))
(file-name (git-file-name name version))))
(build-system gnu-build-system)
(arguments
'(#:configure-flags '("--enable-shared"
"--disable-dependency-tracking"
"--with-pic"
"--enable-module-extrakeys"
"--enable-module-recovery"
"--enable-module-schnorrsig"
"--enable-experimental"
"--enable-module-ecdh"
"--enable-benchmark=no"
"--enable-tests=no"
"--enable-module-ed25519"
"--enable-module-generator"
"--enable-module-dleag"
"--enable-module-ecdsaotves"
"--with-valgrind=no"
)))
(native-inputs
(list autoconf automake libtool))
(synopsis "C library for EC operations on curve secp256k1")
(description
"Optimized C library for EC operations on curve secp256k1.\n")
(home-page "https://github.com/bitcoin-core/secp256k1")
(license license:unlicense)))
(define python-coincurve-basicswap
(package
(name "python-coincurve-basicswap")
(version "basicswap_v0.2")
(source
(origin
(method git-fetch)
(uri
(git-reference
(url "https://github.com/basicswap/coincurve")
(commit version)))
(file-name
(git-file-name name version))
(sha256
(base32 "1vm9cvwr0z02zc0mp7l8qj9vhg8kmfrzysiwzg91zkgmccza9ryc"))))
(build-system pyproject-build-system)
(arguments
`(#:phases
(modify-phases %standard-phases
(add-before 'build 'set-version
(lambda _
(setenv "COINCURVE_IGNORE_SYSTEM_LIB" "OFF")
;; ZIP does not support timestamps before 1980.
(setenv "SOURCE_DATE_EPOCH" "315532800")))
)))
(propagated-inputs
(list
libsecp256k1-basicswap
python-asn1crypto
python-cffi))
(native-inputs
(list
cmake-3.30
python-hatchling
python-scikit-build
python-scikit-build-core
pkg-config
python-pytest
python-pytest-benchmark
))
(synopsis "Python libsecp256k1 wrapper")
(description "Python libsecp256k1 wrapper.")
(home-page "https://github.com/basicswap/coincurve")
(license license:bsd-3)))
(define-public basicswap
(package
(name "basicswap")
(version "0.14.1")
(source (origin
(method git-fetch)
(uri (git-reference
(url "https://github.com/basicswap/basicswap")
(commit "062cc6dbdc3c1f489d2bf78ce7cd99fbc885f14e")))
(sha256
(base32
"16m61d45rn4lzvximsnkvrdg4hfsdk4460lhyarixjcdzknh1z1z"))
(file-name (git-file-name name version))))
(build-system pyproject-build-system)
(native-search-paths (list $SSL_CERT_DIR $SSL_CERT_FILE))
(arguments
'(#:tests? #f ; TODO: Add coin binaries
#:phases (modify-phases %standard-phases
(add-after 'unpack 'patch-env
(lambda* (#:key inputs #:allow-other-keys)
(substitute* "basicswap/bin/prepare.py"
(("GUIX_SSL_CERT_DIR = None")
(string-append "GUIX_SSL_CERT_DIR = \"" (search-input-directory inputs "etc/ssl/certs") "\""))))))))
(propagated-inputs
(list
gnupg
nss-certs
python-coincurve-basicswap
python-pycryptodome
python-pytest
python-pyzmq
python-gnupg
python-jinja2
python-pysocks))
(native-inputs
(list
python-hatchling
python-wheel
python-pylint
python-pyflakes))
(synopsis "Simple Atomic Swap Network - Proof of Concept")
(description "Facilitates cross-chain atomic swaps")
(home-page "https://github.com/basicswap/basicswap")
(license license:bsd-3)))