My personal project and infrastructure archive
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
 
 
 
 
 
 
nomicon/pkgs/applications/misc/xmrig/default.nix

37 lines
870 B

{ stdenv, lib, fetchFromGitHub, cmake, libuv, libmicrohttpd, openssl, hwloc
, donateLevel ? 0
}:
stdenv.mkDerivation rec {
pname = "xmrig";
version = "6.17.0";
src = fetchFromGitHub {
owner = "xmrig";
repo = "xmrig";
rev = "v${version}";
sha256 = "sha256-K8mN3Wzlay2Qgoo70mu3Bh4lXUXNDpXYt17aNnwWkIc=";
};
nativeBuildInputs = [ cmake ];
buildInputs = [ libuv libmicrohttpd openssl hwloc ];
inherit donateLevel;
patches = [ ./donate-level.patch ];
postPatch = ''
substituteAllInPlace src/donate.h
'';
installPhase = ''
install -vD xmrig $out/bin/xmrig
'';
meta = with lib; {
description = "Monero (XMR) CPU miner";
homepage = "https://github.com/xmrig/xmrig";
license = licenses.gpl3Plus;
platforms = [ "x86_64-linux" "x86_64-darwin" ];
maintainers = with maintainers; [ fpletz kim0 ];
};
}