2020-06-18 11:48:40 +01:00
|
|
|
{ stdenv, buildGoPackage, fetchFromGitHub, nixosTests }:
|
2020-06-17 10:13:44 +01:00
|
|
|
|
|
|
|
buildGoPackage rec {
|
|
|
|
pname = "redis_exporter";
|
|
|
|
version = "1.7.0";
|
|
|
|
|
|
|
|
goPackagePath = "github.com/oliver006/redis_exporter";
|
|
|
|
|
|
|
|
src = fetchFromGitHub {
|
|
|
|
owner = "oliver006";
|
|
|
|
repo = "redis_exporter";
|
|
|
|
rev = "v${version}";
|
|
|
|
sha256 = "0rwaxpylividyxz0snfgck32kvpgjkhg20bmdnlp35cdzxcxi8m1";
|
|
|
|
};
|
|
|
|
|
|
|
|
goDeps = ./redis-exporter-deps.nix;
|
|
|
|
|
|
|
|
buildFlagsArray = ''
|
|
|
|
-ldflags=
|
|
|
|
-X main.BuildVersion=${version}
|
|
|
|
-X main.BuildCommitSha=unknown
|
|
|
|
-X main.BuildDate=unknown
|
|
|
|
'';
|
|
|
|
|
2020-06-18 11:48:40 +01:00
|
|
|
passthru.tests = { inherit (nixosTests.prometheus-exporters) redis; };
|
|
|
|
|
2020-06-17 10:13:44 +01:00
|
|
|
meta = with stdenv.lib; {
|
|
|
|
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;
|
|
|
|
};
|
|
|
|
}
|