2022-11-20 20:22:10 +00:00
|
|
|
(define-module (guix)
|
|
|
|
#:use-module (guix packages)
|
|
|
|
#:use-module ((guix licenses) #:prefix license:)
|
|
|
|
#:use-module (guix build-system python)
|
|
|
|
#:use-module (guix build-system gnu)
|
|
|
|
#:use-module (guix git-download)
|
|
|
|
#:use-module (guix download)
|
2022-12-15 08:55:20 +00:00
|
|
|
#:use-module (guix search-paths)
|
2022-11-20 20:22:10 +00:00
|
|
|
#: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 databases)
|
|
|
|
#:use-module (gnu packages finance)
|
|
|
|
#:use-module (gnu packages gnupg)
|
|
|
|
#:use-module (gnu packages protobuf)
|
|
|
|
#:use-module (gnu packages python)
|
|
|
|
#:use-module (gnu packages python-build)
|
|
|
|
#:use-module (gnu packages python-crypto)
|
|
|
|
#:use-module (gnu packages python-xyz)
|
|
|
|
#:use-module (gnu packages libffi)
|
|
|
|
#:use-module (gnu packages license))
|
2022-11-20 18:58:10 +00:00
|
|
|
|
2022-12-15 08:55:20 +00:00
|
|
|
|
2022-11-20 18:58:10 +00:00
|
|
|
(define libsecp256k1-anonswap
|
|
|
|
(package
|
|
|
|
(name "libsecp256k1-anonswap")
|
2023-12-14 18:29:32 +00:00
|
|
|
(version "anonswap_v0.2")
|
2022-11-20 18:58:10 +00:00
|
|
|
(source (origin
|
|
|
|
(method git-fetch)
|
|
|
|
(uri (git-reference
|
|
|
|
(url "https://github.com/tecnovert/secp256k1")
|
|
|
|
(commit version)))
|
|
|
|
(sha256
|
|
|
|
(base32
|
2023-12-14 18:29:32 +00:00
|
|
|
"1r07rkrw5qsnc5v1q7cb0zfs1cr62fqwq7kd2v8650g6ha4k5r8i"))
|
2022-11-20 18:58:10 +00:00
|
|
|
(file-name (git-file-name name version))))
|
|
|
|
(build-system gnu-build-system)
|
|
|
|
(arguments
|
|
|
|
'(#:configure-flags '("--enable-shared"
|
|
|
|
"--disable-dependency-tracking"
|
2023-12-14 18:29:32 +00:00
|
|
|
"--with-pic"
|
|
|
|
"--enable-module-extrakeys"
|
2022-11-20 18:58:10 +00:00
|
|
|
"--enable-module-recovery"
|
2023-12-14 18:29:32 +00:00
|
|
|
"--enable-module-schnorrsig"
|
|
|
|
"--enable-experimental"
|
2022-11-20 18:58:10 +00:00
|
|
|
"--enable-module-ecdh"
|
|
|
|
"--enable-benchmark=no"
|
|
|
|
"--enable-tests=no"
|
|
|
|
"--enable-module-ed25519"
|
|
|
|
"--enable-module-generator"
|
|
|
|
"--enable-module-dleag"
|
|
|
|
"--enable-module-ecdsaotves"
|
2023-12-14 18:29:32 +00:00
|
|
|
"--with-valgrind=no"
|
2022-11-20 18:58:10 +00:00
|
|
|
)))
|
|
|
|
(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-anonswap
|
|
|
|
(package
|
|
|
|
(name "python-coincurve-anonswap")
|
2023-12-14 18:29:32 +00:00
|
|
|
(version "anonswap_v0.2")
|
2022-11-20 18:58:10 +00:00
|
|
|
(source
|
|
|
|
(origin
|
|
|
|
(method git-fetch)
|
|
|
|
(uri
|
|
|
|
(git-reference
|
|
|
|
(url "https://github.com/tecnovert/coincurve")
|
|
|
|
(commit version)))
|
|
|
|
(file-name
|
|
|
|
(git-file-name name version))
|
|
|
|
(sha256
|
2023-12-14 18:29:32 +00:00
|
|
|
(base32 "08fz02afh88m83axfm8jsgq1c65mw1f3g07x9hz361vblvqjwzqh"))))
|
2022-11-20 18:58:10 +00:00
|
|
|
(build-system python-build-system)
|
|
|
|
(arguments
|
|
|
|
'(#:tests? #f ;XXX fails to load "libsecp256k1.dll"
|
|
|
|
#:phases (modify-phases %standard-phases
|
|
|
|
(add-after 'unpack 'patch-libsec256k1-path
|
|
|
|
(lambda _
|
|
|
|
(substitute* "setup.py"
|
|
|
|
(("if has_system_lib\\(\\)")
|
|
|
|
"if True")
|
|
|
|
((", 'requests'")
|
|
|
|
"")
|
|
|
|
(("download_library\\(self\\)")
|
|
|
|
"")))))))
|
|
|
|
(propagated-inputs
|
|
|
|
(list
|
|
|
|
libsecp256k1-anonswap
|
|
|
|
python-asn1crypto
|
|
|
|
python-cffi))
|
|
|
|
(native-inputs
|
|
|
|
(list
|
|
|
|
python-setuptools
|
|
|
|
pkg-config
|
|
|
|
))
|
|
|
|
(synopsis "Python libsecp256k1 wrapper")
|
|
|
|
(description "Python libsecp256k1 wrapper.")
|
|
|
|
(home-page "https://github.com/tecnovert/coincurve")
|
|
|
|
(license license:bsd-3)))
|
|
|
|
|
|
|
|
(define python-sqlalchemy-1.4.39
|
|
|
|
(package
|
|
|
|
(inherit python-sqlalchemy)
|
|
|
|
(version "1.4.39")
|
|
|
|
(source
|
|
|
|
(origin
|
|
|
|
(method url-fetch)
|
|
|
|
(uri (pypi-uri "SQLAlchemy" version))
|
|
|
|
(sha256
|
|
|
|
(base32 "09sx2lghywnm7qj1xm8xc3xrgj40bndfh2hbiaq4cfvm71h8k541"))))))
|
|
|
|
|
2022-11-20 20:22:10 +00:00
|
|
|
(define-public basicswap
|
2022-11-20 18:58:10 +00:00
|
|
|
(package
|
|
|
|
(name "basicswap")
|
2023-12-14 19:40:31 +00:00
|
|
|
(version "0.12.1")
|
2022-11-20 20:22:10 +00:00
|
|
|
(source (origin
|
|
|
|
(method git-fetch)
|
|
|
|
(uri (git-reference
|
|
|
|
(url "https://github.com/tecnovert/basicswap")
|
2023-12-14 19:40:31 +00:00
|
|
|
(commit "15bf9b2187d3b8a03939e61b4c3ebf4d90fcc919")))
|
2022-11-20 20:22:10 +00:00
|
|
|
(sha256
|
|
|
|
(base32
|
2023-12-14 19:40:31 +00:00
|
|
|
"14gn6156x53c6panxdnd1awkd23jxnihvbqy886j66w5js3b5i8h"))
|
2022-11-20 20:22:10 +00:00
|
|
|
(file-name (git-file-name name version))))
|
2022-11-20 18:58:10 +00:00
|
|
|
(build-system python-build-system)
|
2022-12-15 08:55:20 +00:00
|
|
|
|
|
|
|
(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* "bin/basicswap_prepare.py"
|
|
|
|
(("GUIX_SSL_CERT_DIR = None")
|
|
|
|
(string-append "GUIX_SSL_CERT_DIR = \"" (search-input-directory inputs "etc/ssl/certs") "\"")))
|
|
|
|
)
|
|
|
|
))))
|
2022-11-20 18:58:10 +00:00
|
|
|
(propagated-inputs
|
|
|
|
(list
|
|
|
|
gnupg
|
|
|
|
nss-certs
|
|
|
|
python-coincurve-anonswap
|
|
|
|
python-pycryptodome
|
|
|
|
python-pytest
|
|
|
|
python-protobuf
|
|
|
|
python-sqlalchemy-1.4.39
|
|
|
|
python-pyzmq
|
|
|
|
python-gnupg
|
|
|
|
python-jinja2
|
|
|
|
python-pysocks
|
|
|
|
python-mnemonic
|
|
|
|
))
|
|
|
|
(native-inputs
|
|
|
|
(list
|
|
|
|
python-setuptools
|
2022-11-20 20:22:10 +00:00
|
|
|
python-wheel
|
|
|
|
python-pylint
|
|
|
|
python-pyflakes
|
2022-11-20 18:58:10 +00:00
|
|
|
))
|
|
|
|
(synopsis "Simple Atomic Swap Network - Proof of Concept")
|
|
|
|
(description #f)
|
|
|
|
(home-page "https://github.com/tecnovert/basicswap")
|
2022-11-20 20:22:10 +00:00
|
|
|
(license license:bsd-3)))
|