9 , autoSignDarwinBinariesHook
10 , wrapQtAppsHook ? null
28 # de45048 is the last commit when the debian/groestlcoin-qt.desktop file was changed
29 url = "https://raw.githubusercontent.com/Groestlcoin/packaging/de4504844e47cf2c7604789650a5db4f3f7a48aa/debian/groestlcoin-qt.desktop";
30 sha256 = "0mxwq4jvcip44a796iwz7n1ljkhl3a4p47z7qlsxcfxw3zmm0k0k";
33 stdenv.mkDerivation rec {
34 pname = if withGui then "groestlcoin" else "groestlcoind";
37 src = fetchFromGitHub {
38 owner = "Groestlcoin";
41 sha256 = "03w5n3qjha63mgj7zk8q17x5j63la3i4li7bf5i1yw59ijqpmnqg";
44 nativeBuildInputs = [ autoreconfHook pkg-config ]
45 ++ lib.optionals stdenv.isLinux [ util-linux ]
46 ++ lib.optionals stdenv.isDarwin [ hexdump ]
47 ++ lib.optionals (stdenv.isDarwin && stdenv.isAarch64) [ autoSignDarwinBinariesHook ]
48 ++ lib.optionals withGui [ wrapQtAppsHook ];
50 buildInputs = [ boost libevent miniupnpc zeromq zlib ]
51 ++ lib.optionals withWallet [ db53 sqlite ]
52 ++ lib.optionals withGui [ qrencode qtbase qttools ];
54 postInstall = lib.optionalString withGui ''
55 install -Dm644 ${desktop} $out/share/applications/groestlcoin-qt.desktop
56 substituteInPlace $out/share/applications/groestlcoin-qt.desktop --replace "Icon=groestlcoin128" "Icon=groestlcoin"
57 install -Dm644 share/pixmaps/groestlcoin256.png $out/share/pixmaps/groestlcoin.png
61 "--with-boost-libdir=${boost.out}/lib"
63 ] ++ lib.optionals (!withWallet) [
65 ] ++ lib.optionals withGui [
67 "--with-qt-bindir=${qtbase.dev}/bin:${qttools.dev}/bin"
70 nativeCheckInputs = [ python3 ];
72 checkFlags = [ "LC_ALL=en_US.UTF-8" ]
73 # QT_PLUGIN_PATH needs to be set when executing QT, which is needed when testing Groestlcoin's GUI.
74 # See also https://github.com/NixOS/nixpkgs/issues/24256
75 ++ lib.optional withGui "QT_PLUGIN_PATH=${qtbase}/${qtbase.qtPluginPrefix}";
77 enableParallelBuilding = true;
80 description = "Peer-to-peer electronic cash system";
82 Groestlcoin is a free open source peer-to-peer electronic cash system that is
83 completely decentralized, without the need for a central server or trusted
84 parties. Users hold the crypto keys to their own money and transact directly
85 with each other, with the help of a P2P network to check for double-spending.
87 homepage = "https://groestlcoin.org/";
88 downloadPage = "https://github.com/Groestlcoin/groestlcoin/releases/tag/v{version}/";
89 maintainers = with maintainers; [ gruve-p ];
90 license = licenses.mit;
91 platforms = platforms.unix;