1
0
Fork 1
mirror of https://github.com/NixOS/nixpkgs.git synced 2024-09-11 15:08:33 +01:00
nixpkgs/pkgs/applications/misc/xmrig/default.nix

35 lines
870 B
Nix
Raw Normal View History

2018-11-22 12:37:37 +00:00
{ stdenv, lib, fetchFromGitHub, cmake, libuv, libmicrohttpd, openssl
2018-03-28 05:59:30 +01:00
, donateLevel ? 0
}:
stdenv.mkDerivation rec {
name = "xmrig-${version}";
version = "2.10.0";
2018-03-28 05:59:30 +01:00
src = fetchFromGitHub {
owner = "xmrig";
repo = "xmrig";
rev = "v${version}";
sha256 = "10nqwxj8j2ciw2h178g2z5lrzv48xsi2a4v6s0ha93hfbjzvag5a";
2018-03-28 05:59:30 +01:00
};
nativeBuildInputs = [ cmake ];
2018-11-22 12:37:37 +00:00
buildInputs = [ libuv libmicrohttpd openssl ];
2018-03-28 05:59:30 +01:00
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;
2018-05-08 09:12:13 +01:00
platforms = [ "x86_64-linux" "x86_64-darwin" ];
2018-03-28 05:59:30 +01:00
maintainers = with maintainers; [ fpletz ];
};
}