@@ -0,0 +1,43 @@
1+{ stdenv, fetchFromGitHub, pkgconfig, autoreconfHook, openssl, db48, boost
2+, zlib, miniupnpc, qt5, utillinux, protobuf, qrencode, libevent
3+, withGui }:
4+
5+with stdenv.lib;
6+
7+stdenv.mkDerivation rec {
8+
9+ name = "bitcoin" + (toString (optional (!withGui) "d")) + "-abc-" + version;
10+ version = "0.15.0";
11+
12+ src = fetchFromGitHub {
13+ owner = "bitcoin-ABC";
14+ repo = "bitcoin-abc";
15+ rev = "v${version}";
16+ sha256 = "1fygn6cc99iasg5g5jyps5ps873hfnn4ln4hsmcwlwiqd591qxyv";
17+ };
18+
19+ patches = [ ./fix-bitcoin-qt-build.patch ];
20+
21+ nativeBuildInputs = [ pkgconfig autoreconfHook ];
22+ buildInputs = [ openssl db48 boost zlib
23+ miniupnpc utillinux protobuf libevent ]
24+ ++ optionals withGui [ qt5.qtbase qt5.qttools qrencode ];
25+
26+ configureFlags = [ "--with-boost-libdir=${boost.out}/lib" ]
27+ ++ optionals withGui [ "--with-gui=qt5" ];
28+
29+ meta = {
30+ description = "Peer-to-peer electronic cash system (Cash client)";
31+ longDescription= ''
32+ Bitcoin ABC is the name of open source software which enables the use of Bitcoin.
33+ It is designed to facilite a hard fork to increase Bitcoin's block size limit.
34+ "ABC" stands for "Adjustable Blocksize Cap".
35+
36+ Bitcoin ABC is a fork of the Bitcoin Core software project.
37+ '';
38+ homepage = https://bitcoinabc.org/;
39+ maintainers = with maintainers; [ lassulus ];
40+ license = licenses.mit;
41+ platforms = platforms.unix;
42+ };
43+}