bottom: add gpu recognition, new apple sdk, refactor (#360568)
[NixPkgs.git] / pkgs / by-name / pr / prometheus-borgmatic-exporter / package.nix
blobc5fc4c0eb53037992816fa99363fb7999a4bf367
2   lib,
3   borgmatic,
4   fetchFromGitHub,
5   python3Packages,
6 }:
8 python3Packages.buildPythonApplication rec {
9   pname = "prometheus-borgmatic-exporter";
10   version = "0.2.7";
11   pyproject = true;
13   src = fetchFromGitHub {
14     owner = "maxim-mityutko";
15     repo = "borgmatic-exporter";
16     rev = "refs/tags/v${version}";
17     hash = "sha256-ZZdCuIavJrIHO/ayMnirNRYyqovKQaW5jTRRrSOhofQ=";
18   };
20   pythonRelaxDeps = [ "prometheus-client" ];
22   build-system = with python3Packages; [ poetry-core ];
24   propagatedBuildInputs =
25     [ borgmatic ]
26     ++ (with python3Packages; [
27       arrow
28       click
29       flask
30       loguru
31       pretty-errors
32       prometheus-client
33       timy
34       waitress
35     ]);
37   nativeCheckInputs = with python3Packages; [
38     pytestCheckHook
39     pytest-mock
40   ];
42   meta = with lib; {
43     description = "Prometheus exporter for Borgmatic";
44     homepage = "https://github.com/maxim-mityutko/borgmatic-exporter";
45     changelog = "https://github.com/maxim-mityutko/borgmatic-exporter/releases/tag/v${version}";
46     license = licenses.mit;
47     maintainers = with maintainers; [ flandweber ];
48     mainProgram = "borgmatic-exporter";
49     platforms = platforms.unix;
50   };