forked from mirrors/nixpkgs
35 lines
858 B
Nix
35 lines
858 B
Nix
{ lib, buildGoModule, fetchFromGitHub, nixosTests }:
|
|
|
|
buildGoModule rec {
|
|
pname = "redis_exporter";
|
|
version = "1.29.0";
|
|
|
|
src = fetchFromGitHub {
|
|
owner = "oliver006";
|
|
repo = "redis_exporter";
|
|
rev = "v${version}";
|
|
sha256 = "sha256-13um5/k/Mh/BLgvd9ziR5vo9HfVqgaQMfJTPYRPVlRY=";
|
|
};
|
|
|
|
vendorSha256 = "sha256-vCE1mr7R3o3uiVQvIqg+qOngh5nrr957mgbO+6E72Ss=";
|
|
|
|
ldflags = [
|
|
"-X main.BuildVersion=${version}"
|
|
"-X main.BuildCommitSha=unknown"
|
|
"-X main.BuildDate=unknown"
|
|
];
|
|
|
|
# needs a redis server
|
|
doCheck = false;
|
|
|
|
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;
|
|
};
|
|
}
|