8 , autoSignDarwinBinariesHook
9 , wrapQtAppsHook ? null
26 stdenv.mkDerivation rec {
27 pname = if withGui then "bitcoin-knots" else "bitcoind-knots";
28 version = "23.0.knots20220529";
31 url = "https://bitcoinknots.org/files/23.x/${version}/bitcoin-${version}.tar.gz";
32 sha256 = "0c6l4bvj4ck8gp5vm4dla3l32swsp6ijk12fyf330wgry4mhqxyi";
36 [ autoreconfHook pkg-config ]
37 ++ lib.optionals stdenv.isLinux [ util-linux ]
38 ++ lib.optionals stdenv.isDarwin [ hexdump ]
39 ++ lib.optionals (stdenv.isDarwin && stdenv.isAarch64) [ autoSignDarwinBinariesHook ]
40 ++ lib.optionals withGui [ wrapQtAppsHook ];
42 buildInputs = [ boost libevent miniupnpc zeromq zlib ]
43 ++ lib.optionals withWallet [ db48 sqlite ]
44 ++ lib.optionals withGui [ qrencode qtbase qttools ];
47 "--with-boost-libdir=${boost.out}/lib"
49 ] ++ lib.optionals (!doCheck) [
52 ] ++ lib.optionals (!withWallet) [
54 ] ++ lib.optionals withGui [
56 "--with-qt-bindir=${qtbase.dev}/bin:${qttools.dev}/bin"
59 nativeCheckInputs = [ python3 ];
64 [ "LC_ALL=en_US.UTF-8" ]
65 # QT_PLUGIN_PATH needs to be set when executing QT, which is needed when testing Bitcoin's GUI.
66 # See also https://github.com/NixOS/nixpkgs/issues/24256
67 ++ lib.optional withGui "QT_PLUGIN_PATH=${qtbase}/${qtbase.qtPluginPrefix}";
69 enableParallelBuilding = true;
72 smoke-test = nixosTests.bitcoind-knots;
76 description = "A derivative of Bitcoin Core with a collection of improvements";
77 homepage = "https://bitcoinknots.org/";
78 maintainers = with maintainers; [ prusnak mmahut ];
79 license = licenses.mit;
80 platforms = platforms.unix;