2018-03-28 06:59:30 +02:00
|
|
|
{ stdenv, lib, fetchFromGitHub, cmake, libuv, libmicrohttpd
|
|
|
|
, donateLevel ? 0
|
|
|
|
}:
|
|
|
|
|
|
|
|
stdenv.mkDerivation rec {
|
|
|
|
name = "xmrig-${version}";
|
2018-06-19 18:32:29 +02:00
|
|
|
version = "2.6.3";
|
2018-03-28 06:59:30 +02:00
|
|
|
|
|
|
|
src = fetchFromGitHub {
|
|
|
|
owner = "xmrig";
|
|
|
|
repo = "xmrig";
|
|
|
|
rev = "v${version}";
|
2018-06-19 18:32:29 +02:00
|
|
|
sha256 = "1ssiq2yv8b3xg4kfp2cfzl41m5apjw2r2k74lh3fz0g0ix3cq55b";
|
2018-03-28 06:59:30 +02:00
|
|
|
};
|
|
|
|
|
|
|
|
nativeBuildInputs = [ cmake ];
|
|
|
|
buildInputs = [ libuv libmicrohttpd ];
|
|
|
|
|
|
|
|
postPatch = ''
|
|
|
|
substituteInPlace src/donate.h --replace "kDonateLevel = 5;" "kDonateLevel = ${toString donateLevel};"
|
|
|
|
'';
|
|
|
|
|
|
|
|
installPhase = ''
|
|
|
|
install -vD xmrig $out/bin/xmrig
|
|
|
|
'';
|
|
|
|
|
|
|
|
meta = with lib; {
|
|
|
|
description = "Monero (XMR) CPU miner";
|
|
|
|
homepage = "https://github.com/xmrig/xmrig";
|
|
|
|
license = licenses.gpl3Plus;
|
2018-05-08 10:12:13 +02:00
|
|
|
platforms = [ "x86_64-linux" "x86_64-darwin" ];
|
2018-03-28 06:59:30 +02:00
|
|
|
maintainers = with maintainers; [ fpletz ];
|
|
|
|
};
|
|
|
|
}
|