guix_mirror_bot pushed a commit to branch master
in repository guix.

commit 975ebf51aff3685cdf8e8558e4f8dd8b5ad71d14
Author: Danny Milosavljevic <[email protected]>
AuthorDate: Tue Sep 15 18:25:21 2026 +0200

    gnu: Add go-github-com-btcsuite-btcd-chaincfg-chainhash.
    
    * gnu/packages/golang-crypto.scm 
(go-github-com-btcsuite-btcd-chaincfg-chainhash):
    New variable.
    
    Relates-to: guix/guix!11226, guix/guix!11258
    Reviewed-by: Orahcio FelĂ­cio de Sousa <[email protected]>
    Signed-off-by: Sharlatan Hellseher <[email protected]>
---
 gnu/packages/golang-crypto.scm | 37 +++++++++++++++++++++++++++++++++++++
 1 file changed, 37 insertions(+)

diff --git a/gnu/packages/golang-crypto.scm b/gnu/packages/golang-crypto.scm
index 503435fe542..eb061a34e61 100644
--- a/gnu/packages/golang-crypto.scm
+++ b/gnu/packages/golang-crypto.scm
@@ -650,6 +650,43 @@ been designed so it can be used as a standalone package 
for any projects
 needing to use secp256k1 elliptic curve cryptography.")
       (license license:isc))))
 
+(define-public go-github-com-btcsuite-btcd-chaincfg-chainhash
+  (package
+    (name "go-github-com-btcsuite-btcd-chaincfg-chainhash")
+    (version "1.2.0")
+    (source
+     (origin
+       (method git-fetch)
+       (uri (git-reference
+             (url "https://github.com/btcsuite/btcd";)
+             (commit (go-version->git-ref version
+                                          #:subdir "chaincfg/chainhash"))))
+       (file-name (git-file-name name version))
+       (sha256
+        (base32 "007gkn1xwpicdj77kk42ij9sd7r21bcvgiri3yw6xnkdlnsg3bkq"))
+       (modules '((guix build utils)
+                  (ice-9 ftw)
+                  (srfi srfi-26)))
+       (snippet
+        #~(begin
+            (define (delete-all-but directory . preserve)
+              (with-directory-excursion directory
+                (let* ((pred (negate (cut member <>
+                                          (cons* "." ".." preserve))))
+                       (items (scandir "." pred)))
+                  (for-each (cut delete-file-recursively <>) items))))
+            (delete-all-but "chaincfg" "chainhash")
+            (delete-all-but "." "chaincfg")))))
+    (build-system go-build-system)
+    (arguments
+     (list
+      #:import-path "github.com/btcsuite/btcd/chaincfg/chainhash"
+      #:unpack-path "github.com/btcsuite/btcd"))
+    (home-page "https://github.com/btcsuite/btcd";)
+    (synopsis "Bitcoin hash functionality in Go")
+    (description "This package provides Bitcoin hash functionality.")
+    (license license:isc)))
+
 (define-public go-github-com-bwesterb-go-ristretto
   (package
     (name "go-github-com-bwesterb-go-ristretto")

Reply via email to