nixpkgs/pkgs/applications/altcoins/bitcoin.nix
AndersonTorres ac4f15b282 Altcoins - a new category of applications
Here, I present a new level of hierarchy on Nixpkgs: the Altcoins.

The idea is to put a single cryptocurrency per file, and build them
using expressions like altcoins.bitcoin. I believe this ordering is
clearer and more maintainable that the current one.
2015-01-02 10:00:32 -02:00

37 lines
1.3 KiB
Nix

{ stdenv, fetchurl, pkgconfig, autoreconfHook, openssl, db48, boost
, zlib, miniupnpc, qt4, utillinux, protobuf, qrencode
, withGui }:
with stdenv.lib;
stdenv.mkDerivation rec{
name = "bitcoin" + (toString (optional (!withGui) "d")) + "-" + version;
version = "0.9.3";
src = fetchurl {
url = "https://github.com/bitcoin/bitcoin/archive/v${version}.tar.gz";
sha256 = "0a6lkfzsmqqcbz2cc0cg8dccd990b5y7qi8mw358fhfb4f1jxn9y";
};
buildInputs = [ pkgconfig autoreconfHook openssl db48 boost zlib
miniupnpc utillinux protobuf ]
++ optionals withGui [ qt4 qrencode ];
configureFlags = [ "--with-boost-libdir=${boost.lib}/lib" ]
++ optionals withGui [ "--with-gui=qt4" ];
meta = {
description = "Peer-to-peer electronic cash system";
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.
'';
homepage = "http://www.bitcoin.org/";
maintainers = with maintainers; [ roconnor AndersonTorres ];
license = licenses.mit;
platforms = platforms.unix;
};
}