b487db4ecb
Semi-automatic update generated by https://github.com/ryantm/nixpkgs-update tools. This update was made based on information from https://repology.org/metapackage/xmrig/versions
34 lines
870 B
Nix
34 lines
870 B
Nix
{ stdenv, lib, fetchFromGitHub, cmake, libuv, libmicrohttpd, openssl
|
|
, donateLevel ? 0
|
|
}:
|
|
|
|
stdenv.mkDerivation rec {
|
|
name = "xmrig-${version}";
|
|
version = "2.10.0";
|
|
|
|
src = fetchFromGitHub {
|
|
owner = "xmrig";
|
|
repo = "xmrig";
|
|
rev = "v${version}";
|
|
sha256 = "10nqwxj8j2ciw2h178g2z5lrzv48xsi2a4v6s0ha93hfbjzvag5a";
|
|
};
|
|
|
|
nativeBuildInputs = [ cmake ];
|
|
buildInputs = [ libuv libmicrohttpd openssl ];
|
|
|
|
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;
|
|
platforms = [ "x86_64-linux" "x86_64-darwin" ];
|
|
maintainers = with maintainers; [ fpletz ];
|
|
};
|
|
}
|