2021-05-11 07:38:59 +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";
|
2021-05-11 07:38:59 +02:00
|
|
|
version = "1.23.1";
|
2020-06-17 11:13:44 +02:00
|
|
|
|
|
|
|
src = fetchFromGitHub {
|
|
|
|
owner = "oliver006";
|
|
|
|
repo = "redis_exporter";
|
|
|
|
rev = "v${version}";
|
2021-05-11 07:38:59 +02:00
|
|
|
sha256 = "0hlzxmc3jnmbym7by89bb73nlr0gw1xj8d88x10zx55kry7p0jfn";
|
2020-06-17 11:13:44 +02:00
|
|
|
};
|
|
|
|
|
2021-05-11 07:38:59 +02:00
|
|
|
vendorSha256 = "11237959ikd7l5glkhfz0g55mbld2hq985b5crwb9bnimaly5lga";
|
2020-06-17 11:13:44 +02:00
|
|
|
|
|
|
|
buildFlagsArray = ''
|
|
|
|
-ldflags=
|
|
|
|
-X main.BuildVersion=${version}
|
|
|
|
-X main.BuildCommitSha=unknown
|
|
|
|
-X main.BuildDate=unknown
|
|
|
|
'';
|
|
|
|
|
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";
|
|
|
|
inherit (src.meta) homepage;
|
|
|
|
license = licenses.mit;
|
2020-06-17 14:06:50 +02:00
|
|
|
maintainers = with maintainers; [ eskytthe srhb ];
|
2020-06-17 11:13:44 +02:00
|
|
|
platforms = platforms.unix;
|
|
|
|
};
|
|
|
|
}
|