nixpkgs/pkgs/servers/monitoring/prometheus/redis-exporter.nix
2022-08-13 20:31:43 +00:00

35 lines
858 B
Nix

{ lib, buildGoModule, fetchFromGitHub, nixosTests }:
buildGoModule rec {
pname = "redis_exporter";
version = "1.43.1";
src = fetchFromGitHub {
owner = "oliver006";
repo = "redis_exporter";
rev = "v${version}";
sha256 = "sha256-5S9c2lx7EQthY0bTPCSwVcGCD5G+IJEMV5zpCkjTw0s=";
};
vendorSha256 = "sha256-E4+eUjkrOUnVg2CfCo1rc+Zs5HAm4+i8Ax0G8WnsL64=";
ldflags = [
"-X main.BuildVersion=${version}"
"-X main.BuildCommitSha=unknown"
"-X main.BuildDate=unknown"
];
# needs a redis server
doCheck = false;
passthru.tests = { inherit (nixosTests.prometheus-exporters) redis; };
meta = with lib; {
description = "Prometheus exporter for Redis metrics";
inherit (src.meta) homepage;
license = licenses.mit;
maintainers = with maintainers; [ eskytthe srhb ];
platforms = platforms.unix;
};
}