1 { lib, stdenv, mkDerivation, fetchFromGitHub, fetchpatch
2 , pkg-config, autoreconfHook
3 , openssl, db48, boost, zlib, miniupnpc
4 , glib, protobuf, util-linux, qrencode
6 , withGui ? true, libevent
13 pname = "litecoin" + lib.optionalString (!withGui) "d";
16 src = fetchFromGitHub {
17 owner = "litecoin-project";
20 sha256 = "sha256-TuDc47TZOEQA5Lr4DQkEhnO/Szp9h71xPjaBL3jFWuM=";
25 name = "boost1770.patch";
26 url = "https://aur.archlinux.org/cgit/aur.git/plain/boost1770.patch?h=litecoin-qt&id=dc75ad854af123f375b5b683be64aa14573170d7";
27 hash = "sha256-PTkYQRA8n5a9yR2AvpzH5natsXT2W6Xjo0ONCPJx78k=";
31 nativeBuildInputs = [ pkg-config autoreconfHook ];
32 buildInputs = [ openssl db48 boost zlib zeromq fmt
33 miniupnpc glib protobuf util-linux libevent ]
34 ++ lib.optionals stdenv.isDarwin [ AppKit ]
35 ++ lib.optionals withGui [ qtbase qttools qrencode ];
37 configureFlags = [ "--with-boost-libdir=${boost.out}/lib" ]
38 ++ lib.optionals withGui [
40 "--with-qt-bindir=${qtbase.dev}/bin:${qttools.dev}/bin" ];
42 enableParallelBuilding = true;
46 ./src/test/test_litecoin
50 broken = (stdenv.isLinux && stdenv.isAarch64) || stdenv.isDarwin;
51 description = "A lite version of Bitcoin using scrypt as a proof-of-work algorithm";
53 Litecoin is a peer-to-peer Internet currency that enables instant payments
54 to anyone in the world. It is based on the Bitcoin protocol but differs
55 from Bitcoin in that it can be efficiently mined with consumer-grade hardware.
56 Litecoin provides faster transaction confirmations (2.5 minutes on average)
57 and uses a memory-hard, scrypt-based mining proof-of-work algorithm to target
58 the regular computers and GPUs most people already have.
59 The Litecoin network is scheduled to produce 84 million currency units.
61 homepage = "https://litecoin.org/";
62 platforms = platforms.unix;
63 license = licenses.mit;
64 maintainers = with maintainers; [ offline ];