From 95c29de58f50352a49c332e9b0bcb1c9fb4adb90 Mon Sep 17 00:00:00 2001 From: Sandro Jäckel Date: Mon, 2 Aug 2021 13:11:50 +0200 Subject: pivx: cleanup, format --- pkgs/applications/blockchains/pivx/default.nix | 53 +++++++++++++++++--------- pkgs/top-level/all-packages.nix | 3 ++ 2 files changed, 39 insertions(+), 17 deletions(-) diff --git a/pkgs/applications/blockchains/pivx/default.nix b/pkgs/applications/blockchains/pivx/default.nix index 58986a10676..fd562edf93f 100644 --- a/pkgs/applications/blockchains/pivx/default.nix +++ b/pkgs/applications/blockchains/pivx/default.nix @@ -1,38 +1,57 @@ -{ fetchFromGitHub, lib, stdenv, pkg-config, autoreconfHook, wrapQtAppsHook ? null -, openssl, db48, boost, zlib, miniupnpc, gmp -, qrencode, glib, protobuf, yasm, libevent -, util-linux, qtbase ? null, qttools ? null +{ fetchFromGitHub +, lib +, stdenv +, pkg-config +, autoreconfHook +, wrapQtAppsHook +, openssl +, db48 +, boost +, zlib +, miniupnpc +, gmp +, qrencode +, glib +, protobuf +, yasm +, libevent +, util-linux +, qtbase +, qttools , enableUpnp ? false , disableWallet ? false , disableDaemon ? false -, withGui ? false }: +, withGui ? false +}: -with lib; stdenv.mkDerivation rec { - name = "pivx-${version}"; + pname = "pivx"; version = "4.1.1"; src = fetchFromGitHub { owner = "PIVX-Project"; - repo= "PIVX"; + repo = "PIVX"; rev = "v${version}"; sha256 = "03ndk46h6093v8s18d5iffz48zhlshq7jrk6vgpjfs6z2iqgd2sy"; }; - nativeBuildInputs = [ pkg-config autoreconfHook ] ++ optionals withGui [ wrapQtAppsHook ]; + nativeBuildInputs = [ pkg-config autoreconfHook ] + ++ lib.optionals withGui [ wrapQtAppsHook ]; + buildInputs = [ glib gmp openssl db48 yasm boost zlib libevent miniupnpc protobuf util-linux ] - ++ optionals withGui [ qtbase qttools qrencode ]; + ++ lib.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" - ]; + ++ 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" + ]; enableParallelBuilding = true; - doChecks = true; + doCheck = true; postBuild = '' mkdir -p $out/share/applications $out/share/icons cp contrib/debian/pivx-qt.desktop $out/share/applications/ diff --git a/pkgs/top-level/all-packages.nix b/pkgs/top-level/all-packages.nix index f4799e5774c..94f162769ba 100644 --- a/pkgs/top-level/all-packages.nix +++ b/pkgs/top-level/all-packages.nix @@ -28786,6 +28786,9 @@ in pivx = libsForQt5.callPackage ../applications/blockchains/pivx { withGui = true; }; pivxd = callPackage ../applications/blockchains/pivx { withGui = false; + qtbase = null; + qttools = null; + wrapQtAppsHook = null; autoreconfHook = buildPackages.autoreconfHook269; }; -- cgit 1.4.1