2e6bf42a22
There ver very many conflicts, basically all due to name -> pname+version. Fortunately, almost everything was auto-resolved by kdiff3, and for now I just fixed up a couple evaluation problems, as verified by the tarball job. There might be some fallback to these conflicts, but I believe it should be minimal. Hydra nixpkgs: ?compare=1538299
37 lines
993 B
Nix
37 lines
993 B
Nix
{ stdenv, lib, fetchFromGitHub, cmake, libuv, libmicrohttpd, openssl, hwloc
|
|
, donateLevel ? 0
|
|
}:
|
|
|
|
stdenv.mkDerivation rec {
|
|
pname = "xmrig";
|
|
version = "3.0.0";
|
|
|
|
src = fetchFromGitHub {
|
|
owner = "xmrig";
|
|
repo = "xmrig";
|
|
rev = "v${version}";
|
|
sha256 = "1m0rsjb7y1j77mzg5cqb3fdvzgvjkrwgmkjn9nv1xl2757z8hcl4";
|
|
};
|
|
|
|
nativeBuildInputs = [ cmake ];
|
|
buildInputs = [ libuv libmicrohttpd openssl hwloc ];
|
|
|
|
postPatch = ''
|
|
substituteInPlace src/donate.h \
|
|
--replace "kDefaultDonateLevel = 5;" "kDefaultDonateLevel = ${toString donateLevel};" \
|
|
--replace "kMinimumDonateLevel = 1;" "kMinimumDonateLevel = ${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 kim0 ];
|
|
};
|
|
}
|