xmrig-proxy: 6.18.0 -> 6.19.0

This commit is contained in:
Weijia Wang 2023-02-05 06:25:30 +01:00
parent 06999209d7
commit 2b2a5980e0
2 changed files with 36 additions and 9 deletions

View File

@ -1,27 +1,54 @@
{ stdenv, lib, fetchFromGitHub, cmake, libuv, libmicrohttpd, openssl
{ stdenv
, lib
, fetchFromGitHub
, cmake
, libuv
, libmicrohttpd
, openssl
, darwin
}:
let
inherit (darwin.apple_sdk_11_0.frameworks) CoreServices IOKit;
in
stdenv.mkDerivation rec {
pname = "xmrig-proxy";
version = "6.18.0";
version = "6.19.0";
src = fetchFromGitHub {
owner = "xmrig";
repo = "xmrig-proxy";
rev = "v${version}";
sha256 = "sha256-3Tp0wTL3uHs0N4CdlNusvpuam653b6qUZu9/KBT4HOM=";
hash = "sha256-0vmRwe7PQVifm6HxgpPno9mIFcBZFtxqNdDK4V637ds=";
};
nativeBuildInputs = [ cmake ];
buildInputs = [ libuv libmicrohttpd openssl ];
postPatch = ''
# Link dynamically against libuuid instead of statically
substituteInPlace CMakeLists.txt --replace uuid.a uuid
# Link dynamically against libraries instead of statically
substituteInPlace CMakeLists.txt \
--replace uuid.a uuid
substituteInPlace cmake/OpenSSL.cmake \
--replace "set(OPENSSL_USE_STATIC_LIBS TRUE)" "set(OPENSSL_USE_STATIC_LIBS FALSE)"
'';
nativeBuildInputs = [
cmake
];
buildInputs = [
libuv
libmicrohttpd
openssl
] ++ lib.optionals stdenv.isDarwin [
CoreServices
IOKit
];
installPhase = ''
runHook preInstall
install -vD xmrig-proxy $out/bin/xmrig-proxy
runHook postInstall
'';
meta = with lib; {

View File

@ -31243,7 +31243,7 @@ with pkgs;
xmrig-mo = callPackage ../applications/misc/xmrig/moneroocean.nix { };
xmrig-proxy = callPackage ../applications/misc/xmrig/proxy.nix { };
xmrig-proxy = darwin.apple_sdk_11_0.callPackage ../applications/misc/xmrig/proxy.nix { };
molot-lite = callPackage ../applications/audio/molot-lite { };