From e30f55f6d2b6a389c87113cc0dd9c00ef45d62b0 Mon Sep 17 00:00:00 2001 From: Ivan Jager Date: Mon, 9 Apr 2018 07:00:42 -0500 Subject: [PATCH 1/2] xmrig-proxy: init at 2.5.2 --- .../applications/misc/xmrig-proxy/default.nix | 33 +++++++++++++++++++ pkgs/top-level/all-packages.nix | 2 ++ 2 files changed, 35 insertions(+) create mode 100644 pkgs/applications/misc/xmrig-proxy/default.nix diff --git a/pkgs/applications/misc/xmrig-proxy/default.nix b/pkgs/applications/misc/xmrig-proxy/default.nix new file mode 100644 index 000000000000..04bc239ea5b2 --- /dev/null +++ b/pkgs/applications/misc/xmrig-proxy/default.nix @@ -0,0 +1,33 @@ +{ stdenv, lib, fetchFromGitHub, cmake, libuv, libmicrohttpd, libuuid +, donateLevel ? 0 +}: + +stdenv.mkDerivation rec { + name = "xmrig-proxy-${version}"; + version = "2.5.2"; + + src = fetchFromGitHub { + owner = "xmrig"; + repo = "xmrig-proxy"; + rev = "v${version}"; + sha256 = "1x10mrr58lc207zppzkjnhwah83kpxrqpa3idv01lyasv8mfkxzc"; + }; + + nativeBuildInputs = [ cmake ]; + buildInputs = [ libuv libmicrohttpd libuuid ]; + + postPatch = '' + substituteInPlace src/donate.h --replace "kDonateLevel = 2;" "kDonateLevel = ${toString donateLevel};" + ''; + + installPhase = '' + install -vD xmrig-proxy $out/bin/xmrig-proxy + ''; + + meta = with lib; { + description = "Monero (XMR) Stratum protocol proxy"; + homepage = "https://github.com/xmrig/xmrig-proxy"; + license = licenses.gpl3Plus; + maintainers = with maintainers; [ aij ]; + }; +} diff --git a/pkgs/top-level/all-packages.nix b/pkgs/top-level/all-packages.nix index 03018649317b..059a8430a692 100644 --- a/pkgs/top-level/all-packages.nix +++ b/pkgs/top-level/all-packages.nix @@ -16790,6 +16790,8 @@ with pkgs; xmrig = callPackage ../applications/misc/xmrig { }; + xmrig-proxy = callPackage ../applications/misc/xmrig-proxy { }; + monkeysAudio = callPackage ../applications/audio/monkeys-audio { }; monkeysphere = callPackage ../tools/security/monkeysphere { }; From 340270cb4430484029a0833ae3a472c2c2a5fcd6 Mon Sep 17 00:00:00 2001 From: Ivan Jager Date: Tue, 10 Apr 2018 05:57:05 -0500 Subject: [PATCH 2/2] Comment on kDonateLevel --- pkgs/applications/misc/xmrig-proxy/default.nix | 1 + 1 file changed, 1 insertion(+) diff --git a/pkgs/applications/misc/xmrig-proxy/default.nix b/pkgs/applications/misc/xmrig-proxy/default.nix index 04bc239ea5b2..248f629f2e91 100644 --- a/pkgs/applications/misc/xmrig-proxy/default.nix +++ b/pkgs/applications/misc/xmrig-proxy/default.nix @@ -16,6 +16,7 @@ stdenv.mkDerivation rec { nativeBuildInputs = [ cmake ]; buildInputs = [ libuv libmicrohttpd libuuid ]; + # Set default donation level to 0%. Can be increased at runtime via --donate-level option. postPatch = '' substituteInPlace src/donate.h --replace "kDonateLevel = 2;" "kDonateLevel = ${toString donateLevel};" '';