Skip to content

Commit 8ff709e

Browse files
committed
Merge #690: update nixpkgs
97eaa5a update nixpkgs (Jonas Nick) Pull request description: ACKs for top commit: erikarvstedt: ACK 97eaa5a Tree-SHA512: 2442091150834fce92245b26194b23aa9496cc840651a4b52db9aca4aa83feb7809414fe750558fad5bb7d65b209caef99dfc4351278640ed9f6841710fa2598
2 parents fcb7dc4 + 97eaa5a commit 8ff709e

File tree

6 files changed

+150
-12
lines changed

6 files changed

+150
-12
lines changed

flake.lock

Lines changed: 6 additions & 6 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

pkgs/bitcoin/default.nix

Lines changed: 124 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,124 @@
1+
# Copied from nixpkgs 9765893b19b7e121f327f3d2e0d6079386bebea2
2+
{ lib
3+
, stdenv
4+
, fetchurl
5+
, autoreconfHook
6+
, pkg-config
7+
, installShellFiles
8+
, util-linux
9+
, hexdump
10+
, autoSignDarwinBinariesHook
11+
, wrapQtAppsHook ? null
12+
, boost
13+
, libevent
14+
, miniupnpc
15+
, zeromq
16+
, zlib
17+
, db48
18+
, sqlite
19+
, qrencode
20+
, qtbase ? null
21+
, qttools ? null
22+
, python3
23+
, nixosTests
24+
, withGui
25+
, withWallet ? true
26+
}:
27+
28+
let
29+
desktop = fetchurl {
30+
# c2e5f3e is the last commit when the debian/bitcoin-qt.desktop file was changed
31+
url = "https://raw.githubusercontent.com/bitcoin-core/packaging/c2e5f3e20a8093ea02b73cbaf113bc0947b4140e/debian/bitcoin-qt.desktop";
32+
sha256 = "0cpna0nxcd1dw3nnzli36nf9zj28d2g9jf5y0zl9j18lvanvniha";
33+
};
34+
in
35+
stdenv.mkDerivation rec {
36+
pname = if withGui then "bitcoin" else "bitcoind";
37+
version = "26.1";
38+
39+
src = fetchurl {
40+
urls = [
41+
"https://bitcoincore.org/bin/bitcoin-core-${version}/bitcoin-${version}.tar.gz"
42+
];
43+
# hash retrieved from signed SHA256SUMS
44+
sha256 = "9164ee5d717b4a20cb09f0496544d9d32f365734814fe399f5cdb4552a9b35ee";
45+
};
46+
47+
nativeBuildInputs =
48+
[ autoreconfHook pkg-config installShellFiles ]
49+
++ lib.optionals stdenv.isLinux [ util-linux ]
50+
++ lib.optionals stdenv.isDarwin [ hexdump ]
51+
++ lib.optionals (stdenv.isDarwin && stdenv.isAarch64) [ autoSignDarwinBinariesHook ]
52+
++ lib.optionals withGui [ wrapQtAppsHook ];
53+
54+
buildInputs = [ boost libevent miniupnpc zeromq zlib ]
55+
++ lib.optionals withWallet [ db48 sqlite ]
56+
++ lib.optionals withGui [ qrencode qtbase qttools ];
57+
58+
postInstall = ''
59+
installShellCompletion --bash contrib/completions/bash/bitcoin-cli.bash
60+
installShellCompletion --bash contrib/completions/bash/bitcoind.bash
61+
installShellCompletion --bash contrib/completions/bash/bitcoin-tx.bash
62+
63+
installShellCompletion --fish contrib/completions/fish/bitcoin-cli.fish
64+
installShellCompletion --fish contrib/completions/fish/bitcoind.fish
65+
installShellCompletion --fish contrib/completions/fish/bitcoin-tx.fish
66+
installShellCompletion --fish contrib/completions/fish/bitcoin-util.fish
67+
installShellCompletion --fish contrib/completions/fish/bitcoin-wallet.fish
68+
'' + lib.optionalString withGui ''
69+
installShellCompletion --fish contrib/completions/fish/bitcoin-qt.fish
70+
71+
install -Dm644 ${desktop} $out/share/applications/bitcoin-qt.desktop
72+
substituteInPlace $out/share/applications/bitcoin-qt.desktop --replace "Icon=bitcoin128" "Icon=bitcoin"
73+
install -Dm644 share/pixmaps/bitcoin256.png $out/share/pixmaps/bitcoin.png
74+
'';
75+
76+
preConfigure = lib.optionalString stdenv.isDarwin ''
77+
export MACOSX_DEPLOYMENT_TARGET=10.13
78+
'';
79+
80+
configureFlags = [
81+
"--with-boost-libdir=${boost.out}/lib"
82+
"--disable-bench"
83+
] ++ lib.optionals (!doCheck) [
84+
"--disable-tests"
85+
"--disable-gui-tests"
86+
] ++ lib.optionals (!withWallet) [
87+
"--disable-wallet"
88+
] ++ lib.optionals withGui [
89+
"--with-gui=qt5"
90+
"--with-qt-bindir=${qtbase.dev}/bin:${qttools.dev}/bin"
91+
];
92+
93+
nativeCheckInputs = [ python3 ];
94+
95+
doCheck = true;
96+
97+
checkFlags =
98+
[ "LC_ALL=en_US.UTF-8" ]
99+
# QT_PLUGIN_PATH needs to be set when executing QT, which is needed when testing Bitcoin's GUI.
100+
# See also https://github.com/NixOS/nixpkgs/issues/24256
101+
++ lib.optional withGui "QT_PLUGIN_PATH=${qtbase}/${qtbase.qtPluginPrefix}";
102+
103+
enableParallelBuilding = true;
104+
105+
passthru.tests = {
106+
smoke-test = nixosTests.bitcoind;
107+
};
108+
109+
meta = with lib; {
110+
description = "Peer-to-peer electronic cash system";
111+
longDescription = ''
112+
Bitcoin is a free open source peer-to-peer electronic cash system that is
113+
completely decentralized, without the need for a central server or trusted
114+
parties. Users hold the crypto keys to their own money and transact directly
115+
with each other, with the help of a P2P network to check for double-spending.
116+
'';
117+
homepage = "https://bitcoin.org/en/";
118+
downloadPage = "https://bitcoincore.org/bin/bitcoin-core-${version}/";
119+
changelog = "https://bitcoincore.org/en/releases/${version}/";
120+
maintainers = with maintainers; [ prusnak roconnor ];
121+
license = licenses.mit;
122+
platforms = platforms.unix;
123+
};
124+
}

