xmrig-proxy: 2.6.4 -> 2.11.0

This commit is contained in:
Franz Pletz 2019-02-11 23:26:47 +01:00
parent 42d0110ed6
commit b6baac324b
No known key found for this signature in database
GPG Key ID: 846FDED7792617B4

View File

@ -1,24 +1,28 @@
{ stdenv, lib, fetchFromGitHub, cmake, libuv, libmicrohttpd, libuuid
{ stdenv, lib, fetchFromGitHub, cmake, libuv, libmicrohttpd, libuuid, openssl
, donateLevel ? 0
}:
stdenv.mkDerivation rec {
name = "xmrig-proxy-${version}";
version = "2.6.4";
version = "2.11.0";
src = fetchFromGitHub {
owner = "xmrig";
repo = "xmrig-proxy";
rev = "v${version}";
sha256 = "0h6ihrrkgwi8k642iqq13qx3zlxl9r8q7wm417hb7j35rnmwn8lq";
sha256 = "1jjcgnpkxdafsdsxndsvzd84i6mwk7ix4vvgs3k1dla9ll9nwq5j";
};
nativeBuildInputs = [ cmake ];
buildInputs = [ libuv libmicrohttpd libuuid ];
buildInputs = [ libuv libmicrohttpd libuuid openssl ];
# 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};"
# Set default donation level to 0%. Can be increased at runtime via --donate-level option.
substituteInPlace src/donate.h \
--replace "kDefaultDonateLevel = 2;" "kDefaultDonateLevel = ${toString donateLevel};"
# Link dynamically against libuuid instead of statically
substituteInPlace CMakeLists.txt --replace uuid.a uuid
'';
installPhase = ''