2014-04-16 00:22:46 +01:00
|
|
|
{ fetchurl, stdenv, openssl, db48, boost, zlib, miniupnpc, qt4, utillinux
|
2014-04-17 13:43:05 +01:00
|
|
|
, pkgconfig, protobuf, qrencode, gui ? true }:
|
|
|
|
|
|
|
|
with stdenv.lib;
|
2011-03-27 07:44:34 +01:00
|
|
|
|
|
|
|
stdenv.mkDerivation rec {
|
2014-07-22 04:53:37 +01:00
|
|
|
version = "0.9.2.1";
|
2014-04-17 13:43:05 +01:00
|
|
|
name = "bitcoin${toString (optional (!gui) "d")}-${version}";
|
2011-03-27 07:44:34 +01:00
|
|
|
|
|
|
|
src = fetchurl {
|
2014-04-17 13:43:05 +01:00
|
|
|
url = "https://bitcoin.org/bin/${version}/bitcoin-${version}-linux.tar.gz";
|
2014-07-22 04:59:26 +01:00
|
|
|
sha256 = "0060f7d38b98113ab912d4c184000291d7f026eaf77ca5830deec15059678f54";
|
2011-03-27 07:44:34 +01:00
|
|
|
};
|
|
|
|
|
2014-04-16 00:22:46 +01:00
|
|
|
# hexdump from utillinux is required for tests
|
|
|
|
buildInputs = [
|
2014-04-17 13:43:05 +01:00
|
|
|
openssl db48 boost zlib miniupnpc utillinux pkgconfig protobuf
|
|
|
|
] ++ optionals gui [ qt4 qrencode ];
|
2011-03-27 07:44:34 +01:00
|
|
|
|
2014-04-16 00:22:46 +01:00
|
|
|
unpackPhase = ''
|
|
|
|
mkdir tmp-extract && (cd tmp-extract && tar xf $src)
|
|
|
|
tar xf tmp-extract/bitcoin*/src/bitcoin*.tar*
|
|
|
|
cd bitcoin*
|
2011-03-27 07:44:34 +01:00
|
|
|
'';
|
|
|
|
|
2014-04-16 00:22:46 +01:00
|
|
|
configureFlags = [
|
|
|
|
"--with-boost=${boost}"
|
|
|
|
];
|
|
|
|
|
|
|
|
preCheck = ''
|
|
|
|
# At least one test requires writing in $HOME
|
|
|
|
HOME=$TMPDIR
|
2011-03-27 07:44:34 +01:00
|
|
|
'';
|
|
|
|
|
2014-04-16 00:22:46 +01:00
|
|
|
doCheck = true;
|
|
|
|
|
|
|
|
enableParallelBuilding = true;
|
|
|
|
|
2014-04-17 13:43:05 +01:00
|
|
|
passthru.walletName = "bitcoin";
|
|
|
|
|
2012-06-28 17:03:56 +01:00
|
|
|
meta = {
|
2014-08-24 15:21:08 +01:00
|
|
|
description = "Peer-to-peer electronic cash system";
|
2012-06-28 17:03:56 +01:00
|
|
|
longDescription= ''
|
|
|
|
Bitcoin is a free open source peer-to-peer electronic cash system that is
|
|
|
|
completely decentralized, without the need for a central server or trusted
|
|
|
|
parties. Users hold the crypto keys to their own money and transact directly
|
|
|
|
with each other, with the help of a P2P network to check for double-spending.
|
2011-03-27 07:44:34 +01:00
|
|
|
'';
|
|
|
|
homepage = "http://www.bitcoin.org/";
|
2014-04-17 13:43:05 +01:00
|
|
|
maintainers = [ maintainers.roconnor ];
|
|
|
|
license = licenses.mit;
|
2011-03-27 07:44:34 +01:00
|
|
|
};
|
|
|
|
}
|