23b612e36f
GitOrigin-RevId: ae5c332cbb5827f6b1f02572496b141021de335f
56 lines
1 KiB
Nix
56 lines
1 KiB
Nix
{ stdenv
|
|
, cmake
|
|
, curl
|
|
, fetchFromGitHub
|
|
, gss
|
|
, hwloc
|
|
, lib
|
|
, libsodium
|
|
, libuv
|
|
, nix-update-script
|
|
, openssl
|
|
, pkg-config
|
|
, zeromq
|
|
, darwin
|
|
}:
|
|
|
|
let
|
|
inherit (darwin.apple_sdk.frameworks) Foundation;
|
|
in
|
|
stdenv.mkDerivation rec {
|
|
pname = "p2pool";
|
|
version = "3.10";
|
|
|
|
src = fetchFromGitHub {
|
|
owner = "SChernykh";
|
|
repo = "p2pool";
|
|
rev = "v${version}";
|
|
sha256 = "sha256-IDOtwrIKzP/pbwqIespvZtNS1VdR3246uXxgxR3V6VI=";
|
|
fetchSubmodules = true;
|
|
};
|
|
|
|
nativeBuildInputs = [ cmake pkg-config ];
|
|
buildInputs = [ libuv zeromq libsodium gss hwloc openssl curl ]
|
|
++ lib.optionals stdenv.isDarwin [ Foundation ];
|
|
|
|
cmakeFlags = ["-DWITH_LTO=OFF"];
|
|
|
|
installPhase = ''
|
|
runHook preInstall
|
|
|
|
install -vD p2pool $out/bin/p2pool
|
|
|
|
runHook postInstall
|
|
'';
|
|
|
|
passthru = {
|
|
updateScript = nix-update-script { };
|
|
};
|
|
|
|
meta = with lib; {
|
|
description = "Decentralized pool for Monero mining";
|
|
homepage = "https://github.com/SChernykh/p2pool";
|
|
license = licenses.gpl3Only;
|
|
maintainers = with maintainers; [ ratsclub ];
|
|
};
|
|
}
|