2021-12-19 01:06:50 +00:00
|
|
|
{ stdenv
|
|
|
|
, cmake
|
2022-08-21 13:32:41 +00:00
|
|
|
, curl
|
2021-12-19 01:06:50 +00:00
|
|
|
, fetchFromGitHub
|
|
|
|
, gss
|
|
|
|
, hwloc
|
|
|
|
, lib
|
|
|
|
, libsodium
|
|
|
|
, libuv
|
2022-02-10 20:34:41 +00:00
|
|
|
, nix-update-script
|
2021-12-19 01:06:50 +00:00
|
|
|
, openssl
|
|
|
|
, pkg-config
|
|
|
|
, zeromq
|
2023-02-02 18:25:31 +00:00
|
|
|
, darwin
|
2021-12-19 01:06:50 +00:00
|
|
|
}:
|
|
|
|
|
2023-02-02 18:25:31 +00:00
|
|
|
let
|
|
|
|
inherit (darwin.apple_sdk.frameworks) Foundation;
|
|
|
|
in
|
2021-12-19 01:06:50 +00:00
|
|
|
stdenv.mkDerivation rec {
|
|
|
|
pname = "p2pool";
|
2024-09-19 14:19:46 +00:00
|
|
|
version = "4.1";
|
2021-12-19 01:06:50 +00:00
|
|
|
|
|
|
|
src = fetchFromGitHub {
|
|
|
|
owner = "SChernykh";
|
|
|
|
repo = "p2pool";
|
|
|
|
rev = "v${version}";
|
2024-09-19 14:19:46 +00:00
|
|
|
hash = "sha256-eMg8DXFtVfYhl6vpg/KRUZUgMU/XsCS29Af1CSIbUsY=";
|
2021-12-19 01:06:50 +00:00
|
|
|
fetchSubmodules = true;
|
|
|
|
};
|
|
|
|
|
|
|
|
nativeBuildInputs = [ cmake pkg-config ];
|
2023-02-02 18:25:31 +00:00
|
|
|
buildInputs = [ libuv zeromq libsodium gss hwloc openssl curl ]
|
2024-09-26 11:04:55 +00:00
|
|
|
++ lib.optionals stdenv.hostPlatform.isDarwin [ Foundation ];
|
2021-12-19 01:06:50 +00:00
|
|
|
|
2023-04-12 12:48:02 +00:00
|
|
|
cmakeFlags = ["-DWITH_LTO=OFF"];
|
|
|
|
|
2024-09-26 11:04:55 +00:00
|
|
|
env.NIX_CFLAGS_COMPILE = toString (lib.optionals (stdenv.hostPlatform.isDarwin && lib.versionOlder stdenv.hostPlatform.darwinMinVersion "10.13") [
|
2024-07-27 06:49:29 +00:00
|
|
|
"-faligned-allocation"
|
|
|
|
]);
|
|
|
|
|
2021-12-19 01:06:50 +00:00
|
|
|
installPhase = ''
|
|
|
|
runHook preInstall
|
|
|
|
|
|
|
|
install -vD p2pool $out/bin/p2pool
|
|
|
|
|
|
|
|
runHook postInstall
|
|
|
|
'';
|
|
|
|
|
2022-02-10 20:34:41 +00:00
|
|
|
passthru = {
|
2022-12-28 21:21:41 +00:00
|
|
|
updateScript = nix-update-script { };
|
2022-02-10 20:34:41 +00:00
|
|
|
};
|
|
|
|
|
2021-12-19 01:06:50 +00:00
|
|
|
meta = with lib; {
|
|
|
|
description = "Decentralized pool for Monero mining";
|
|
|
|
homepage = "https://github.com/SChernykh/p2pool";
|
|
|
|
license = licenses.gpl3Only;
|
|
|
|
maintainers = with maintainers; [ ratsclub ];
|
2024-02-29 20:09:43 +00:00
|
|
|
mainProgram = "p2pool";
|
2024-07-27 06:49:29 +00:00
|
|
|
platforms = platforms.all;
|
2021-12-19 01:06:50 +00:00
|
|
|
};
|
|
|
|
}
|