diff options
author | AndersonTorres <torres.anderson.85@gmail.com> | 2014-11-30 11:13:47 -0200 |
---|---|---|
committer | AndersonTorres <torres.anderson.85@gmail.com> | 2015-01-02 10:00:32 -0200 |
commit | ac4f15b28274c46a4ed5d6c2e82c94a3decec353 (patch) | |
tree | f28d63a240f42266ea5a245bb2bfaeba5f4fd20a /pkgs/applications/altcoins | |
parent | 8281ef1231f96094938f2d056503ec9b4a760456 (diff) | |
download | nixpkgs-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')
-rw-r--r-- | pkgs/applications/altcoins/bitcoin.nix | 36 | ||||
-rw-r--r-- | pkgs/applications/altcoins/darkcoin.nix | 40 | ||||
-rw-r--r-- | pkgs/applications/altcoins/default.nix | 19 | ||||
-rw-r--r-- | pkgs/applications/altcoins/dogecoin.nix | 47 | ||||
-rw-r--r-- | pkgs/applications/altcoins/litecoin.nix | 41 | ||||
-rw-r--r-- | pkgs/applications/altcoins/namecoin.nix | 26 | ||||
-rw-r--r-- | pkgs/applications/altcoins/namecoind.nix | 35 |
7 files changed, 244 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; + }; +} diff --git a/pkgs/applications/altcoins/darkcoin.nix b/pkgs/applications/altcoins/darkcoin.nix new file mode 100644 index 00000000000..fb8c863de25 --- /dev/null +++ b/pkgs/applications/altcoins/darkcoin.nix @@ -0,0 +1,40 @@ +{ fetchurl, stdenv, pkgconfig +, openssl, db48, boost, zlib, miniupnpc, qt4, qrencode, glib, protobuf +, utillinux +, withGui }: + +with stdenv.lib; +stdenv.mkDerivation rec { + + name = "darkcoin" + (toString (optional (!withGui) "d")) + "-" + version; + version = "0.9.13.15"; + + src = fetchurl { + url = "https://github.com/darkcoin/darkcoin/archive/v${version}.tar.gz"; + sha256 = "1kly2y3g4dr1jwwf81smqvc7k662x6rvg4ggmxva1yaifb67bgjb"; + }; + + buildInputs = [ pkgconfig glib openssl db48 boost zlib miniupnpc ] + ++ optionals withGui [ qt4 qrencode ]; + + configurePhase = optional withGui "qmake"; + + preBuild = optional (!withGui) "cd src; cp makefile.unix Makefile"; + + installPhase = + if withGui + then "install -D darkcoin-qt $out/bin/darkcoin-qt" + else "install -D darkcoind $out/bin/darkcoind"; + + meta = with stdenv.lib; { + description = "A decentralized key/value registration and transfer system"; + longDescription = '' + Darkcoin (DRK) is an open sourced, privacy-centric digital + currency. It allows you keep your finances private as you make + transactions, similar to cash. + ''; + homepage = http://darkcoin.io; + maintainers = with maintainers; [ AndersonTorres ]; + platforms = with platforms; unix; + }; +} diff --git a/pkgs/applications/altcoins/default.nix b/pkgs/applications/altcoins/default.nix new file mode 100644 index 00000000000..d97b10cadc3 --- /dev/null +++ b/pkgs/applications/altcoins/default.nix @@ -0,0 +1,19 @@ +{ callPackage, pkgs }: + +rec { + + bitcoin = callPackage ./bitcoin.nix { withGui = true; }; + bitcoind = callPackage ./bitcoin.nix { withGui = false; }; + + darkcoin = callPackage ./darkcoin.nix { withGui = true; }; + darkcoind = callPackage ./darkcoin.nix { withGui = false; }; + + dogecoin = callPackage ./dogecoin.nix { withGui = true; }; + dogecoind = callPackage ./dogecoin.nix { withGui = false; }; + + litecoin = callPackage ./litecoin.nix { withGui = true; }; + litecoind = callPackage ./litecoin.nix { withGui = false; }; + + namecoin = callPackage ./namecoin.nix { inherit namecoind; }; + namecoind = callPackage ./namecoind.nix { }; +} diff --git a/pkgs/applications/altcoins/dogecoin.nix b/pkgs/applications/altcoins/dogecoin.nix new file mode 100644 index 00000000000..2d1c3aedc25 --- /dev/null +++ b/pkgs/applications/altcoins/dogecoin.nix @@ -0,0 +1,47 @@ +{ stdenv , fetchurl +, pkgconfig, autoreconfHook +, db5, openssl, boost, zlib, miniupnpc +, glib, protobuf, utillinux, qt4, qrencode +, withGui }: + +with stdenv.lib; +stdenv.mkDerivation rec { + + name = "dogecoin" + (toString (optional (!withGui) "d")) + "-" + version; + version = "1.8.0"; + + src = fetchurl { + url = "https://github.com/dogecoin/dogecoin/archive/v${version}.tar.gz"; + sha256 = "8a33958c04213cd621aa3c86910477813af22512f03b47c98995d20d31f3f935"; + }; + + buildInputs = [ autoreconfHook pkgconfig openssl + db5 openssl utillinux protobuf boost zlib miniupnpc ] + ++ optionals withGui [ qt4 qrencode ]; + + # BSD DB5 location + patchPhase = '' + sed -i \ + -e 's,BDB_CPPFLAGS=$,BDB_CPPFLAGS="-I${db5}/include",g' \ + -e 's,BDB_LIBS=$,BDB_LIBS="-L${db5}/lib",g' \ + -e 's,bdbdirlist=$,bdbdirlist="${db5}/include",g' \ + src/m4/dogecoin_find_bdb51.m4 + ''; + + configureFlags = [ "--with-incompatible-bdb" + "--with-boost-libdir=${boost.lib}/lib" ] + ++ optionals withGui [ "--with-gui" ]; + + meta = { + description = "Wow, such coin, much shiba, very rich"; + longDescription = '' + Dogecoin is a decentralized, peer-to-peer digital currency that + enables you to easily send money online. Think of it as "the + internet currency." + It is named after a famous Internet meme, the "Doge" - a Shiba Inu dog. + ''; + homepage = http://www.dogecoin.com/; + license = licenses.mit; + maintainers = with maintainers; [ edwtjo offline AndersonTorres ]; + }; +} diff --git a/pkgs/applications/altcoins/litecoin.nix b/pkgs/applications/altcoins/litecoin.nix new file mode 100644 index 00000000000..f2235abaaae --- /dev/null +++ b/pkgs/applications/altcoins/litecoin.nix @@ -0,0 +1,41 @@ +{ stdenv, fetchurl +, pkgconfig, autoreconfHook +, openssl, db48, boost, zlib, miniupnpc +, glib, protobuf, utillinux, qt4, qrencode +, withGui }: + +with stdenv.lib; +stdenv.mkDerivation rec { + + name = "litecoin" + (toString (optional (!withGui) "d")) + "-" + version; + version = "0.9.3-preview5"; + + src = fetchurl { + url = "https://github.com/litecoin-project/litecoin/archive/v${version}.tar.gz"; + sha256 = "0nnfz4s2g28jb5fqy6cabsryp3h2amzlyslr6g6k8r1vmzvx5ym6"; + }; + + buildInputs = [ pkgconfig autoreconfHook openssl + openssl db48 boost zlib miniupnpc glib protobuf utillinux ] + ++ optionals withGui [ qt4 qrencode ]; + + configureFlags = [ "--with-boost-libdir=${boost.lib}/lib" ] + ++ optionals withGui [ "--with-gui=qt4" ]; + + meta = with stdenv.lib; { + description = "A lite version of Bitcoin using scrypt as a proof-of-work algorithm"; + longDescription= '' + Litecoin is a peer-to-peer Internet currency that enables instant payments + to anyone in the world. It is based on the Bitcoin protocol but differs + from Bitcoin in that it can be efficiently mined with consumer-grade hardware. + Litecoin provides faster transaction confirmations (2.5 minutes on average) + and uses a memory-hard, scrypt-based mining proof-of-work algorithm to target + the regular computers and GPUs most people already have. + The Litecoin network is scheduled to produce 84 million currency units. + ''; + homepage = https://litecoin.org/; + platforms = platforms.unix; + license = licenses.mit; + maintainers = with maintainers; [ offline AndersonTorres ]; + }; +} diff --git a/pkgs/applications/altcoins/namecoin.nix b/pkgs/applications/altcoins/namecoin.nix new file mode 100644 index 00000000000..f2e2aae698e --- /dev/null +++ b/pkgs/applications/altcoins/namecoin.nix @@ -0,0 +1,26 @@ +{ stdenv, db4, boost, openssl, qt4, miniupnpc, unzip, namecoind }: + +with stdenv.lib; +stdenv.mkDerivation rec { + + name = "namecoin-${version}"; + version = namecoind.version; + src = namecoind.src; + + buildInputs = [ db4 boost openssl unzip qt4 miniupnpc ]; + + configurePhase = '' + qmake USE_UPNP=- + ''; + + buildPhase = '' + make + ''; + + installPhase = '' + mkdir -p $out/bin + cp namecoin-qt $out/bin + ''; + + meta = namecoind.meta; +} diff --git a/pkgs/applications/altcoins/namecoind.nix b/pkgs/applications/altcoins/namecoind.nix new file mode 100644 index 00000000000..582e5ce960c --- /dev/null +++ b/pkgs/applications/altcoins/namecoind.nix @@ -0,0 +1,35 @@ +{ stdenv, fetchurl, db4, boost, openssl, miniupnpc, unzip }: + +with stdenv.lib; +stdenv.mkDerivation rec { + version = "0.3.76"; + name = "namecoind-${version}"; + + src = fetchurl { + url = "https://github.com/namecoin/namecoin/archive/nc${version}.tar.gz"; + sha256 = "007372j47hb7p89smh3w0p6z70gii9gd4v6agpycqiv4r3n9sv5v"; + }; + + buildInputs = [ db4 boost openssl unzip miniupnpc ]; + + patchPhase = '' + sed -e 's/-Wl,-Bstatic//g' -e 's/-l gthread-2.0//g' -e 's/-l z//g' -i src/Makefile + ''; + + buildPhase = '' + make -C src INCLUDEPATHS= LIBPATHS= + ''; + + installPhase = '' + mkdir -p $out/bin + cp src/namecoind $out/bin + ''; + + meta = { + description = "Decentralized open source information registration and transfer system based on the Bitcoin cryptocurrency"; + homepage = http://namecoin.info; + license = licenses.mit; + maintainers = with maintainers; [ doublec AndersonTorres ]; + platforms = platforms.linux; + }; +} |