about summary refs log tree commit diff
path: root/pkgs/applications/blockchains/dogecoin/default.nix
blob: 421c2fe667e0591c5bd1e174fbb87f9dd61c74f7 (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
{ lib, stdenv , fetchFromGitHub
, pkg-config, autoreconfHook
, db5, openssl, boost, zlib, miniupnpc, libevent
, protobuf, qtbase ? null
, wrapQtAppsHook ? null, qttools ? null, qmake ? null, qrencode
, withGui, withUpnp ? true, withUtils ? true, withWallet ? true
, withZmq ? true, zeromq, util-linux ? null, Cocoa ? null }:

stdenv.mkDerivation rec {
  pname = "dogecoin" + lib.optionalString (!withGui) "d";
  version = "1.14.6";

  src = fetchFromGitHub {
    owner = "dogecoin";
    repo = "dogecoin";
    rev = "v${version}";
    sha256 = "sha256-PmbmmA2Mq07dwB3cI7A9c/ewtu0I+sWvQT39Yekm/sU=";
  };

  preConfigure = lib.optionalString withGui ''
    export LRELEASE=${lib.getDev qttools}/bin/lrelease
  '';

  nativeBuildInputs = [ pkg-config autoreconfHook util-linux ]
    ++ lib.optionals withGui [ wrapQtAppsHook qttools ];

  buildInputs = [ openssl protobuf boost zlib libevent ]
    ++ lib.optionals withGui [ qtbase qrencode ]
    ++ lib.optionals withUpnp [ miniupnpc ]
    ++ lib.optionals withWallet [ db5 ]
    ++ lib.optionals withZmq [ zeromq ]
    ++ lib.optionals stdenv.isDarwin [ Cocoa ];

  configureFlags = [
    "--with-incompatible-bdb"
    "--with-boost-libdir=${boost.out}/lib"
  ] ++ lib.optionals (!withGui) [ "--with-gui=no" ]
    ++ lib.optionals (!withUpnp) [ "--without-miniupnpc" ]
    ++ lib.optionals (!withUtils) [ "--without-utils" ]
    ++ lib.optionals (!withWallet) [ "--disable-wallet" ]
    ++ lib.optionals (!withZmq) [ "--disable-zmq" ];

  enableParallelBuilding = true;

  meta = with lib; {
    description = "Wow, such coin, much shiba, very rich";
    longDescription = ''
      Dogecoin is a decentralized, peer-to-peer digital currency that
      enables you to easily send money online. Think of it as "the
      internet currency."
      It is named after a famous Internet meme, the "Doge" - a Shiba Inu dog.
    '';
    homepage = "https://www.dogecoin.com/";
    license = licenses.mit;
    maintainers = with maintainers; [ edwtjo offline ];
    platforms = platforms.unix;
  };
}