summary refs log tree commit diff
path: root/pkgs/applications/altcoins/darkcoin.nix
blob: 89ff12f8f7425d4ba5dcc971ab61bb1d92236c0d (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
{ fetchzip, stdenv, pkgconfig
, openssl, db48, boost, zlib, miniupnpc, qt4, qrencode, glib, protobuf
, utillinux
, withGui }:

with stdenv.lib;
stdenv.mkDerivation rec {

  name = "darkcoin" + (toString (optional (!withGui) "d")) + "-" + version;
  version = "0.10.99.99";

  src = fetchzip {
    url = "https://github.com/darkcoin/darkcoin/archive/v${version}.tar.gz";
    sha256 = "0sigvimqwc1mvaq43a8c2aq7fjla2ncafrals08qfq3jd6in8b4f";
  };

  buildInputs = [ pkgconfig glib openssl db48 boost zlib miniupnpc ]
                  ++ optionals withGui [ qt4 qrencode ];

  configurePhase = optional withGui "qmake";

  preBuild = optional (!withGui) "cd src; cp makefile.unix Makefile";

  installPhase =
    if withGui
    then "install -D darkcoin-qt $out/bin/darkcoin-qt"
    else "install -D darkcoind $out/bin/darkcoind";

  meta = with stdenv.lib; {
    description = "A decentralized key/value registration and transfer system";
    longDescription = ''
      Darkcoin (DRK) is an open sourced, privacy-centric digital
      currency. It allows you keep your finances private as you make
      transactions, similar to cash.
    '';
    homepage = http://darkcoin.io;
    maintainers = with maintainers; [ AndersonTorres ];
    platforms = with platforms; unix;
  };
}