2015-04-07 16:01:01 +02:00
|
|
|
{ stdenv, fetchurl, pkgconfig, openssl, db48, boost
|
2017-06-18 10:58:38 +02:00
|
|
|
, zlib, qt4, qmake4Hook, utillinux, protobuf, qrencode
|
2015-04-07 16:01:01 +02:00
|
|
|
, withGui }:
|
|
|
|
|
|
|
|
with stdenv.lib;
|
|
|
|
stdenv.mkDerivation rec{
|
|
|
|
|
|
|
|
name = "primecoin" + (toString (optional (!withGui) "d")) + "-" + version;
|
|
|
|
version = "0.8.6";
|
|
|
|
|
|
|
|
src = fetchurl {
|
|
|
|
url = "https://github.com/primecoin/primecoin/archive/v${version}.tar.gz";
|
|
|
|
sha256 = "0cixnkici74204s9d5iqj5sccib5a8dig2p2fp1axdjifpg787i3";
|
|
|
|
};
|
|
|
|
|
2017-06-18 10:58:38 +02:00
|
|
|
qmakeFlags = ["USE_UPNP=-"];
|
|
|
|
makeFlags = ["USE_UPNP=-"];
|
|
|
|
|
2017-09-05 23:26:13 +02:00
|
|
|
nativeBuildInputs = [ pkgconfig ];
|
|
|
|
buildInputs = [ openssl db48 boost zlib utillinux protobuf ]
|
2016-04-17 01:24:07 +02:00
|
|
|
++ optionals withGui [ qt4 qmake4Hook qrencode ];
|
2015-04-07 16:01:01 +02:00
|
|
|
|
2016-04-27 23:41:28 +02:00
|
|
|
configureFlags = [ "--with-boost-libdir=${boost.out}/lib" ]
|
2015-04-07 16:01:01 +02:00
|
|
|
++ optionals withGui [ "--with-gui=qt4" ];
|
|
|
|
|
2017-08-12 00:38:32 +02:00
|
|
|
preBuild = "unset AR;"
|
|
|
|
+ (toString (optional (!withGui) "cd src; cp makefile.unix Makefile"));
|
2015-04-07 16:01:01 +02:00
|
|
|
|
|
|
|
installPhase =
|
|
|
|
if withGui
|
|
|
|
then "install -D bitcoin-qt $out/bin/primecoin-qt"
|
|
|
|
else "install -D bitcoind $out/bin/primecoind";
|
|
|
|
|
2017-12-06 06:43:38 +01:00
|
|
|
# `make build/version.o`:
|
|
|
|
# make: *** No rule to make target 'build/build.h', needed by 'build/version.o'. Stop.
|
|
|
|
enableParallelBuilding = false;
|
|
|
|
|
2015-04-07 16:01:01 +02:00
|
|
|
meta = {
|
2015-04-28 10:54:58 +02:00
|
|
|
description = "A new type cryptocurrency which is proof-of-work based on searching for prime numbers";
|
2015-04-07 16:01:01 +02:00
|
|
|
longDescription= ''
|
|
|
|
Primecoin is an innovative cryptocurrency, a form of digital
|
|
|
|
currency secured by cryptography and issued through a
|
|
|
|
decentralized mining market. Derived from Satoshi Nakamoto's
|
|
|
|
Bitcoin, Primecoin introduces an unique form of proof-of-work
|
|
|
|
based on prime numbers.
|
|
|
|
|
|
|
|
The innovative prime proof-of-work in Primecoin not only
|
|
|
|
provides security and minting to the network, but also generates
|
|
|
|
a special form of prime number chains of interest to mathematical
|
|
|
|
research. Thus primecoin network is energy-multiuse, compared to
|
|
|
|
bitcoin.
|
|
|
|
'';
|
|
|
|
homepage = http://primecoin.io/;
|
|
|
|
maintainers = with maintainers; [ AndersonTorres ];
|
|
|
|
license = licenses.mit;
|
|
|
|
platforms = platforms.unix;
|
|
|
|
};
|
|
|
|
}
|