From 5d86c50057173cb8bf82012e535ea991d9bb3f6b Mon Sep 17 00:00:00 2001 From: Franz Pletz Date: Wed, 28 Mar 2018 06:59:30 +0200 Subject: [PATCH] xmrig: init at 2.5.2 --- pkgs/applications/misc/xmrig/default.nix | 33 ++++++++++++++++++++++++ pkgs/top-level/all-packages.nix | 2 ++ 2 files changed, 35 insertions(+) create mode 100644 pkgs/applications/misc/xmrig/default.nix diff --git a/pkgs/applications/misc/xmrig/default.nix b/pkgs/applications/misc/xmrig/default.nix new file mode 100644 index 000000000000..42d9e448991a --- /dev/null +++ b/pkgs/applications/misc/xmrig/default.nix @@ -0,0 +1,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 ]; + }; +} diff --git a/pkgs/top-level/all-packages.nix b/pkgs/top-level/all-packages.nix index c98027301956..137066a11db9 100644 --- a/pkgs/top-level/all-packages.nix +++ b/pkgs/top-level/all-packages.nix @@ -16699,6 +16699,8 @@ with pkgs; hwloc = hwloc-nox; }; + xmrig = callPackage ../applications/misc/xmrig { }; + monkeysAudio = callPackage ../applications/audio/monkeys-audio { }; monkeysphere = callPackage ../tools/security/monkeysphere { };