nixpkgs/pkgs/by-name/p2/p2pool/package.nix
2025-06-20 12:28:51 +00:00

66 lines
1.0 KiB
Nix

{
stdenv,
cmake,
curl,
fetchFromGitHub,
gss,
hwloc,
lib,
libsodium,
libuv,
nix-update-script,
openssl,
pkg-config,
zeromq,
}:
stdenv.mkDerivation rec {
pname = "p2pool";
version = "4.8";
src = fetchFromGitHub {
owner = "SChernykh";
repo = "p2pool";
rev = "v${version}";
hash = "sha256-D1yQMcgRYVZf3/VGCmp6ZGu5YlWUmvlCx3pZqQF7JDM=";
fetchSubmodules = true;
};
nativeBuildInputs = [
cmake
pkg-config
];
buildInputs = [
libuv
zeromq
libsodium
gss
hwloc
openssl
curl
];
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 ];
mainProgram = "p2pool";
platforms = platforms.all;
};
}