1
0
Fork 1
mirror of https://github.com/NixOS/nixpkgs.git synced 2024-11-29 17:10:48 +00:00
nixpkgs/pkgs/applications/misc/xmrig/default.nix

35 lines
869 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}";
2018-11-22 12:37:37 +00:00
version = "2.8.3";
2018-03-28 05:59:30 +01:00
src = fetchFromGitHub {
owner = "xmrig";
repo = "xmrig";
rev = "v${version}";
2018-11-22 12:37:37 +00:00
sha256 = "144i24c707fja89iqcc511b4077p53q8w2cq5zd26hry2i4i3abi";
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 ];
};
}