blob: 42d9e448991a2e15e1f530765d820a284cf38be1 (
plain) (
blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
|
{ stdenv, lib, fetchFromGitHub, cmake, libuv, libmicrohttpd
, donateLevel ? 0
}:
stdenv.mkDerivation rec {
name = "xmrig-${version}";
version = "2.5.2";
src = fetchFromGitHub {
owner = "xmrig";
repo = "xmrig";
rev = "v${version}";
sha256 = "1jc6vzqdl85pmiw5qv9b148kfw4k4wxn90ggylxfpfdv7czamh2c";
};
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 ];
};
}
|