From 672607c41f28570ea435989ac9f470e528a062ff Mon Sep 17 00:00:00 2001 From: Pavol Rusnak Date: Sun, 13 Dec 2020 16:53:02 +0100 Subject: [PATCH 1/2] bitcoin: introduce withWallet flag, allow building without wallet --- pkgs/applications/blockchains/bitcoin.nix | 15 +++++++++------ 1 file changed, 9 insertions(+), 6 deletions(-) diff --git a/pkgs/applications/blockchains/bitcoin.nix b/pkgs/applications/blockchains/bitcoin.nix index 80e935f2b1a8..3bda048a0cf3 100644 --- a/pkgs/applications/blockchains/bitcoin.nix +++ b/pkgs/applications/blockchains/bitcoin.nix @@ -1,6 +1,6 @@ { stdenv , fetchurl -, pkgconfig +, pkg-config , autoreconfHook , db48 , boost @@ -16,6 +16,7 @@ , qrencode , libevent , withGui +, withWallet ? true }: with stdenv.lib; @@ -40,11 +41,12 @@ stdenv.mkDerivation rec { }; nativeBuildInputs = - [ pkgconfig autoreconfHook ] + [ pkg-config autoreconfHook ] ++ optional stdenv.isDarwin hexdump ++ optional withGui wrapQtAppsHook; - buildInputs = [ db48 boost zlib zeromq miniupnpc libevent ] + buildInputs = [ boost zlib zeromq miniupnpc libevent ] ++ optionals stdenv.isLinux [ util-linux ] + ++ optionals withWallet [ db48 ] ++ optionals withGui [ qtbase qttools qrencode ]; postInstall = optional withGui '' @@ -58,8 +60,9 @@ stdenv.mkDerivation rec { ] ++ optionals (!doCheck) [ "--disable-tests" "--disable-gui-tests" - ] - ++ optionals withGui [ + ] ++ optionals (!withWallet) [ + "--disable-wallet" + ] ++ optionals withGui [ "--with-gui=qt5" "--with-qt-bindir=${qtbase.dev}/bin:${qttools.dev}/bin" ]; @@ -87,7 +90,7 @@ stdenv.mkDerivation rec { homepage = "https://bitcoin.org/"; downloadPage = "https://bitcoincore.org/bin/bitcoin-core-${version}/"; changelog = "https://bitcoincore.org/en/releases/${version}/"; - maintainers = with maintainers; [ roconnor ]; + maintainers = with maintainers; [ prusnak roconnor ]; license = licenses.mit; platforms = platforms.unix; }; From f324c9a0b616bc0cb48ddded1744bfc66129346f Mon Sep 17 00:00:00 2001 From: Pavol Rusnak Date: Sat, 16 Jan 2021 13:44:40 +0100 Subject: [PATCH 2/2] bitcoin: 0.20.1 -> 0.21.0 + add sqlite to buildInputs (if wallet is enabled) --- pkgs/applications/blockchains/bitcoin.nix | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/pkgs/applications/blockchains/bitcoin.nix b/pkgs/applications/blockchains/bitcoin.nix index 3bda048a0cf3..3d4e9c038be0 100644 --- a/pkgs/applications/blockchains/bitcoin.nix +++ b/pkgs/applications/blockchains/bitcoin.nix @@ -3,6 +3,7 @@ , pkg-config , autoreconfHook , db48 +, sqlite , boost , zeromq , hexdump @@ -21,7 +22,7 @@ with stdenv.lib; let - version = "0.20.1"; + version = "0.21.0"; majorMinorVersion = versions.majorMinor version; desktop = fetchurl { url = "https://raw.githubusercontent.com/bitcoin-core/packaging/${majorMinorVersion}/debian/bitcoin-qt.desktop"; @@ -37,7 +38,7 @@ stdenv.mkDerivation rec { "https://bitcoincore.org/bin/bitcoin-core-${version}/bitcoin-${version}.tar.gz" "https://bitcoin.org/bin/bitcoin-core-${version}/bitcoin-${version}.tar.gz" ]; - sha256 = "4bbd62fd6acfa5e9864ebf37a24a04bc2dcfe3e3222f056056288d854c53b978"; + sha256 = "1a91202c62ee49fb64d57a52b8d6d01cd392fffcbef257b573800f9289655f37"; }; nativeBuildInputs = @@ -46,7 +47,7 @@ stdenv.mkDerivation rec { ++ optional withGui wrapQtAppsHook; buildInputs = [ boost zlib zeromq miniupnpc libevent ] ++ optionals stdenv.isLinux [ util-linux ] - ++ optionals withWallet [ db48 ] + ++ optionals withWallet [ db48 sqlite ] ++ optionals withGui [ qtbase qttools qrencode ]; postInstall = optional withGui ''