3
0
Fork 0
forked from mirrors/nixpkgs
nixpkgs/pkgs/applications/misc/xmrig/default.nix

35 lines
852 B
Nix
Raw Normal View History

2018-03-28 05:59:30 +01:00
{ stdenv, lib, fetchFromGitHub, cmake, libuv, libmicrohttpd
, donateLevel ? 0
}:
stdenv.mkDerivation rec {
name = "xmrig-${version}";
version = "2.6.4";
2018-03-28 05:59:30 +01:00
src = fetchFromGitHub {
owner = "xmrig";
repo = "xmrig";
rev = "v${version}";
sha256 = "1c68qg7433chri6q1yhyggy4mbq2vnn3p2fxs8gqmgij9vpqn3m2";
2018-03-28 05:59:30 +01:00
};
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;
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 ];
};
}