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

35 lines
858 B
Nix
Raw Normal View History

{ lib, buildGoModule, fetchFromGitHub, nixosTests }:
buildGoModule rec {
pname = "redis_exporter";
version = "1.34.1";
src = fetchFromGitHub {
owner = "oliver006";
repo = "redis_exporter";
rev = "v${version}";
sha256 = "sha256-poD7cuOxrNhhyW/GRxBjlJlRle38aYrQJ/g1d8TZ5o0=";
};
vendorSha256 = "sha256-1ogMI8Aw1xBd2PQ2QRiDLifQL3Z3kU4PbbCgHLHtp6A=";
ldflags = [
2021-08-26 07:45:51 +01:00
"-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;
};
}