2020-04-24 23:36:52 +00:00
|
|
|
{ stdenv, lib, fetchFromGitHub, cmake, libuv, libmicrohttpd, openssl, hwloc
|
|
|
|
, donateLevel ? 0
|
|
|
|
}:
|
|
|
|
|
|
|
|
stdenv.mkDerivation rec {
|
|
|
|
pname = "xmrig";
|
2022-08-12 12:06:08 +00:00
|
|
|
version = "6.18.0";
|
2020-04-24 23:36:52 +00:00
|
|
|
|
|
|
|
src = fetchFromGitHub {
|
|
|
|
owner = "xmrig";
|
|
|
|
repo = "xmrig";
|
|
|
|
rev = "v${version}";
|
2022-08-12 12:06:08 +00:00
|
|
|
sha256 = "sha256-vYXDQSEhPi/jxCO6pxOJ1q0AoBVVRU9vErtJLq90ltk=";
|
2020-04-24 23:36:52 +00:00
|
|
|
};
|
|
|
|
|
|
|
|
nativeBuildInputs = [ cmake ];
|
|
|
|
buildInputs = [ libuv libmicrohttpd openssl hwloc ];
|
|
|
|
|
2021-06-04 09:07:49 +00:00
|
|
|
inherit donateLevel;
|
|
|
|
|
|
|
|
patches = [ ./donate-level.patch ];
|
2020-04-24 23:36:52 +00:00
|
|
|
postPatch = ''
|
2021-06-04 09:07:49 +00:00
|
|
|
substituteAllInPlace src/donate.h
|
2020-04-24 23:36:52 +00:00
|
|
|
'';
|
|
|
|
|
|
|
|
installPhase = ''
|
|
|
|
install -vD xmrig $out/bin/xmrig
|
|
|
|
'';
|
|
|
|
|
|
|
|
meta = with lib; {
|
2022-06-16 17:23:12 +00:00
|
|
|
broken = stdenv.isDarwin;
|
2020-04-24 23:36:52 +00:00
|
|
|
description = "Monero (XMR) CPU miner";
|
|
|
|
homepage = "https://github.com/xmrig/xmrig";
|
|
|
|
license = licenses.gpl3Plus;
|
|
|
|
platforms = [ "x86_64-linux" "x86_64-darwin" ];
|
2022-08-12 12:06:08 +00:00
|
|
|
maintainers = with maintainers; [ kim0 ];
|
2020-04-24 23:36:52 +00:00
|
|
|
};
|
|
|
|
}
|