nixpkgs/pkgs/applications/blockchains/pivx.nix

60 lines
2.1 KiB
Nix
Raw Normal View History

{ fetchFromGitHub, lib, stdenv, pkg-config, autoreconfHook, wrapQtAppsHook ? null
2020-06-14 11:54:13 +01:00
, openssl, db48, boost, zlib, miniupnpc, gmp
2019-02-10 23:31:32 +00:00
, qrencode, glib, protobuf, yasm, libevent
2020-11-24 15:29:28 +00:00
, util-linux, qtbase ? null, qttools ? null
2019-02-10 23:31:32 +00:00
, enableUpnp ? false
, disableWallet ? false
2021-01-01 13:46:40 +00:00
, disableDaemon ? false
2019-02-10 23:31:32 +00:00
, withGui ? false }:
2021-01-15 13:21:58 +00:00
with lib;
2019-02-10 23:31:32 +00:00
stdenv.mkDerivation rec {
name = "pivx-${version}";
2020-06-14 11:54:13 +01:00
version = "4.1.1";
2019-02-10 23:31:32 +00:00
src = fetchFromGitHub {
owner = "PIVX-Project";
repo= "PIVX";
rev = "v${version}";
2020-06-14 11:54:13 +01:00
sha256 = "03ndk46h6093v8s18d5iffz48zhlshq7jrk6vgpjfs6z2iqgd2sy";
2019-02-10 23:31:32 +00:00
};
nativeBuildInputs = [ pkg-config autoreconfHook ] ++ optionals withGui [ wrapQtAppsHook ];
2020-11-24 15:29:28 +00:00
buildInputs = [ glib gmp openssl db48 yasm boost zlib libevent miniupnpc protobuf util-linux ]
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"
"--with-qt-bindir=${qtbase.dev}/bin:${qttools.dev}/bin"
];
2021-01-01 13:46:40 +00:00
2019-02-10 23:31:32 +00:00
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/
'';
doInstallCheck = true;
installCheckPhase = ''
$out/bin/test_pivx
'';
meta = with lib; {
2019-02-10 23:31:32 +00: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;
homepage = "https://pivx.org";
2019-02-10 23:31:32 +00:00
maintainers = with maintainers; [ wucke13 ];
platforms = platforms.unix;
};
}