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";
|
2022-01-24 21:38:36 +00:00
|
|
|
version = "1.34.1";
|
2020-06-17 10:13:44 +01:00
|
|
|
|
|
|
|
src = fetchFromGitHub {
|
|
|
|
owner = "oliver006";
|
|
|
|
repo = "redis_exporter";
|
|
|
|
rev = "v${version}";
|
2022-01-24 21:38:36 +00:00
|
|
|
sha256 = "sha256-poD7cuOxrNhhyW/GRxBjlJlRle38aYrQJ/g1d8TZ5o0=";
|
2020-06-17 10:13:44 +01:00
|
|
|
};
|
|
|
|
|
2022-01-24 21:38:36 +00:00
|
|
|
vendorSha256 = "sha256-1ogMI8Aw1xBd2PQ2QRiDLifQL3Z3kU4PbbCgHLHtp6A=";
|
2020-06-17 10:13:44 +01:00
|
|
|
|
2021-08-23 05:55:51 +01:00
|
|
|
ldflags = [
|
2021-08-26 07:45:51 +01:00
|
|
|
"-X main.BuildVersion=${version}"
|
|
|
|
"-X main.BuildCommitSha=unknown"
|
|
|
|
"-X main.BuildDate=unknown"
|
2021-08-23 05:55:51 +01:00
|
|
|
];
|
2020-06-17 10:13:44 +01:00
|
|
|
|
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;
|
|
|
|
};
|
|
|
|
}
|