33 lines
858 B
Nix
33 lines
858 B
Nix
{ lib, buildGoModule, fetchFromGitHub, nixosTests }:
|
|
|
|
buildGoModule rec {
|
|
pname = "redis_exporter";
|
|
version = "1.56.0";
|
|
|
|
src = fetchFromGitHub {
|
|
owner = "oliver006";
|
|
repo = "redis_exporter";
|
|
rev = "v${version}";
|
|
sha256 = "sha256-7tnl8iItGegfRXLF3f+tmNxgJWkai6n8EOP00zyqyYs=";
|
|
};
|
|
|
|
vendorHash = "sha256-r+VJ2+4F3BQ0tmNTVHDOxKaKAPSIvgu7ZcQZ6BXt2kA=";
|
|
|
|
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";
|
|
homepage = "https://github.com/oliver006/redis_exporter";
|
|
license = licenses.mit;
|
|
maintainers = with maintainers; [ eskytthe srhb ma27 ];
|
|
};
|
|
}
|