guix-patches
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[bug#74039] [PATCH v2 2/5] gnu: Add python-coincurve


From: jesse
Subject: [bug#74039] [PATCH v2 2/5] gnu: Add python-coincurve
Date: Sun, 27 Oct 2024 22:13:13 +0100

From: Jesse Eisses <jesse@eisses.email>

Change-Id: I2acb09def9193247b1e4169321cf22bdb77c9960
---
 gnu/packages/finance.scm | 30 ++++++++++++++++++++++++++++++
 1 file changed, 30 insertions(+)

diff --git a/gnu/packages/finance.scm b/gnu/packages/finance.scm
index 262380d13e..d96055601d 100644
--- a/gnu/packages/finance.scm
+++ b/gnu/packages/finance.scm
@@ -110,6 +110,7 @@ (define-module (gnu packages finance)
   #:use-module (gnu packages jemalloc)
   #:use-module (gnu packages libedit)
   #:use-module (gnu packages libevent)
+  #:use-module (gnu packages libffi)
   #:use-module (gnu packages libunwind)
   #:use-module (gnu packages libusb)
   #:use-module (gnu packages linux)
@@ -1119,6 +1120,35 @@ (define-public python-ledgercomm
     (description "Library to communicate with Ledger Nano S/X and Speculos")
     (license license:expat)))
 
+(define-public python-coincurve
+  (package
+    (name "python-coincurve")
+    (version "18.0.0")
+    (source (origin
+              (method url-fetch)
+              (uri (pypi-uri "coincurve" version))
+              (sha256
+               (base32
+                "1hagr7hicfc1hkg5lfxj0di53bp3rbpq0rz5h279v80pwjpjcrn8"))))
+    (build-system pyproject-build-system)
+    (propagated-inputs (list python-asn1crypto python-cffi))
+    (home-page "https://pypi.org/project/coincurve";)
+    (inputs (list libsecp256k1))
+    (native-inputs (list autoconf automake libtool pkg-config))
+    (arguments
+     (list #:phases
+           #~(modify-phases %standard-phases
+               (delete 'check)
+               (add-after 'unpack 'use-libsecp256k1-input
+                 (lambda* (#:key inputs #:allow-other-keys)
+                   (let ((lib-dir (string-append
+                                   (assoc-ref inputs "libsecp256k1") "/lib")))
+                     (setenv "LIB_DIR" lib-dir)))))))
+    (synopsis "Cross-platform Python CFFI bindings for libsecp256k1")
+    (description "Cross-platform Python CFFI bindings for libsecp256k1")
+    (license (list license:asl2.0
+                   license:expat))))
+
 (define-public python-trezor
   (package
     (name "python-trezor")
-- 
2.46.0






reply via email to

[Prev in Thread] Current Thread [Next in Thread]