diff options
Diffstat (limited to 'pkgs/applications/blockchains/bitcoin.nix')
-rw-r--r-- | pkgs/applications/blockchains/bitcoin.nix | 56 |
1 files changed, 34 insertions, 22 deletions
diff --git a/pkgs/applications/blockchains/bitcoin.nix b/pkgs/applications/blockchains/bitcoin.nix index 65feac9565b..00727d294df 100644 --- a/pkgs/applications/blockchains/bitcoin.nix +++ b/pkgs/applications/blockchains/bitcoin.nix @@ -1,26 +1,30 @@ -{ stdenv +{ lib +, stdenv , fetchurl -, pkgconfig , autoreconfHook -, db48 +, pkg-config +, util-linux +, hexdump +, wrapQtAppsHook ? null , boost +, libevent +, miniupnpc , zeromq -, hexdump , zlib -, miniupnpc +, db48 +, sqlite +, qrencode , qtbase ? null , qttools ? null -, wrapQtAppsHook ? null -, utillinux , python3 -, qrencode -, libevent +, nixosTests , withGui +, withWallet ? true }: -with stdenv.lib; +with lib; let - version = "0.20.1"; + version = "0.21.1"; majorMinorVersion = versions.majorMinor version; desktop = fetchurl { url = "https://raw.githubusercontent.com/bitcoin-core/packaging/${majorMinorVersion}/debian/bitcoin-qt.desktop"; @@ -36,20 +40,23 @@ 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 = "caff23449220cf45753f312cefede53a9eac64000bb300797916526236b6a1e0"; }; nativeBuildInputs = - [ pkgconfig autoreconfHook ] - ++ optional stdenv.isDarwin hexdump - ++ optional withGui wrapQtAppsHook; - buildInputs = [ db48 boost zlib zeromq miniupnpc libevent ] - ++ optionals stdenv.isLinux [ utillinux ] - ++ optionals withGui [ qtbase qttools qrencode ]; + [ autoreconfHook pkg-config ] + ++ optionals stdenv.isLinux [ util-linux ] + ++ optionals stdenv.isDarwin [ hexdump ] + ++ optionals withGui [ wrapQtAppsHook ]; + + buildInputs = [ boost libevent miniupnpc zeromq zlib ] + ++ optionals withWallet [ db48 sqlite ] + ++ optionals withGui [ qrencode qtbase qttools ]; 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 +65,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" ]; @@ -76,6 +84,10 @@ stdenv.mkDerivation rec { enableParallelBuilding = true; + passthru.tests = { + smoke-test = nixosTests.bitcoind; + }; + meta = { description = "Peer-to-peer electronic cash system"; longDescription = '' @@ -87,7 +99,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 AndersonTorres ]; + maintainers = with maintainers; [ prusnak roconnor ]; license = licenses.mit; platforms = platforms.unix; }; |