1+ (define-module (bitcoin-knots)
2+ #:use-module ((guix licenses) #:prefix license:)
3+ #:use-module (guix packages)
4+ #:use-module (guix git-download)
5+ #:use-module (guix build-system cmake)
6+ #:use-module (guix gexp)
7+ #:use-module (guix utils)
8+ #:use-module (gnu packages)
9+ #:use-module (gnu packages bash)
10+ #:use-module (gnu packages base)
11+ #:use-module (gnu packages boost)
12+ #:use-module (gnu packages libevent)
13+ #:use-module (gnu packages networking)
14+ #:use-module (gnu packages pkg-config)
15+ #:use-module (gnu packages python)
16+ #:use-module (gnu packages python-xyz)
17+ #:use-module (gnu packages sqlite))
18+
19+ (define-public bitcoin-knots
20+ (package
21+ (name " bitcoin-knots" )
22+ (version " 29.2.knots20251110" )
23+ (source (origin
24+ (method git-fetch)
25+ (uri (git-reference
26+ (url " https://github.com/bitcoinknots/bitcoin" )
27+ (commit (string-append " v" version))))
28+ (sha256
29+ (base32
30+ " 1ljfdqcqyn6hq6bhibvrc7wvayvy01x503qcnnzd5hcnxc7g3cjw" ))))
31+ (build-system cmake-build-system)
32+ (arguments
33+ (list #:configure-flags
34+ #~(list
35+ " -DBUILD_GUI=OFF"
36+ " -DBUILD_BENCH=ON"
37+ " -DWITH_ZMQ=ON"
38+ ; ; TODO: Enable IPC once capnproto is built with -fPIC.
39+ " -DENABLE_IPC=OFF" )
40+ #:phases
41+ #~(modify-phases %standard-phases
42+ (add-before 'build 'set-no-git-flag
43+ (lambda _
44+ ; ; Make it clear we are not building from within a git repository
45+ ; ; (and thus no information regarding this build is available
46+ ; ; from git).
47+ (setenv " BITCOIN_GENBUILD_NO_GIT" " 1" )))
48+ (add-before 'check 'set-home
49+ (lambda _
50+ ; ; Tests write to $HOME.
51+ (setenv " HOME" (getenv " TMPDIR" ))))
52+ (add-after 'check 'check-functional
53+ (lambda _
54+ (invoke
55+ " python3" " ./test/functional/test_runner.py"
56+ (string-append " --jobs=" (number->string (parallel-job-count)))))))))
57+ (native-inputs
58+ (list bash ; provides the sh command for system_tests
59+ coreutils ; provides the cat, echo and false commands for system_tests
60+ pkg-config
61+ python ; for the tests
62+ python-pyzmq ; for the tests
63+ ))
64+ (inputs
65+ (list boost
66+ libevent
67+ sqlite
68+ zeromq))
69+ (home-page " https://bitcoinknots.org/" )
70+ (synopsis " Bitcoin peer-to-peer client" )
71+ (description
72+ " Bitcoin is a digital currency that enables instant payments to anyone
73+ anywhere in the world. It uses peer-to-peer technology to operate without
74+ central authority: managing transactions and issuing money are carried out
75+ collectively by the network. This package provides the Bitcoin Knots command
76+ line client." )
77+ (license license:expat)))
78+
79+ bitcoin-knots
0 commit comments