2021-05-11 05:38:59 +00:00
|
|
|
{ lib, buildGoModule, fetchFromGitHub, nixosTests }:
|
2020-06-17 09:13:44 +00:00
|
|
|
|
2021-05-11 05:38:59 +00:00
|
|
|
buildGoModule rec {
|
2020-06-17 09:13:44 +00:00
|
|
|
pname = "redis_exporter";
|
2022-08-28 23:17:14 +00:00
|
|
|
version = "1.44.0";
|
2020-06-17 09:13:44 +00:00
|
|
|
|
|
|
|
src = fetchFromGitHub {
|
|
|
|
owner = "oliver006";
|
|
|
|
repo = "redis_exporter";
|
|
|
|
rev = "v${version}";
|
2022-08-28 23:17:14 +00:00
|
|
|
sha256 = "sha256-JUSU8x45lsW8DzcTHhhsQFDNux2FOGpehORYQrMR9HY=";
|
2020-06-17 09:13:44 +00:00
|
|
|
};
|
|
|
|
|
2022-08-13 20:31:43 +00:00
|
|
|
vendorSha256 = "sha256-E4+eUjkrOUnVg2CfCo1rc+Zs5HAm4+i8Ax0G8WnsL64=";
|
2020-06-17 09:13:44 +00:00
|
|
|
|
2021-08-23 04:55:51 +00:00
|
|
|
ldflags = [
|
2021-08-26 06:45:51 +00:00
|
|
|
"-X main.BuildVersion=${version}"
|
|
|
|
"-X main.BuildCommitSha=unknown"
|
|
|
|
"-X main.BuildDate=unknown"
|
2021-08-23 04:55:51 +00:00
|
|
|
];
|
2020-06-17 09:13:44 +00:00
|
|
|
|
2021-05-11 05:38:59 +00:00
|
|
|
# needs a redis server
|
|
|
|
doCheck = false;
|
|
|
|
|
2020-06-18 10:48:40 +00:00
|
|
|
passthru.tests = { inherit (nixosTests.prometheus-exporters) redis; };
|
|
|
|
|
2021-01-11 07:54:33 +00:00
|
|
|
meta = with lib; {
|
2020-06-17 09:13:44 +00:00
|
|
|
description = "Prometheus exporter for Redis metrics";
|
|
|
|
inherit (src.meta) homepage;
|
|
|
|
license = licenses.mit;
|
2020-06-17 12:06:50 +00:00
|
|
|
maintainers = with maintainers; [ eskytthe srhb ];
|
2020-06-17 09:13:44 +00:00
|
|
|
platforms = platforms.unix;
|
|
|
|
};
|
|
|
|
}
|