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

with stdenv.lib;
stdenv.mkDerivation rec {

  name = "dogecoin" + (toString (optional (!withGui) "d")) + "-" + version;
  version = "1.8.2";

  src = fetchurl {
    url = "https://github.com/dogecoin/dogecoin/archive/v${version}.tar.gz";
    sha256 = "17jxsxsrsz3qy2hxdpw78vcbnnd0nq614iy42ypzhw4pdpz0s1l7";
  };

  buildInputs = [ autoreconfHook pkgconfig openssl
                  db5 openssl utillinux protobuf boost zlib miniupnpc ]
                  ++ optionals withGui [ qt4 qrencode ];

  # BSD DB5 location
  patchPhase = ''
    sed -i \
      -e 's,BDB_CPPFLAGS=$,BDB_CPPFLAGS="-I${db5}/include",g' \
      -e 's,BDB_LIBS=$,BDB_LIBS="-L${db5}/lib",g' \
      -e 's,bdbdirlist=$,bdbdirlist="${db5}/include",g' \
      src/m4/dogecoin_find_bdb51.m4
  '';

  configureFlags = [ "--with-incompatible-bdb"
                     "--with-boost-libdir=${boost.lib}/lib" ]
                     ++ optionals withGui [ "--with-gui" ];

  meta = {
    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 = http://www.dogecoin.com/;
    license = licenses.mit;
    maintainers = with maintainers; [ edwtjo offline AndersonTorres ];
  };
}