nixpkgs/pkgs/applications/misc/xmrig/default.nix
R. RyanTM f753266607 xmrig: 2.6.1 -> 2.6.2
Semi-automatic update generated by https://github.com/ryantm/nixpkgs-update tools.

This update was made based on information from https://repology.org/metapackage/xmrig/versions.

These checks were done:

- built on NixOS
- Warning: no binary found that responded to help or version flags. (This warning appears even if the package isn't expected to have binaries.)
- found 2.6.2 with grep in /nix/store/fql94ka6winbdld6zs5y34f2y0fbzavg-xmrig-2.6.2
- directory tree listing: https://gist.github.com/109bef229b0b8564b89f489b69f6f0b5
2018-05-12 14:36:32 +02:00

35 lines
852 B
Nix

{ stdenv, lib, fetchFromGitHub, cmake, libuv, libmicrohttpd
, donateLevel ? 0
}:
stdenv.mkDerivation rec {
name = "xmrig-${version}";
version = "2.6.2";
src = fetchFromGitHub {
owner = "xmrig";
repo = "xmrig";
rev = "v${version}";
sha256 = "09dcjvnm74j1d26mvdiz0sl1qwns5xfkdwx46nqd4xlgvg9x4rpx";
};
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;
platforms = [ "x86_64-linux" "x86_64-darwin" ];
maintainers = with maintainers; [ fpletz ];
};
}