diff --git a/pkgs/servers/monitoring/grafana-agent/default.nix b/pkgs/servers/monitoring/grafana-agent/default.nix index 19cd13ce7e8f..b5ba65fb396e 100644 --- a/pkgs/servers/monitoring/grafana-agent/default.nix +++ b/pkgs/servers/monitoring/grafana-agent/default.nix @@ -1,14 +1,22 @@ -{ lib, stdenv, buildGoModule, fetchFromGitHub, systemd, nixosTests }: +{ lib +, buildGoModule +, fetchFromGitHub +, grafana-agent +, nixosTests +, stdenv +, systemd +, testers +}: buildGoModule rec { pname = "grafana-agent"; - version = "0.33.0"; + version = "0.33.1"; src = fetchFromGitHub { rev = "v${version}"; owner = "grafana"; repo = "agent"; - sha256 = "sha256-Goj/IySGDMa8pNwU/4oXIlGqMysghNj0EjnQZtN6v1E="; + sha256 = "sha256-iE7LNm0Nur0eo7AjTDl9sq3oxm6SdIUoSfT8h2C4jOA="; }; vendorHash = "sha256-NqsUeTxTYQrVMJ4LYA5NC8A/PpVuy6fnKptxK+ieZAU="; @@ -50,7 +58,14 @@ buildGoModule rec { $out/bin/grafana-agent ''; - passthru.tests.grafana-agent = nixosTests.grafana-agent; + passthru.tests = { + inherit (nixosTests) grafana-agent; + version = testers.testVersion { + inherit version; + command = "${lib.getExe grafana-agent} --version"; + package = grafana-agent; + }; + }; meta = with lib; { description = "A lightweight subset of Prometheus and more, optimized for Grafana Cloud";