summary refs log tree commit diff
path: root/pkgs/applications/altcoins/bitcoin.nix
diff options
context:
space:
mode:
authorAndersonTorres <torres.anderson.85@gmail.com>2014-11-30 11:13:47 -0200
committerAndersonTorres <torres.anderson.85@gmail.com>2015-01-02 10:00:32 -0200
commitac4f15b28274c46a4ed5d6c2e82c94a3decec353 (patch)
treef28d63a240f42266ea5a245bb2bfaeba5f4fd20a /pkgs/applications/altcoins/bitcoin.nix
parent8281ef1231f96094938f2d056503ec9b4a760456 (diff)
downloadnixpkgs-ac4f15b28274c46a4ed5d6c2e82c94a3decec353.tar
nixpkgs-ac4f15b28274c46a4ed5d6c2e82c94a3decec353.tar.gz
nixpkgs-ac4f15b28274c46a4ed5d6c2e82c94a3decec353.tar.bz2
nixpkgs-ac4f15b28274c46a4ed5d6c2e82c94a3decec353.tar.lz
nixpkgs-ac4f15b28274c46a4ed5d6c2e82c94a3decec353.tar.xz
nixpkgs-ac4f15b28274c46a4ed5d6c2e82c94a3decec353.tar.zst
nixpkgs-ac4f15b28274c46a4ed5d6c2e82c94a3decec353.zip
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.
Diffstat (limited to 'pkgs/applications/altcoins/bitcoin.nix')
-rw-r--r--pkgs/applications/altcoins/bitcoin.nix36
1 files changed, 36 insertions, 0 deletions
diff --git a/pkgs/applications/altcoins/bitcoin.nix b/pkgs/applications/altcoins/bitcoin.nix
new file mode 100644
index 00000000000..a69c68f346e
--- /dev/null
+++ b/pkgs/applications/altcoins/bitcoin.nix
@@ -0,0 +1,36 @@
+{ 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;
+  };
+}