10 , autoSignDarwinBinariesHook
11 , wrapQtAppsHook ? null
29 # de45048 is the last commit when the debian/groestlcoin-qt.desktop file was changed
30 url = "https://raw.githubusercontent.com/Groestlcoin/packaging/de4504844e47cf2c7604789650a5db4f3f7a48aa/debian/groestlcoin-qt.desktop";
31 sha256 = "0mxwq4jvcip44a796iwz7n1ljkhl3a4p47z7qlsxcfxw3zmm0k0k";
34 stdenv.mkDerivation rec {
35 pname = if withGui then "groestlcoin" else "groestlcoind";
38 src = fetchFromGitHub {
39 owner = "Groestlcoin";
42 sha256 = "0kl7nq62362clgzxwwd5c256xnaar4ilxcvbralazxg47zv95r11";
45 nativeBuildInputs = [ autoreconfHook pkg-config installShellFiles ]
46 ++ lib.optionals stdenv.hostPlatform.isLinux [ util-linux ]
47 ++ lib.optionals stdenv.hostPlatform.isDarwin [ hexdump ]
48 ++ lib.optionals (stdenv.hostPlatform.isDarwin && stdenv.hostPlatform.isAarch64) [ autoSignDarwinBinariesHook ]
49 ++ lib.optionals withGui [ wrapQtAppsHook ];
51 buildInputs = [ boost libevent miniupnpc zeromq zlib ]
52 ++ lib.optionals withWallet [ db53 sqlite ]
53 ++ lib.optionals withGui [ qrencode qtbase qttools ];
56 installShellCompletion --bash contrib/completions/bash/groestlcoin-cli.bash
57 installShellCompletion --bash contrib/completions/bash/groestlcoind.bash
58 installShellCompletion --bash contrib/completions/bash/groestlcoin-tx.bash
60 for file in contrib/completions/fish/groestlcoin-*.fish; do
61 installShellCompletion --fish $file
63 '' + lib.optionalString withGui ''
64 installShellCompletion --fish contrib/completions/fish/groestlcoin-qt.fish
66 install -Dm644 ${desktop} $out/share/applications/groestlcoin-qt.desktop
67 substituteInPlace $out/share/applications/groestlcoin-qt.desktop --replace "Icon=groestlcoin128" "Icon=groestlcoin"
68 install -Dm644 share/pixmaps/groestlcoin256.png $out/share/pixmaps/groestlcoin.png
71 preConfigure = lib.optionalString stdenv.hostPlatform.isDarwin ''
72 export MACOSX_DEPLOYMENT_TARGET=10.13
76 "--with-boost-libdir=${boost.out}/lib"
78 ] ++ lib.optionals (!withWallet) [
80 ] ++ lib.optionals withGui [
82 "--with-qt-bindir=${qtbase.dev}/bin:${qttools.dev}/bin"
85 nativeCheckInputs = [ python3 ];
87 checkFlags = [ "LC_ALL=en_US.UTF-8" ]
88 # QT_PLUGIN_PATH needs to be set when executing QT, which is needed when testing Groestlcoin's GUI.
89 # See also https://github.com/NixOS/nixpkgs/issues/24256
90 ++ lib.optional withGui "QT_PLUGIN_PATH=${qtbase}/${qtbase.qtPluginPrefix}";
92 enableParallelBuilding = true;
95 description = "Peer-to-peer electronic cash system";
97 Groestlcoin is a free open source peer-to-peer electronic cash system that is
98 completely decentralized, without the need for a central server or trusted
99 parties. Users hold the crypto keys to their own money and transact directly
100 with each other, with the help of a P2P network to check for double-spending.
102 homepage = "https://groestlcoin.org/";
103 downloadPage = "https://github.com/Groestlcoin/groestlcoin/releases/tag/v{version}/";
104 maintainers = with maintainers; [ gruve-p ];
105 license = licenses.mit;
106 platforms = platforms.unix;