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";
|
2022-02-20 13:03:55 +01:00
|
|
|
version = "1.35.1";
|
2020-06-17 11:13:44 +02:00
|
|
|
|
|
|
|
src = fetchFromGitHub {
|
|
|
|
owner = "oliver006";
|
|
|
|
repo = "redis_exporter";
|
|
|
|
rev = "v${version}";
|
2022-02-20 13:03:55 +01:00
|
|
|
sha256 = "sha256-S89Okd57QyMHb/QYUQbib2HLdH9qo0duNxcdaP8wKUg=";
|
2020-06-17 11:13:44 +02:00
|
|
|
};
|
|
|
|
|
2022-02-05 20:57:35 +01:00
|
|
|
vendorSha256 = "sha256-u9FfKOD6kiCFTjwQ7LHE9WC4j2vPm0ZCluL8pC4aQIc=";
|
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";
|
|
|
|
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;
|
|
|
|
};
|
|
|
|
}
|