guix_mirror_bot pushed a commit to branch master
in repository guix.

commit bd069ad03f798bb35cb28b6c1b576e91a7e95dcf
Author: Vinicius Monego <[email protected]>
AuthorDate: Sun Aug 3 21:27:19 2025 -0300

    gnu: Add python-electrum-ecc.
    
    * gnu/packages/finance.scm (python-electrum-ecc): New variable.
    
    Change-Id: Iaa0923fde89d5b4bc0660a91c249af0b21b0d517
---
 gnu/packages/finance.scm | 38 ++++++++++++++++++++++++++++++++++++++
 1 file changed, 38 insertions(+)

diff --git a/gnu/packages/finance.scm b/gnu/packages/finance.scm
index 20c5356765..9a0e8684eb 100644
--- a/gnu/packages/finance.scm
+++ b/gnu/packages/finance.scm
@@ -562,6 +562,44 @@ It's not clear at the moment whether one day it will be 
possible to
 do so.")
     (license license:agpl3+)))
 
+(define-public python-electrum-ecc
+  (package
+    (name "python-electrum-ecc")
+    (version "0.0.5")
+    (source
+     (origin
+       (method url-fetch)
+       (uri (pypi-uri "electrum_ecc" version))
+       (sha256
+        (base32 "1lmp5zmhabaxp6jha3xlsmqviivrxxhsy20x6z42ayqgd9cvhczp"))
+       (modules '((guix build utils)))
+       (snippet
+        '(begin
+           ;; Delete the vendored dependency.
+           (delete-file-recursively "libsecp256k1")))))
+    (build-system pyproject-build-system)
+    (arguments
+     (list
+      #:phases #~(modify-phases %standard-phases
+                   (add-after 'unpack 'prepare-env
+                     (lambda* (#:key inputs #:allow-other-keys)
+                       ;; Do not attempt to compile vendored libsecp256k1.
+                       (setenv "ELECTRUM_ECC_DONT_COMPILE" "1")
+                       ;; Make the package find our libsecp256k1.
+                       (substitute* "src/electrum_ecc/ecc_fast.py"
+                         (("library_paths = \\[\\]")
+                          (string-append
+                           "library_paths = ['"
+                           (search-input-file inputs "/lib/libsecp256k1.so")
+                           "']"))))))))
+    (native-inputs (list python-pytest python-setuptools python-wheel))
+    (inputs (list libsecp256k1))
+    (home-page "https://github.com/spesmilo/electrum-ecc";)
+    (synopsis "Pure python ctypes wrapper for libsecp256k1")
+    (description "This package provides a pure Python ctypes wrapper for
+@code{libsecp256k1}.")
+    (license license:expat)))
+
 (define-public electrum
   (package
     (name "electrum")

Reply via email to