Skip to content

Commit 71175d0

Browse files
committed
bitcoind: 28.1 -> 29.0
With cmake, $PWD ends up being the "build" directory and to access the source dir (e.g. to access the shell completions), we need to use the parent dir. The cmake flags were mapped from the autotools configure flags as per https://github.com/bitcoin-core/bitcoin-devwiki/wiki/Autotools-to-CMake-Options-Mapping The `miniupnpc` dependency has been dropped in Bitcoin Core v29.0. See https://github.com/bitcoin-core/bitcoin-devwiki/wiki/29.0-Release-Notes-draft#p2p-and-network-changes
1 parent 7df90d8 commit 71175d0

File tree

1 file changed

+12
-18
lines changed

1 file changed

+12
-18
lines changed

pkgs/applications/blockchains/bitcoin/default.nix

Lines changed: 12 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -2,16 +2,13 @@
22
lib,
33
stdenv,
44
fetchurl,
5-
autoreconfHook,
5+
cmake,
66
pkg-config,
77
installShellFiles,
8-
util-linux,
9-
hexdump,
108
autoSignDarwinBinariesHook,
119
wrapQtAppsHook ? null,
1210
boost,
1311
libevent,
14-
miniupnpc,
1512
zeromq,
1613
zlib,
1714
db48,
@@ -35,24 +32,22 @@ let
3532
in
3633
stdenv.mkDerivation (finalAttrs: {
3734
pname = if withGui then "bitcoin" else "bitcoind";
38-
version = "28.1";
35+
version = "29.0";
3936

4037
src = fetchurl {
4138
urls = [
4239
"https://bitcoincore.org/bin/bitcoin-core-${finalAttrs.version}/bitcoin-${finalAttrs.version}.tar.gz"
4340
];
4441
# hash retrieved from signed SHA256SUMS
45-
sha256 = "c5ae2dd041c7f9d9b7c722490ba5a9d624f7e9a089c67090615e1ba4ad0883ba";
42+
sha256 = "882c782c34a3bf2eacd1fae5cdc58b35b869883512f197f7d6dc8f195decfdaa";
4643
};
4744

4845
nativeBuildInputs =
4946
[
50-
autoreconfHook
47+
cmake
5148
pkg-config
5249
installShellFiles
5350
]
54-
++ lib.optionals stdenv.hostPlatform.isLinux [ util-linux ]
55-
++ lib.optionals stdenv.hostPlatform.isDarwin [ hexdump ]
5651
++ lib.optionals (stdenv.hostPlatform.isDarwin && stdenv.hostPlatform.isAarch64) [
5752
autoSignDarwinBinariesHook
5853
]
@@ -62,7 +57,6 @@ stdenv.mkDerivation (finalAttrs: {
6257
[
6358
boost
6459
libevent
65-
miniupnpc
6660
zeromq
6761
zlib
6862
]
@@ -77,6 +71,7 @@ stdenv.mkDerivation (finalAttrs: {
7771

7872
postInstall =
7973
''
74+
cd ..
8075
installShellCompletion --bash contrib/completions/bash/bitcoin-cli.bash
8176
installShellCompletion --bash contrib/completions/bash/bitcoind.bash
8277
installShellCompletion --bash contrib/completions/bash/bitcoin-tx.bash
@@ -95,21 +90,20 @@ stdenv.mkDerivation (finalAttrs: {
9590
install -Dm644 share/pixmaps/bitcoin256.png $out/share/pixmaps/bitcoin.png
9691
'';
9792

98-
configureFlags =
93+
cmakeFlags =
9994
[
100-
"--with-boost-libdir=${boost.out}/lib"
101-
"--disable-bench"
95+
(lib.cmakeBool "BUILD_BENCH" false)
10296
]
10397
++ lib.optionals (!finalAttrs.doCheck) [
104-
"--disable-tests"
105-
"--disable-gui-tests"
98+
(lib.cmakeBool "BUILD_TESTS" false)
99+
(lib.cmakeBool "BUILD_FUZZ_BINARY" false)
100+
(lib.cmakeBool "BUILD_GUI_TESTS" false)
106101
]
107102
++ lib.optionals (!withWallet) [
108-
"--disable-wallet"
103+
(lib.cmakeBool "ENABLE_WALLET" false)
109104
]
110105
++ lib.optionals withGui [
111-
"--with-gui=qt5"
112-
"--with-qt-bindir=${qtbase.dev}/bin:${qttools.dev}/bin"
106+
(lib.cmakeBool "BUILD_GUI" true)
113107
];
114108

115109
nativeCheckInputs = [ python3 ];

0 commit comments

Comments
 (0)