2021-08-02 13:11:50 +02:00
|
|
|
{ fetchFromGitHub
|
|
|
|
, lib
|
|
|
|
, stdenv
|
|
|
|
, pkg-config
|
|
|
|
, autoreconfHook
|
|
|
|
, wrapQtAppsHook
|
|
|
|
, openssl
|
|
|
|
, db48
|
|
|
|
, boost
|
|
|
|
, zlib
|
|
|
|
, miniupnpc
|
|
|
|
, gmp
|
|
|
|
, qrencode
|
|
|
|
, glib
|
|
|
|
, protobuf
|
|
|
|
, yasm
|
|
|
|
, libevent
|
|
|
|
, util-linux
|
|
|
|
, qtbase
|
|
|
|
, qttools
|
2019-02-11 00:31:32 +01:00
|
|
|
, enableUpnp ? false
|
|
|
|
, disableWallet ? false
|
2021-01-01 14:46:40 +01:00
|
|
|
, disableDaemon ? false
|
2021-08-02 13:11:50 +02:00
|
|
|
, withGui ? false
|
|
|
|
}:
|
2019-02-11 00:31:32 +01:00
|
|
|
|
|
|
|
stdenv.mkDerivation rec {
|
2021-08-02 13:11:50 +02:00
|
|
|
pname = "pivx";
|
2020-06-14 12:54:13 +02:00
|
|
|
version = "4.1.1";
|
2019-02-11 00:31:32 +01:00
|
|
|
|
|
|
|
src = fetchFromGitHub {
|
|
|
|
owner = "PIVX-Project";
|
2021-08-02 13:11:50 +02:00
|
|
|
repo = "PIVX";
|
2019-02-11 00:31:32 +01:00
|
|
|
rev = "v${version}";
|
2020-06-14 12:54:13 +02:00
|
|
|
sha256 = "03ndk46h6093v8s18d5iffz48zhlshq7jrk6vgpjfs6z2iqgd2sy";
|
2019-02-11 00:31:32 +01:00
|
|
|
};
|
|
|
|
|
2021-08-02 13:11:50 +02:00
|
|
|
nativeBuildInputs = [ pkg-config autoreconfHook ]
|
|
|
|
++ lib.optionals withGui [ wrapQtAppsHook ];
|
|
|
|
|
2020-11-24 16:29:28 +01:00
|
|
|
buildInputs = [ glib gmp openssl db48 yasm boost zlib libevent miniupnpc protobuf util-linux ]
|
2021-08-02 13:11:50 +02:00
|
|
|
++ lib.optionals withGui [ qtbase qttools qrencode ];
|
2019-02-11 00:31:32 +01:00
|
|
|
|
|
|
|
configureFlags = [ "--with-boost-libdir=${boost.out}/lib" ]
|
2021-08-02 13:11:50 +02:00
|
|
|
++ lib.optional enableUpnp "--enable-upnp-default"
|
|
|
|
++ lib.optional disableWallet "--disable-wallet"
|
|
|
|
++ lib.optional disableDaemon "--disable-daemon"
|
|
|
|
++ lib.optionals withGui [
|
|
|
|
"--with-gui=yes"
|
|
|
|
"--with-qt-bindir=${lib.getDev qtbase}/bin:${lib.getDev qttools}/bin"
|
|
|
|
];
|
2021-01-01 14:46:40 +01:00
|
|
|
|
2019-02-11 00:31:32 +01:00
|
|
|
enableParallelBuilding = true;
|
2021-08-02 13:11:50 +02:00
|
|
|
doCheck = true;
|
2019-02-11 00:31:32 +01:00
|
|
|
postBuild = ''
|
|
|
|
mkdir -p $out/share/applications $out/share/icons
|
|
|
|
cp contrib/debian/pivx-qt.desktop $out/share/applications/
|
|
|
|
cp share/pixmaps/*128.png $out/share/icons/
|
|
|
|
'';
|
|
|
|
|
2019-10-12 11:13:35 +02:00
|
|
|
doInstallCheck = true;
|
|
|
|
installCheckPhase = ''
|
|
|
|
$out/bin/test_pivx
|
|
|
|
'';
|
|
|
|
|
2021-01-11 08:54:33 +01:00
|
|
|
meta = with lib; {
|
2019-02-11 00:31:32 +01:00
|
|
|
description = "An open source crypto-currency focused on fast private transactions";
|
|
|
|
longDescription = ''
|
|
|
|
PIVX is an MIT licensed, open source, blockchain-based cryptocurrency with
|
|
|
|
ultra fast transactions, low fees, high network decentralization, and
|
|
|
|
Zero Knowledge cryptography proofs for industry-leading transaction anonymity.
|
|
|
|
'';
|
|
|
|
license = licenses.mit;
|
2020-11-11 02:02:57 +01:00
|
|
|
homepage = "https://pivx.org";
|
2019-02-11 00:31:32 +01:00
|
|
|
maintainers = with maintainers; [ wucke13 ];
|
|
|
|
platforms = platforms.unix;
|
|
|
|
};
|
|
|
|
}
|