2021-05-11 06:38:59 +01:00
|
|
|
{ lib, buildGoModule, fetchFromGitHub, nixosTests }:
|
2020-06-17 10:13:44 +01:00
|
|
|
|
2021-05-11 06:38:59 +01:00
|
|
|
buildGoModule rec {
|
2020-06-17 10:13:44 +01:00
|
|
|
pname = "redis_exporter";
|
2021-05-11 06:38:59 +01:00
|
|
|
version = "1.23.1";
|
2020-06-17 10:13:44 +01:00
|
|
|
|
|
|
|
src = fetchFromGitHub {
|
|
|
|
owner = "oliver006";
|
|
|
|
repo = "redis_exporter";
|
|
|
|
rev = "v${version}";
|
2021-05-11 06:38:59 +01:00
|
|
|
sha256 = "0hlzxmc3jnmbym7by89bb73nlr0gw1xj8d88x10zx55kry7p0jfn";
|
2020-06-17 10:13:44 +01:00
|
|
|
};
|
|
|
|
|
2021-05-11 06:38:59 +01:00
|
|
|
vendorSha256 = "11237959ikd7l5glkhfz0g55mbld2hq985b5crwb9bnimaly5lga";
|
2020-06-17 10:13:44 +01:00
|
|
|
|
|
|
|
buildFlagsArray = ''
|
|
|
|
-ldflags=
|
|
|
|
-X main.BuildVersion=${version}
|
|
|
|
-X main.BuildCommitSha=unknown
|
|
|
|
-X main.BuildDate=unknown
|
|
|
|
'';
|
|
|
|
|
2021-05-11 06:38:59 +01:00
|
|
|
# needs a redis server
|
|
|
|
doCheck = false;
|
|
|
|
|
2020-06-18 11:48:40 +01:00
|
|
|
passthru.tests = { inherit (nixosTests.prometheus-exporters) redis; };
|
|
|
|
|
2021-01-11 07:54:33 +00:00
|
|
|
meta = with lib; {
|
2020-06-17 10:13:44 +01:00
|
|
|
description = "Prometheus exporter for Redis metrics";
|
|
|
|
inherit (src.meta) homepage;
|
|
|
|
license = licenses.mit;
|
2020-06-17 13:06:50 +01:00
|
|
|
maintainers = with maintainers; [ eskytthe srhb ];
|
2020-06-17 10:13:44 +01:00
|
|
|
platforms = platforms.unix;
|
|
|
|
};
|
|
|
|
}
|