basicswap/guix.scm

159 lines
5.1 KiB
Scheme
Raw Permalink Normal View History

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)
2024-09-19 10:15:50 +00:00
#:use-module (guix build-system pyproject)
2022-11-20 20:22:10 +00:00
#: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)
2024-09-19 10:15:50 +00:00
#:use-module (gnu packages cmake)
2022-11-20 20:22:10 +00:00
#: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)
2024-09-19 10:15:50 +00:00
#:use-module (gnu packages python-check)
2022-11-20 20:22:10 +00:00
#:use-module (gnu packages python-crypto)
2024-09-19 10:15:50 +00:00
#:use-module (gnu packages python-science)
2022-11-20 20:22:10 +00:00
#: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
2024-09-19 10:15:50 +00:00
(define libsecp256k1-basicswap
2022-11-20 18:58:10 +00:00
(package
2024-09-19 10:15:50 +00:00
(name "libsecp256k1-basicswap")
(version "basicswap_v0.2")
2022-11-20 18:58:10 +00:00
(source (origin
(method git-fetch)
(uri (git-reference
2024-09-19 10:15:50 +00:00
(url "https://github.com/basicswap/secp256k1")
2022-11-20 18:58:10 +00:00
(commit version)))
(sha256
(base32
2024-09-19 10:15:50 +00:00
"0zvqgswmy1q46nmpjn388pljvl65x3y2k4caw742m3j121jqmfgx"))
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)))
2024-09-19 10:15:50 +00:00
(define python-coincurve-basicswap
2022-11-20 18:58:10 +00:00
(package
2024-09-19 10:15:50 +00:00
(name "python-coincurve-basicswap")
(version "basicswap_v0.2")
2022-11-20 18:58:10 +00:00
(source
(origin
(method git-fetch)
(uri
(git-reference
2024-09-19 10:15:50 +00:00
(url "https://github.com/basicswap/coincurve")
2022-11-20 18:58:10 +00:00
(commit version)))
(file-name
(git-file-name name version))
(sha256
2024-09-19 10:15:50 +00:00
(base32 "1vm9cvwr0z02zc0mp7l8qj9vhg8kmfrzysiwzg91zkgmccza9ryc"))))
(build-system pyproject-build-system)
2022-11-20 18:58:10 +00:00
(arguments
2024-09-19 10:15:50 +00:00
`(#: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")))
)))
2022-11-20 18:58:10 +00:00
(propagated-inputs
(list
2024-09-19 10:15:50 +00:00
libsecp256k1-basicswap
2022-11-20 18:58:10 +00:00
python-asn1crypto
python-cffi))
(native-inputs
(list
2024-09-19 10:15:50 +00:00
cmake-3.30
python-hatchling
python-scikit-build
python-scikit-build-core
2022-11-20 18:58:10 +00:00
pkg-config
2024-09-19 10:15:50 +00:00
python-pytest
python-pytest-benchmark
2022-11-20 18:58:10 +00:00
))
(synopsis "Python libsecp256k1 wrapper")
(description "Python libsecp256k1 wrapper.")
2024-09-19 10:15:50 +00:00
(home-page "https://github.com/basicswap/coincurve")
2022-11-20 18:58:10 +00:00
(license license:bsd-3)))
2022-11-20 20:22:10 +00:00
(define-public basicswap
2022-11-20 18:58:10 +00:00
(package
(name "basicswap")
2024-10-16 19:35:21 +00:00
(version "0.14.1")
2022-11-20 20:22:10 +00:00
(source (origin
(method git-fetch)
(uri (git-reference
2024-06-11 07:56:09 +00:00
(url "https://github.com/basicswap/basicswap")
2024-10-16 19:35:21 +00:00
(commit "062cc6dbdc3c1f489d2bf78ce7cd99fbc885f14e")))
2022-11-20 20:22:10 +00:00
(sha256
(base32
2024-10-16 19:35:21 +00:00
"16m61d45rn4lzvximsnkvrdg4hfsdk4460lhyarixjcdzknh1z1z"))
2022-11-20 20:22:10 +00:00
(file-name (git-file-name name version))))
2024-10-16 19:35:21 +00:00
(build-system pyproject-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* "basicswap/bin/prepare.py"
2022-12-15 08:55:20 +00:00
(("GUIX_SSL_CERT_DIR = None")
2024-09-19 10:15:50 +00:00
(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
2024-09-19 10:15:50 +00:00
python-coincurve-basicswap
2022-11-20 18:58:10 +00:00
python-pycryptodome
python-pytest
python-pyzmq
python-gnupg
python-jinja2
2024-09-19 10:15:50 +00:00
python-pysocks))
2022-11-20 18:58:10 +00:00
(native-inputs
(list
2024-10-16 19:35:21 +00:00
python-hatchling
2022-11-20 20:22:10 +00:00
python-wheel
python-pylint
2024-09-19 10:15:50 +00:00
python-pyflakes))
2022-11-20 18:58:10 +00:00
(synopsis "Simple Atomic Swap Network - Proof of Concept")
2024-09-19 10:15:50 +00:00
(description "Facilitates cross-chain atomic swaps")
2024-06-11 07:56:09 +00:00
(home-page "https://github.com/basicswap/basicswap")
2022-11-20 20:22:10 +00:00
(license license:bsd-3)))