Some checks failed
Periodic Merges (6h) / master → staging-nixos (push) Failing after 12m50s
Periodic Merges (6h) / master → staging-next (push) Failing after 12m54s
Periodic Merges (24h) / merge-base(master,staging) → haskell-updates (push) Failing after 11m54s
Periodic Merges (6h) / staging-next → staging (push) Failing after 12m13s
Periodic Merges (24h) / staging-next-25.05 → staging-25.05 (push) Failing after 13m24s
Periodic Merges (24h) / release-25.05 → staging-next-25.05 (push) Failing after 14m28s
51 lines
1.0 KiB
Nix
51 lines
1.0 KiB
Nix
{
|
|
lib,
|
|
fetchFromGitHub,
|
|
python3Packages,
|
|
nixosTests,
|
|
}:
|
|
|
|
python3Packages.buildPythonApplication rec {
|
|
pname = "sabnzbd_exporter";
|
|
version = "0.1.78";
|
|
|
|
format = "other";
|
|
|
|
src = fetchFromGitHub {
|
|
owner = "msroest";
|
|
repo = pname;
|
|
rev = "refs/tags/${version}";
|
|
hash = "sha256-BLqG2I7D/bqRj6+/LUKOimmTRTH/kRdukkGdOJT3+PA=";
|
|
};
|
|
|
|
propagatedBuildInputs = with python3Packages; [
|
|
prometheus-client
|
|
requests
|
|
];
|
|
|
|
installPhase = ''
|
|
runHook preInstall
|
|
|
|
mkdir -p $out/bin
|
|
cp sabnzbd_exporter.py $out/bin/
|
|
|
|
mkdir -p $out/share/${pname}
|
|
cp examples/* $out/share/${pname}/
|
|
|
|
runHook postInstall
|
|
'';
|
|
|
|
passthru.tests = {
|
|
inherit (nixosTests.prometheus-exporters) sabnzbd;
|
|
};
|
|
|
|
meta = with lib; {
|
|
description = "Prometheus exporter for sabnzbd";
|
|
homepage = "https://github.com/msroest/sabnzbd_exporter";
|
|
license = licenses.mit;
|
|
maintainers = with maintainers; [ fugi ];
|
|
platforms = platforms.all;
|
|
mainProgram = "sabnzbd_exporter.py";
|
|
};
|
|
}
|