nixpkgs-suyu/pkgs/applications/misc/xmrig/default.nix
R. RyanTM 2f467dd584 xmrig: 2.5.3 -> 2.6.1
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.1 with grep in /nix/store/wsy4vdhmqcr0mydcgp77dncf2xq906kf-xmrig-2.6.1
- directory tree listing: https://gist.github.com/ff33b30777a95f9fa0654b4da0ae47c2
2018-05-06 19:49:06 -07:00

33 lines
798 B
Nix

{ stdenv, lib, fetchFromGitHub, cmake, libuv, libmicrohttpd
, donateLevel ? 0
}:
stdenv.mkDerivation rec {
name = "xmrig-${version}";
version = "2.6.1";
src = fetchFromGitHub {
owner = "xmrig";
repo = "xmrig";
rev = "v${version}";
sha256 = "05gd3jl8nvj2b73l4x72rfbbxrkw3r8q1h761ly4z35v4f3lahk8";
};
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 ];
};
}