prometheus-borgmatic-exporter: refactor

- relax prometheus-client
- add changelog to meta
This commit is contained in:
Fabian Affolter 2024-09-23 23:14:18 +02:00
parent 8637e879e4
commit c556a23491

View File

@ -1,34 +1,32 @@
{
lib,
borgmatic,
fetchFromGitHub,
python3Packages,
borgmatic,
}:
python3Packages.buildPythonApplication rec {
pname = "prometheus-borgmatic-exporter";
version = "0.2.5";
pyproject = true;
pyproject = true;
src = fetchFromGitHub {
owner = "maxim-mityutko";
repo = "borgmatic-exporter";
rev = "v${version}";
rev = "refs/tags/v${version}";
hash = "sha256-SgP1utu4Eqs9214pYOT9wP0Ms7AUQH1A3czQF8+qBRo=";
};
nativeCheckInputs = with python3Packages; [
pytestCheckHook
pytest-mock
];
pythonRelaxDeps = [ "prometheus-client" ];
buildInputs = [python3Packages.poetry-core];
build-system = with python3Packages; [ poetry-core ];
propagatedBuildInputs =
[ borgmatic ]
++ (with python3Packages; [
flask
arrow
click
flask
loguru
pretty-errors
prometheus-client
@ -36,9 +34,15 @@ python3Packages.buildPythonApplication rec {
waitress
]);
nativeCheckInputs = with python3Packages; [
pytestCheckHook
pytest-mock
];
meta = with lib; {
description = "Prometheus exporter for Borgmatic";
homepage = "https://github.com/maxim-mityutko/borgmatic-exporter";
changelog = "https://github.com/maxim-mityutko/borgmatic-exporter/releases/tag/v${version}";
license = licenses.mit;
maintainers = with maintainers; [ flandweber ];
mainProgram = "borgmatic-exporter";