git.iko.soy/typeable/nixpkgs
on master help sign in
Merge pull request #5169 from AndersonTorres/altcoins

Altcoins

commite0192499365bc9aa0589de5388eee89f0a4d1e76 authorGeorges Dubus <georges.dubus@gmail.com> dateThu 4 Dec 2014, 13:58 (12 years ago) parent51992d8b7d93fe
3 files changed+89−29
pkgs/applications/misc/bitcoin/altcoins.nix+27−28 pkgs/applications/misc/bitcoin/litecoin.nix+60 pkgs/top-level/all-packages.nix+2−1
pkgs/applications/misc/bitcoin/altcoins.nix+27−28
@@ -1,6 +1,6 @@
11{ fetchurl, stdenv, pkgconfig
22, openssl, db48, boost, zlib, miniupnpc, qt4, qrencode, glib, protobuf
3−, utillinux, autogen, autoconf, autobuild, automake, db }:
3+, utillinux, autogen, autoconf, autobuild, automake, autoreconfHook, db }:
44
55with stdenv.lib;
66
@@ -8,7 +8,7 @@ let
88 buildAltcoin = makeOverridable ({walletName, gui ? true, ...}@a:
99 stdenv.mkDerivation ({
1010 name = "${walletName}${toString (optional (!gui) "d")}-${a.version}";
11− buildInputs = [ openssl db48 boost zlib miniupnpc ]
11+ buildInputs = [ pkgconfig openssl db48 boost zlib miniupnpc ]
1212 ++ optionals gui [ qt4 qrencode ] ++ a.extraBuildInputs or [];
1313
1414 configurePhase = optional gui "qmake";
@@ -27,7 +27,7 @@ let
2727 meta = {
2828 platforms = platforms.unix;
2929 license = license.mit;
30− maintainers = [ maintainers.offline ];
30+ maintainers = [ maintainers.offline ] ++ a.extraMaintainers;
3131 };
3232 } // a)
3333 );
@@ -35,31 +35,6 @@ let
3535in rec {
3636 inherit buildAltcoin;
3737
38− litecoin = buildAltcoin rec {
39− walletName = "litecoin";
40− version = "0.8.5.3-rc3";
41−
42− src = fetchurl {
43− url = "https://github.com/litecoin-project/litecoin/archive/v${version}.tar.gz";
44− sha256 = "1z4a7bm3z9kd7n0s38kln31z8shsd32d5d5v3br5p0jlnr5g3lk7";
45− };
46−
47− meta = {
48− description = "A lite version of Bitcoin using scrypt as a proof-of-work algorithm";
49− longDescription= ''
50− Litecoin is a peer-to-peer Internet currency that enables instant payments
51− to anyone in the world. It is based on the Bitcoin protocol but differs
52− from Bitcoin in that it can be efficiently mined with consumer-grade hardware.
53− Litecoin provides faster transaction confirmations (2.5 minutes on average)
54− and uses a memory-hard, scrypt-based mining proof-of-work algorithm to target
55− the regular computers and GPUs most people already have.
56− The Litecoin network is scheduled to produce 84 million currency units.
57− '';
58− homepage = https://litecoin.org/;
59− };
60− };
61− litecoind = litecoin.override { gui = false; };
62−
6338 namecoin = buildAltcoin rec {
6439 walletName = "namecoin";
6540 version = "0.3.51.00";
@@ -80,4 +55,28 @@ in rec {
8055 };
8156 };
8257
58+ darkcoin = buildAltcoin rec {
59+ walletName = "darkcoin";
60+ version = "0.9.13.15";
61+
62+ src = fetchurl {
63+ url = "https://github.com/darkcoin/darkcoin/archive/v${version}.tar.gz";
64+ sha256 = "1kly2y3g4dr1jwwf81smqvc7k662x6rvg4ggmxva1yaifb67bgjb";
65+ };
66+
67+ extraBuildInputs = [ glib ];
68+
69+ meta = {
70+ description = "A decentralized key/value registration and transfer system";
71+ longDescription = ''
72+ Darkcoin (DRK) is an open sourced, privacy-centric digital
73+ currency. It allows you keep your finances private as you make
74+ transactions, similar to cash.
75+ '';
76+ homepage = http://darkcoin.io;
77+ extraMaintainers = [ maintainers.AndersonTorres ];
78+ };
79+ };
80+ darkcoind = darkcoin.override { gui = false; };
81+
8382}
pkgs/applications/misc/bitcoin/litecoin.nixnew file+60
@@ -0,0 +1,60 @@
1+{ stdenv, fetchurl, pkgconfig
2+, openssl, db48, boost, zlib, miniupnpc, qt4, qrencode, glib, protobuf
3+, utillinux, autogen, autoreconfHook }:
4+
5+with stdenv.lib;
6+
7+let
8+ mkAutoreconfCoin =
9+ { name, version, withGui, src, meta }:
10+
11+ stdenv.mkDerivation {
12+
13+ inherit src meta;
14+
15+ name = name + (toString (optional (!withGui) "d")) + "-" + version;
16+
17+ buildInputs = [ autogen autoreconfHook pkgconfig openssl
18+ boost zlib miniupnpc db48 glib utillinux protobuf ]
19+ ++ optionals withGui [ qt4 qrencode protobuf ];
20+
21+ configureFlags = [ "--with-boost-libdir=${boost.lib}/lib" ] ++ optionals withGui [ "--with-gui=qt4" ];
22+ };
23+
24+ mkLitecoin = { withGui }:
25+
26+ mkAutoreconfCoin rec {
27+
28+ name = "litecoin";
29+ version = "0.9.3-preview5";
30+ inherit withGui;
31+
32+ src = fetchurl {
33+ url = "https://github.com/litecoin-project/litecoin/archive/v${version}.tar.gz";
34+ sha256 = "0nnfz4s2g28jb5fqy6cabsryp3h2amzlyslr6g6k8r1vmzvx5ym6";
35+ };
36+
37+ meta = with stdenv.lib; {
38+ description = "A lite version of Bitcoin using scrypt as a proof-of-work algorithm";
39+ longDescription= ''
40+ Litecoin is a peer-to-peer Internet currency that enables instant payments
41+ to anyone in the world. It is based on the Bitcoin protocol but differs
42+ from Bitcoin in that it can be efficiently mined with consumer-grade hardware.
43+ Litecoin provides faster transaction confirmations (2.5 minutes on average)
44+ and uses a memory-hard, scrypt-based mining proof-of-work algorithm to target
45+ the regular computers and GPUs most people already have.
46+ The Litecoin network is scheduled to produce 84 million currency units.
47+ '';
48+ homepage = https://litecoin.org/;
49+ platforms = platforms.unix;
50+ license = licenses.mit;
51+ maintainers = [ maintainers.offline maintainers.AndersonTorres ];
52+ };
53+ };
54+
55+in {
56+
57+ litecoin = mkLitecoin { withGui = true; };
58+ litecoind = mkLitecoin { withGui = false; };
59+
60+}
pkgs/top-level/all-packages.nix+2−1
@@ -9123,7 +9123,8 @@ let
91239123
91249124 altcoins = recurseIntoAttrs (
91259125 (callPackage ../applications/misc/bitcoin/altcoins.nix {}) //
9126− (callPackage ../applications/misc/bitcoin/dogecoin.nix {})
9126+ (callPackage ../applications/misc/bitcoin/dogecoin.nix {}) //
9127+ (callPackage ../applications/misc/bitcoin/litecoin.nix {})
91279128 );
91289129
91299130 bitlbee = callPackage ../applications/networking/instant-messengers/bitlbee { };