pkgs/default.nix

Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -10,6 +10,22 @@ in
1010
}
1111
}:
1212
let self = {
13+
# TODO-EXTERNAL:
14+
# Remove bitcoin and bitcoind 26.x packages and replace with 27.0 from nixpkgs
15+
# when a version of lnd is released that is compatible with 27.0
16+
# (https://github.com/lightningnetwork/lnd/pull/8664).
17+
bitcoin = let inherit (pkgsUnstable) libsForQt5 stdenv darwin; in
18+
libsForQt5.callPackage ./bitcoin {
19+
stdenv = if stdenv.isDarwin then darwin.apple_sdk_11_0.stdenv else stdenv;
20+
withGui = true;
21+
inherit (darwin) autoSignDarwinBinariesHook;
22+
};
23+
24+
bitcoind = let inherit (pkgsUnstable) callPackage darwin; in
25+
callPackage ./bitcoin {
26+
withGui = false;
27+
inherit (darwin) autoSignDarwinBinariesHook;
28+
};
1329
clightning-rest = pkgs.callPackage ./clightning-rest { inherit (self) fetchNodeModules; };
1430
clboss = pkgs.callPackage ./clboss { };
1531
clightning-plugins = pkgs.recurseIntoAttrs (import ./clightning-plugins pkgs self.nbPython3Packages);

pkgs/pinned.nix

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2,8 +2,6 @@
22
pkgs: pkgsUnstable:
33
{
44
inherit (pkgs)
5-
bitcoin
6-
bitcoind
75
charge-lnd
86
electrs
97
extra-container

test/nixos-search/flake.lock

Lines changed: 3 additions & 3 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

test/tests.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -235,7 +235,7 @@ def _():
235235
'"version"',
236236
)
237237
# Test web server response
238-
assert_matches(f"curl -fsS -L {ip('btcpayserver')}:23000", "Welcome to your BTCPay Server")
238+
assert_matches(f"curl -fsS -L {ip('btcpayserver')}:23000", "Welcome to your BTCPay Server")
239239

240240
@test("rtl")
241241
def _():

0 commit comments

Comments
 (0)