3
0
Fork 0
forked from mirrors/nixpkgs
nixpkgs/pkgs/servers/monitoring/prometheus/redis-exporter.nix
2021-01-25 18:31:47 +01:00

35 lines
866 B
Nix

{ lib, buildGoPackage, fetchFromGitHub, nixosTests }:
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
'';
passthru.tests = { inherit (nixosTests.prometheus-exporters) redis; };
meta = with lib; {
description = "Prometheus exporter for Redis metrics";
inherit (src.meta) homepage;
license = licenses.mit;
maintainers = with maintainers; [ eskytthe srhb ];
platforms = platforms.unix;
};
}