From 69f015e4f4b21d7fe249ea33243586e3ff2f800c Mon Sep 17 00:00:00 2001 From: Finn Landweber Date: Wed, 21 Feb 2024 10:52:00 +0100 Subject: [PATCH] prometheus-borgmatic-exporter: init at 0.2.5 --- .../prometheus-borgmatic-exporter/package.nix | 47 +++++++++++++++++++ 1 file changed, 47 insertions(+) create mode 100644 pkgs/by-name/pr/prometheus-borgmatic-exporter/package.nix diff --git a/pkgs/by-name/pr/prometheus-borgmatic-exporter/package.nix b/pkgs/by-name/pr/prometheus-borgmatic-exporter/package.nix new file mode 100644 index 000000000000..ad02307ffa0e --- /dev/null +++ b/pkgs/by-name/pr/prometheus-borgmatic-exporter/package.nix @@ -0,0 +1,47 @@ +{ + lib, + fetchFromGitHub, + python3Packages, + borgmatic, +}: +python3Packages.buildPythonApplication rec { + pname = "prometheus-borgmatic-exporter"; + version = "0.2.5"; + pyproject = true; + + src = fetchFromGitHub { + owner = "maxim-mityutko"; + repo = "borgmatic-exporter"; + rev = "v${version}"; + hash = "sha256-SgP1utu4Eqs9214pYOT9wP0Ms7AUQH1A3czQF8+qBRo="; + }; + + nativeCheckInputs = with python3Packages; [ + pytestCheckHook + pytest-mock + ]; + + buildInputs = [python3Packages.poetry-core]; + + propagatedBuildInputs = + [ borgmatic ] + ++ (with python3Packages; [ + flask + arrow + click + loguru + pretty-errors + prometheus-client + timy + waitress + ]); + + meta = with lib; { + description = "Prometheus exporter for Borgmatic"; + homepage = "https://github.com/maxim-mityutko/borgmatic-exporter"; + license = licenses.mit; + maintainers = with maintainers; [ flandweber ]; + mainProgram = "borgmatic-exporter"; + platforms = platforms.unix; + }; +}