about summary refs log tree commit diff
path: root/nixpkgs/pkgs/applications/blockchains/bitcoin.nix
diff options
context:
space:
mode:
Diffstat (limited to 'nixpkgs/pkgs/applications/blockchains/bitcoin.nix')
-rw-r--r--nixpkgs/pkgs/applications/blockchains/bitcoin.nix27
1 files changed, 16 insertions, 11 deletions
diff --git a/nixpkgs/pkgs/applications/blockchains/bitcoin.nix b/nixpkgs/pkgs/applications/blockchains/bitcoin.nix
index 80e935f2b1a8..b241fcc49ee7 100644
--- a/nixpkgs/pkgs/applications/blockchains/bitcoin.nix
+++ b/nixpkgs/pkgs/applications/blockchains/bitcoin.nix
@@ -1,8 +1,9 @@
-{ stdenv
+{ lib, stdenv
 , fetchurl
-, pkgconfig
+, pkg-config
 , autoreconfHook
 , db48
+, sqlite
 , boost
 , zeromq
 , hexdump
@@ -16,11 +17,12 @@
 , qrencode
 , libevent
 , withGui
+, withWallet ? true
 }:
 
-with stdenv.lib;
+with 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";
@@ -36,20 +38,22 @@ 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 =
-    [ 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 sqlite ]
     ++ optionals withGui [ qtbase qttools qrencode ];
 
   postInstall = optional withGui ''
     install -Dm644 ${desktop} $out/share/applications/bitcoin-qt.desktop
-    install -Dm644 share/pixmaps/bitcoin128.png $out/share/pixmaps/bitcoin128.png
+    substituteInPlace $out/share/applications/bitcoin-qt.desktop --replace "Icon=bitcoin128" "Icon=bitcoin"
+    install -Dm644 share/pixmaps/bitcoin256.png $out/share/pixmaps/bitcoin.png
   '';
 
   configureFlags = [
@@ -58,8 +62,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 +92,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;
   };