dogecoin: cleanup and fix darwin build

This commit is contained in:
Ben Siraphob 2021-11-15 16:42:04 -06:00
parent ea41441023
commit c2472d03bc
No known key found for this signature in database
GPG Key ID: 45F0E5D788143267
2 changed files with 30 additions and 12 deletions

View File

@ -1,8 +1,10 @@
{ lib, stdenv , fetchFromGitHub { lib, stdenv , fetchFromGitHub
, pkg-config, autoreconfHook , pkg-config, autoreconfHook
, db5, openssl, boost, zlib, miniupnpc, libevent , db5, openssl, boost, zlib, miniupnpc, libevent
, protobuf, util-linux, qt4, qrencode , protobuf, qtbase ? null
, withGui }: , wrapQtAppsHook ? null, qttools, qmake ? null, qrencode
, withGui, withUpnp ? true, withUtils ? true, withWallet ? true
, withZmq ? true, zeromq, util-linux ? null, Cocoa ? null }:
with lib; with lib;
stdenv.mkDerivation rec { stdenv.mkDerivation rec {
@ -16,14 +18,30 @@ stdenv.mkDerivation rec {
sha256 = "sha256-Ewefy6sptSQDJVbvQqFoawhA/ujKEn9W2JWyoPYD7d0="; sha256 = "sha256-Ewefy6sptSQDJVbvQqFoawhA/ujKEn9W2JWyoPYD7d0=";
}; };
nativeBuildInputs = [ pkg-config autoreconfHook ]; preConfigure = optionalString withGui ''
buildInputs = [ openssl db5 openssl util-linux export LRELEASE=${getDev qttools}/bin/lrelease
protobuf boost zlib miniupnpc libevent ] '';
++ optionals withGui [ qt4 qrencode ];
configureFlags = [ "--with-incompatible-bdb" nativeBuildInputs = [ pkg-config autoreconfHook util-linux ]
"--with-boost-libdir=${boost.out}/lib" ] ++ optionals withGui [ wrapQtAppsHook qttools ];
++ optionals withGui [ "--with-gui" ];
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 = { meta = {
description = "Wow, such coin, much shiba, very rich"; description = "Wow, such coin, much shiba, very rich";
@ -33,9 +51,9 @@ stdenv.mkDerivation rec {
internet currency." internet currency."
It is named after a famous Internet meme, the "Doge" - a Shiba Inu dog. 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; license = licenses.mit;
maintainers = with maintainers; [ edwtjo offline ]; maintainers = with maintainers; [ edwtjo offline ];
platforms = platforms.linux; platforms = platforms.unix;
}; };
} }

View File

@ -31911,7 +31911,7 @@ with pkgs;
boost = boost170; boost = boost170;
}; };
dogecoin = callPackage ../applications/blockchains/dogecoin { dogecoin = libsForQt5.callPackage ../applications/blockchains/dogecoin {
boost = boost165; boost = boost165;
withGui = true; withGui = true;
}; };