From 47c1237f6d7aa02cf9817c3f53af29cd9fd0f809 Mon Sep 17 00:00:00 2001 From: tecnovert Date: Sun, 20 Nov 2022 22:22:10 +0200 Subject: [PATCH] guix: pack. --- README.md | 16 ++------------ doc/guix.md | 25 +++++++++++++++++++++ guix.scm | 63 +++++++++++++++++++++++++++++++---------------------- 3 files changed, 64 insertions(+), 40 deletions(-) create mode 100644 doc/guix.md diff --git a/README.md b/README.md index 802be65..6db7f4c 100644 --- a/README.md +++ b/README.md @@ -22,19 +22,7 @@ Not ready for real-world use. Discuss development and help with testing in the matrix channel [#basicswap:matrix.org](https://riot.im/app/#/room/#basicswap:matrix.org) -## Guix +## Install notes -Start a development environment - - guix shell --pure -D -f guix.scm - - -Run tests - - export PYTHONPATH=$(pwd) - - # Prepare coin binaries - required once - python ./bin/basicswap-prepare.py -preparebinonly --withcoins=monero,bitcoin,particl,litecoin - - pytest -vs tests/basicswap/test_run.py::Test::test_02_part_ltc +Please see [doc/install.md](doc/install.md) diff --git a/doc/guix.md b/doc/guix.md new file mode 100644 index 0000000..a525f4b --- /dev/null +++ b/doc/guix.md @@ -0,0 +1,25 @@ +## Guix + +Start a development environment + + guix shell --pure -L. -D basicswap + + +Run tests + + export PYTHONPATH=$(pwd) + + # Prepare coin binaries - required once + python ./bin/basicswap-prepare.py -preparebinonly --withcoins=monero,bitcoin,particl,litecoin + + pytest -vs tests/basicswap/test_run.py::Test::test_02_part_ltc + + +Install package + + guix package --install -L. basicswap + + +Create a guix pack + + guix pack -RR -S /opt/gnu/bin=bin -L. basicswap diff --git a/guix.scm b/guix.scm index ff927c3..dfb69db 100644 --- a/guix.scm +++ b/guix.scm @@ -1,25 +1,25 @@ -(use-modules - (guix packages) - ((guix licenses) #:prefix license:) - (guix build-system python) - (guix build-system gnu) - (guix git-download) - (guix download) - (gnu packages) - (gnu packages pkg-config) - (gnu packages autotools) - (gnu packages certs) - (gnu packages check) - (gnu packages databases) - (gnu packages finance) - (gnu packages gnupg) - (gnu packages protobuf) - (gnu packages python) - (gnu packages python-build) - (gnu packages python-crypto) - (gnu packages python-xyz) - (gnu packages libffi) - (gnu packages license)) +(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) +#: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)) (define libsecp256k1-anonswap (package @@ -112,19 +112,27 @@ (sha256 (base32 "09sx2lghywnm7qj1xm8xc3xrgj40bndfh2hbiaq4cfvm71h8k541")))))) +(define-public basicswap (package (name "basicswap") (version "0.11.49") - (source #f) + (source (origin + (method git-fetch) + (uri (git-reference + (url "https://github.com/tecnovert/basicswap") + (commit "d15cf3dd6fd45ce16cbc804a2d26260567b44d75"))) + (sha256 + (base32 + "023yhncqhp22h7wmkmkj0wc0627vbwlbr6mp5cpjwccalvxziskv")) + (file-name (git-file-name name version)))) (build-system python-build-system) + (arguments `(#:tests? #f)) ; TODO: Add coin binaries (propagated-inputs (list gnupg nss-certs python-coincurve-anonswap python-pycryptodome - python-pylint - python-pyflakes python-pytest python-protobuf python-sqlalchemy-1.4.39 @@ -137,8 +145,11 @@ (native-inputs (list python-setuptools + python-wheel + python-pylint + python-pyflakes )) (synopsis "Simple Atomic Swap Network - Proof of Concept") (description #f) (home-page "https://github.com/tecnovert/basicswap") - (license license:bsd-3)) + (license license:bsd-3)))