From da3c2f4c0e20f77dfad78b2d640cacf7bfa76e91 Mon Sep 17 00:00:00 2001 From: Martin Weinelt Date: Tue, 7 Jul 2026 23:41:53 +0200 Subject: [PATCH] prometheus-kea-exporter: 0.7.0 -> 0.7.1 https://github.com/mweinelt/kea-exporter/blob/v0.7.1/HISTORY --- .../pr/prometheus-kea-exporter/package.nix | 26 +++++++++---------- 1 file changed, 12 insertions(+), 14 deletions(-) diff --git a/pkgs/by-name/pr/prometheus-kea-exporter/package.nix b/pkgs/by-name/pr/prometheus-kea-exporter/package.nix index 2b2cadba9b01..dc9c463886a0 100644 --- a/pkgs/by-name/pr/prometheus-kea-exporter/package.nix +++ b/pkgs/by-name/pr/prometheus-kea-exporter/package.nix @@ -1,19 +1,21 @@ { lib, python3Packages, - fetchPypi, + fetchFromGitHub, nixosTests, + versionCheckHook, }: -python3Packages.buildPythonApplication rec { +python3Packages.buildPythonApplication (finalAttrs: { pname = "kea-exporter"; - version = "0.7.0"; + version = "0.7.1"; pyproject = true; - src = fetchPypi { - pname = "kea_exporter"; - inherit version; - hash = "sha256-kn2iwYWcyW90tgfWmzLF7rU06fJyLRzqYKNLOgu/Yqk="; + src = fetchFromGitHub { + owner = "mweinelt"; + repo = "kea-exporter"; + tag = "v${finalAttrs.version}"; + hash = "sha256-UwQYR01cBdPEUBhOo5TqwmptAvJpxln1OLU2boAFdn4="; }; nativeBuildInputs = with python3Packages; [ @@ -26,21 +28,17 @@ python3Packages.buildPythonApplication rec { requests ]; - checkPhase = '' - $out/bin/kea-exporter --help > /dev/null - $out/bin/kea-exporter --version | grep -q ${version} - ''; - + nativeInstallCheckInputs = [ versionCheckHook ]; passthru.tests = { inherit (nixosTests) kea; }; meta = { - changelog = "https://github.com/mweinelt/kea-exporter/blob/v${version}/HISTORY"; + changelog = "https://github.com/mweinelt/kea-exporter/blob/v${finalAttrs.version}/HISTORY"; description = "Export Kea Metrics in the Prometheus Exposition Format"; mainProgram = "kea-exporter"; homepage = "https://github.com/mweinelt/kea-exporter"; license = lib.licenses.mit; maintainers = with lib.maintainers; [ hexa ]; }; -} +})