From c2472d03bc8b59c87281789b578b10e7e54082b9 Mon Sep 17 00:00:00 2001 From: Ben Siraphob Date: Mon, 15 Nov 2021 16:42:04 -0600 Subject: [PATCH] dogecoin: cleanup and fix darwin build --- .../blockchains/dogecoin/default.nix | 40 ++++++++++++++----- pkgs/top-level/all-packages.nix | 2 +- 2 files changed, 30 insertions(+), 12 deletions(-) diff --git a/pkgs/applications/blockchains/dogecoin/default.nix b/pkgs/applications/blockchains/dogecoin/default.nix index 8094959a248d..d4121b65f50e 100644 --- a/pkgs/applications/blockchains/dogecoin/default.nix +++ b/pkgs/applications/blockchains/dogecoin/default.nix @@ -1,8 +1,10 @@ { lib, stdenv , fetchFromGitHub , pkg-config, autoreconfHook , db5, openssl, boost, zlib, miniupnpc, libevent -, protobuf, util-linux, qt4, qrencode -, withGui }: +, protobuf, qtbase ? null +, wrapQtAppsHook ? null, qttools, qmake ? null, qrencode +, withGui, withUpnp ? true, withUtils ? true, withWallet ? true +, withZmq ? true, zeromq, util-linux ? null, Cocoa ? null }: with lib; stdenv.mkDerivation rec { @@ -16,14 +18,30 @@ stdenv.mkDerivation rec { sha256 = "sha256-Ewefy6sptSQDJVbvQqFoawhA/ujKEn9W2JWyoPYD7d0="; }; - nativeBuildInputs = [ pkg-config autoreconfHook ]; - buildInputs = [ openssl db5 openssl util-linux - protobuf boost zlib miniupnpc libevent ] - ++ optionals withGui [ qt4 qrencode ]; + preConfigure = optionalString withGui '' + export LRELEASE=${getDev qttools}/bin/lrelease + ''; - configureFlags = [ "--with-incompatible-bdb" - "--with-boost-libdir=${boost.out}/lib" ] - ++ optionals withGui [ "--with-gui" ]; + nativeBuildInputs = [ pkg-config autoreconfHook util-linux ] + ++ optionals withGui [ wrapQtAppsHook qttools ]; + + buildInputs = [ openssl protobuf boost zlib libevent ] + ++ optionals withGui [ qtbase qrencode ] + ++ optionals withUpnp [ miniupnpc ] + ++ optionals withWallet [ db5 ] + ++ optionals withZmq [ zeromq ] + ++ optionals stdenv.isDarwin [ Cocoa ]; + + configureFlags = [ + "--with-incompatible-bdb" + "--with-boost-libdir=${boost.out}/lib" + ] ++ optionals (!withGui) [ "--with-gui=no" ] + ++ optionals (!withUpnp) [ "--without-miniupnpc" ] + ++ optionals (!withUtils) [ "--without-utils" ] + ++ optionals (!withWallet) [ "--disable-wallet" ] + ++ optionals (!withZmq) [ "--disable-zmq" ]; + + enableParallelBuilding = true; meta = { description = "Wow, such coin, much shiba, very rich"; @@ -33,9 +51,9 @@ stdenv.mkDerivation rec { internet currency." It is named after a famous Internet meme, the "Doge" - a Shiba Inu dog. ''; - homepage = "http://www.dogecoin.com/"; + homepage = "https://www.dogecoin.com/"; license = licenses.mit; maintainers = with maintainers; [ edwtjo offline ]; - platforms = platforms.linux; + platforms = platforms.unix; }; } diff --git a/pkgs/top-level/all-packages.nix b/pkgs/top-level/all-packages.nix index de50a74f5cea..019c300af7bf 100644 --- a/pkgs/top-level/all-packages.nix +++ b/pkgs/top-level/all-packages.nix @@ -31911,7 +31911,7 @@ with pkgs; boost = boost170; }; - dogecoin = callPackage ../applications/blockchains/dogecoin { + dogecoin = libsForQt5.callPackage ../applications/blockchains/dogecoin { boost = boost165; withGui = true; };