Merge pull request #330634 from r-ryantm/auto-update/circumflex
[NixPkgs.git] / pkgs / servers / monitoring / prometheus / sabnzbd-exporter.nix
blobab7e23ccc4c43a5d14e22eda3c2022f2091dd269
1 { lib, fetchFromGitHub, python3Packages }:
3 python3Packages.buildPythonApplication rec {
4   pname = "sabnzbd_exporter";
5   version = "0.1.73";
7   format = "other";
9   src = fetchFromGitHub {
10     owner = "msroest";
11     repo = pname;
12     rev = "refs/tags/${version}";
13     hash = "sha256-c+NbaHYr/CzZ94/i92W2g7+RBSPSmkE2yszNE6L6M6Y=";
14   };
16   propagatedBuildInputs = with python3Packages; [ prometheus-client requests ];
18   installPhase = ''
19     runHook preInstall
21     mkdir -p $out/bin
22     cp sabnzbd_exporter.py $out/bin/
24     mkdir -p $out/share/${pname}
25     cp examples/* $out/share/${pname}/
27     runHook postInstall
28   '';
30   meta = with lib; {
31     description = "Prometheus exporter for sabnzbd";
32     homepage = "https://github.com/msroest/sabnzbd_exporter";
33     license = licenses.mit;
34     maintainers = with maintainers; [ fugi ];
35     platforms = platforms.all;
36     mainProgram = "sabnzbd_exporter.py";
37   };