mirror of
https://github.com/NixOS/nixpkgs.git
synced 2024-12-01 10:00:56 +00:00
7e1db6b41d
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. These checks were done: - built on NixOS - Warning: no binary found that responded to help or version flags. (This warning appears even if the package isn't expected to have binaries.) - found 2.5.3 with grep in /nix/store/csidwxna34qv298smf6sflwaj93xr9p0-xmrig-2.5.3 - directory tree listing: https://gist.github.com/5aaeee0849eb7acb740cae01310a19f9
34 lines
798 B
Nix
34 lines
798 B
Nix
{ stdenv, lib, fetchFromGitHub, cmake, libuv, libmicrohttpd
|
|
, donateLevel ? 0
|
|
}:
|
|
|
|
stdenv.mkDerivation rec {
|
|
name = "xmrig-${version}";
|
|
version = "2.5.3";
|
|
|
|
src = fetchFromGitHub {
|
|
owner = "xmrig";
|
|
repo = "xmrig";
|
|
rev = "v${version}";
|
|
sha256 = "1f9z9akgaf27r5hjrsjw0clk47p7igi0slbg7z6c3rvy5q9kq0wp";
|
|
};
|
|
|
|
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;
|
|
maintainers = with maintainers; [ fpletz ];
|
|
};
|
|
}
|