nixpkgs/pkgs/servers/monitoring/prometheus/redis-exporter.nix

35 lines
860 B
Nix

{ lib, buildGoModule, fetchFromGitHub, nixosTests }:
buildGoModule rec {
pname = "redis_exporter";
version = "1.23.1";
src = fetchFromGitHub {
owner = "oliver006";
repo = "redis_exporter";
rev = "v${version}";
sha256 = "0hlzxmc3jnmbym7by89bb73nlr0gw1xj8d88x10zx55kry7p0jfn";
};
vendorSha256 = "11237959ikd7l5glkhfz0g55mbld2hq985b5crwb9bnimaly5lga";
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;
};
}