2019-08-18 00:01:28 +00:00
|
|
|
{ stdenv, lib, fetchFromGitHub, cmake, libuv, libmicrohttpd, openssl, hwloc
|
2018-03-28 04:59:30 +00:00
|
|
|
, donateLevel ? 0
|
|
|
|
}:
|
|
|
|
|
|
|
|
stdenv.mkDerivation rec {
|
2019-08-15 12:41:18 +00:00
|
|
|
pname = "xmrig";
|
2021-08-14 13:54:05 +00:00
|
|
|
version = "6.14.0";
|
2018-03-28 04:59:30 +00:00
|
|
|
|
|
|
|
src = fetchFromGitHub {
|
|
|
|
owner = "xmrig";
|
|
|
|
repo = "xmrig";
|
|
|
|
rev = "v${version}";
|
2021-08-14 13:54:05 +00:00
|
|
|
sha256 = "sha256-h+Y7hXkenoLT83eG0w6YEfOuEocejXgvqRMq1DwWwT0=";
|
2018-03-28 04:59:30 +00:00
|
|
|
};
|
|
|
|
|
|
|
|
nativeBuildInputs = [ cmake ];
|
2019-08-18 00:01:28 +00:00
|
|
|
buildInputs = [ libuv libmicrohttpd openssl hwloc ];
|
2018-03-28 04:59:30 +00:00
|
|
|
|
2021-05-07 16:50:51 +00:00
|
|
|
inherit donateLevel;
|
|
|
|
|
|
|
|
patches = [ ./donate-level.patch ];
|
2018-03-28 04:59:30 +00:00
|
|
|
postPatch = ''
|
2021-05-07 16:50:51 +00:00
|
|
|
substituteAllInPlace src/donate.h
|
2018-03-28 04:59:30 +00:00
|
|
|
'';
|
|
|
|
|
|
|
|
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 08:12:13 +00:00
|
|
|
platforms = [ "x86_64-linux" "x86_64-darwin" ];
|
2019-08-18 00:01:28 +00:00
|
|
|
maintainers = with maintainers; [ fpletz kim0 ];
|
2018-03-28 04:59:30 +00:00
|
|
|
};
|
|
|
|
}
|