2023-08-14 16:11:53 +02:00
|
|
|
{ lib, buildGoModule, fetchFromGitHub, nixosTests }:
|
2020-06-17 11:13:44 +02:00
|
|
|
|
2021-05-11 07:38:59 +02:00
|
|
|
buildGoModule rec {
|
2020-06-17 11:13:44 +02:00
|
|
|
pname = "redis_exporter";
|
2023-12-28 09:22:59 +01:00
|
|
|
version = "1.56.0";
|
2020-06-17 11:13:44 +02:00
|
|
|
|
|
|
|
src = fetchFromGitHub {
|
|
|
|
owner = "oliver006";
|
|
|
|
repo = "redis_exporter";
|
|
|
|
rev = "v${version}";
|
2023-12-28 09:22:59 +01:00
|
|
|
sha256 = "sha256-7tnl8iItGegfRXLF3f+tmNxgJWkai6n8EOP00zyqyYs=";
|
2020-06-17 11:13:44 +02:00
|
|
|
};
|
|
|
|
|
2023-12-28 09:22:59 +01:00
|
|
|
vendorHash = "sha256-r+VJ2+4F3BQ0tmNTVHDOxKaKAPSIvgu7ZcQZ6BXt2kA=";
|
2020-06-17 11:13:44 +02:00
|
|
|
|
2021-08-23 06:55:51 +02:00
|
|
|
ldflags = [
|
2021-08-26 08:45:51 +02:00
|
|
|
"-X main.BuildVersion=${version}"
|
|
|
|
"-X main.BuildCommitSha=unknown"
|
|
|
|
"-X main.BuildDate=unknown"
|
2021-08-23 06:55:51 +02:00
|
|
|
];
|
2020-06-17 11:13:44 +02:00
|
|
|
|
2021-05-11 07:38:59 +02:00
|
|
|
# needs a redis server
|
|
|
|
doCheck = false;
|
|
|
|
|
2020-06-18 12:48:40 +02:00
|
|
|
passthru.tests = { inherit (nixosTests.prometheus-exporters) redis; };
|
|
|
|
|
2021-01-11 08:54:33 +01:00
|
|
|
meta = with lib; {
|
2020-06-17 11:13:44 +02:00
|
|
|
description = "Prometheus exporter for Redis metrics";
|
2023-04-09 03:30:09 +02:00
|
|
|
homepage = "https://github.com/oliver006/redis_exporter";
|
2020-06-17 11:13:44 +02:00
|
|
|
license = licenses.mit;
|
2023-03-04 11:27:51 +01:00
|
|
|
maintainers = with maintainers; [ eskytthe srhb ma27 ];
|
2020-06-17 11:13:44 +02:00
|
|
|
};
|
|
|
|
}
|