10 autoSignDarwinBinariesHook,
11 wrapQtAppsHook ? null,
27 stdenv.mkDerivation rec {
28 pname = if withGui then "bitcoin-knots" else "bitcoind-knots";
29 version = "26.1.knots20240325";
32 url = "https://bitcoinknots.org/files/26.x/${version}/bitcoin-${version}.tar.gz";
33 hash = "sha256-PqpePDna2gpCzF2K43N4h6cV5Y9w/e5ZcUvaNEaFaIk=";
37 # upnp: add compatibility for miniupnpc 2.2.8
39 url = "https://github.com/bitcoinknots/bitcoin/commit/643014424359a4783cf9c73bee3346ac2f04e713.patch?full_index=1";
40 hash = "sha256-FdLoNH3+ZZTbqrwRvhbAeJuGz4SgnIvoWUBzRxjfzs8=";
49 ++ lib.optionals stdenv.hostPlatform.isLinux [ util-linux ]
50 ++ lib.optionals stdenv.hostPlatform.isDarwin [ hexdump ]
51 ++ lib.optionals (stdenv.hostPlatform.isDarwin && stdenv.hostPlatform.isAarch64) [
52 autoSignDarwinBinariesHook
54 ++ lib.optionals withGui [ wrapQtAppsHook ];
64 ++ lib.optionals withWallet [ sqlite ]
65 ++ lib.optionals (withWallet && !stdenv.hostPlatform.isDarwin) [ db48 ]
66 ++ lib.optionals withGui [
74 "--with-boost-libdir=${boost.out}/lib"
77 ++ lib.optionals (!doCheck) [
81 ++ lib.optionals (!withWallet) [
84 ++ lib.optionals withGui [
86 "--with-qt-bindir=${qtbase.dev}/bin:${qttools.dev}/bin"
89 nativeCheckInputs = [ python3 ];
94 [ "LC_ALL=en_US.UTF-8" ]
95 # QT_PLUGIN_PATH needs to be set when executing QT, which is needed when testing Bitcoin's GUI.
96 # See also https://github.com/NixOS/nixpkgs/issues/24256
97 ++ lib.optional withGui "QT_PLUGIN_PATH=${qtbase}/${qtbase.qtPluginPrefix}";
99 enableParallelBuilding = true;
102 description = "Derivative of Bitcoin Core with a collection of improvements";
103 homepage = "https://bitcoinknots.org/";
104 changelog = "https://github.com/bitcoinknots/bitcoin/blob/v${version}/doc/release-notes.md";
105 maintainers = with maintainers; [
109 license = licenses.mit;
110 platforms = platforms.unix;