diff --git a/pkgs/applications/misc/xmrig/proxy.nix b/pkgs/applications/misc/xmrig/proxy.nix index 1040451efae0..461af3ca669e 100644 --- a/pkgs/applications/misc/xmrig/proxy.nix +++ b/pkgs/applications/misc/xmrig/proxy.nix @@ -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; { diff --git a/pkgs/top-level/all-packages.nix b/pkgs/top-level/all-packages.nix index a2c26c8dddda..a2977ad6a7a3 100644 --- a/pkgs/top-level/all-packages.nix +++ b/pkgs/top-level/all-packages.nix @@ -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 { };