2019-10-12 10:13:35 +01:00
|
|
|
{ fetchFromGitHub, stdenv, pkgconfig, autoreconfHook, wrapQtAppsHook ? null
|
|
|
|
, openssl_1_0_2, db48, boost, zlib, miniupnpc, gmp
|
2019-02-10 23:31:32 +00:00
|
|
|
, qrencode, glib, protobuf, yasm, libevent
|
|
|
|
, utillinux, qtbase ? null, qttools ? null
|
|
|
|
, enableUpnp ? false
|
|
|
|
, disableWallet ? false
|
|
|
|
, disableDaemon ? false
|
|
|
|
, withGui ? false }:
|
|
|
|
|
|
|
|
with stdenv.lib;
|
|
|
|
stdenv.mkDerivation rec {
|
2019-10-12 10:13:35 +01:00
|
|
|
name = "pivx-${version}";
|
|
|
|
version = "3.4.0";
|
2019-02-10 23:31:32 +00:00
|
|
|
|
|
|
|
src = fetchFromGitHub {
|
|
|
|
owner = "PIVX-Project";
|
|
|
|
repo= "PIVX";
|
|
|
|
rev = "v${version}";
|
2019-10-12 10:13:35 +01:00
|
|
|
sha256 = "1fqccdqhbwyvix0ihhbgg2w048i6bhfmazr36h2cn4j65n1fgmi2";
|
2019-02-10 23:31:32 +00:00
|
|
|
};
|
|
|
|
|
2019-10-12 10:13:35 +01:00
|
|
|
nativeBuildInputs = [ pkgconfig autoreconfHook ] ++ optionals withGui [ wrapQtAppsHook ];
|
|
|
|
buildInputs = [ glib gmp openssl_1_0_2 db48 yasm boost zlib libevent miniupnpc protobuf utillinux ]
|
2019-02-10 23:31:32 +00:00
|
|
|
++ optionals withGui [ qtbase qttools qrencode ];
|
|
|
|
|
|
|
|
configureFlags = [ "--with-boost-libdir=${boost.out}/lib" ]
|
|
|
|
++ optional enableUpnp "--enable-upnp-default"
|
|
|
|
++ optional disableWallet "--disable-wallet"
|
|
|
|
++ optional disableDaemon "--disable-daemon"
|
|
|
|
++ optionals withGui [ "--with-gui=yes"
|
2019-10-12 10:13:35 +01:00
|
|
|
"--with-unsupported-ssl" # TODO remove this ASAP
|
2019-02-10 23:31:32 +00:00
|
|
|
"--with-qt-bindir=${qtbase.dev}/bin:${qttools.dev}/bin"
|
|
|
|
];
|
|
|
|
|
|
|
|
enableParallelBuilding = true;
|
|
|
|
doChecks = true;
|
|
|
|
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 10:13:35 +01:00
|
|
|
doInstallCheck = true;
|
|
|
|
installCheckPhase = ''
|
|
|
|
$out/bin/test_pivx
|
|
|
|
'';
|
|
|
|
|
2019-02-10 23:31:32 +00:00
|
|
|
meta = with stdenv.lib; {
|
|
|
|
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;
|
|
|
|
homepage = https://www.dash.org;
|
|
|
|
maintainers = with maintainers; [ wucke13 ];
|
|
|
|
platforms = platforms.unix;
|
2019-10-12 10:13:35 +01:00
|
|
|
# TODO
|
2019-08-20 20:24:40 +01:00
|
|
|
# upstream doesn't support newer openssl versions
|
|
|
|
# https://github.com/PIVX-Project/PIVX/issues/748
|
2019-10-12 10:13:35 +01:00
|
|
|
# openssl_1_0_2 should be replaced with openssl ASAP
|
2019-02-10 23:31:32 +00:00
|
|
|
};
|
|
|
|
}
|