diff --git a/pkgs/by-name/pr/prometheus-borgmatic-exporter/package.nix b/pkgs/by-name/pr/prometheus-borgmatic-exporter/package.nix index 0bcbcfb4916c..6c5a0f00306d 100644 --- a/pkgs/by-name/pr/prometheus-borgmatic-exporter/package.nix +++ b/pkgs/by-name/pr/prometheus-borgmatic-exporter/package.nix @@ -1,20 +1,23 @@ { lib, borgmatic, + nixosTests, fetchFromGitHub, python3Packages, }: -python3Packages.buildPythonApplication rec { +python3Packages.buildPythonApplication (finallAttrs: { pname = "prometheus-borgmatic-exporter"; - version = "0.4.0"; + version = "0.5.0"; pyproject = true; + __structuredAttrs = true; + src = fetchFromGitHub { owner = "maxim-mityutko"; repo = "borgmatic-exporter"; - tag = "v${version}"; - hash = "sha256-fhsGpQolZxX5VAAEV3hiLF7bo4pbVt9GWyertf2oeO0="; + tag = "v${finallAttrs.version}"; + hash = "sha256-pa1f31jrfDzUB3+xexJUwG0byiFszj/zEt+dIwlEv0o="; }; pythonRelaxDeps = [ "prometheus-client" ]; @@ -33,6 +36,7 @@ python3Packages.buildPythonApplication rec { prometheus-client timy waitress + flask-caching ]); nativeCheckInputs = with python3Packages; [ @@ -40,13 +44,17 @@ python3Packages.buildPythonApplication rec { pytest-mock ]; + __darwinAllowLocalNetworking = true; + + passthru.tests.borgmatic = nixosTests.prometheus-exporters.borgmatic; + meta = { description = "Prometheus exporter for Borgmatic"; homepage = "https://github.com/maxim-mityutko/borgmatic-exporter"; - changelog = "https://github.com/maxim-mityutko/borgmatic-exporter/releases/tag/${src.tag}"; + changelog = "https://github.com/maxim-mityutko/borgmatic-exporter/releases/tag/${finallAttrs.src.tag}"; license = lib.licenses.mit; maintainers = with lib.maintainers; [ flandweber ]; mainProgram = "borgmatic-exporter"; platforms = lib.platforms.unix; }; -} +})