mirror of
https://github.com/NixOS/nixpkgs.git
synced 2024-11-23 23:43:30 +00:00
35 lines
894 B
Nix
35 lines
894 B
Nix
{ lib, buildGoModule, fetchFromGitHub, nixosTests }:
|
|
|
|
buildGoModule rec {
|
|
pname = "redis_exporter";
|
|
version = "1.58.0";
|
|
|
|
src = fetchFromGitHub {
|
|
owner = "oliver006";
|
|
repo = "redis_exporter";
|
|
rev = "v${version}";
|
|
sha256 = "sha256-tZ09vQBFUWw2l6OYwT/bXhBEMOTSl5r/Hu732msPGkg=";
|
|
};
|
|
|
|
vendorHash = "sha256-32EjLEPeFsihdG83ru4SSf03F2XJGD8+tbO9ANaI1hs=";
|
|
|
|
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";
|
|
mainProgram = "redis_exporter";
|
|
homepage = "https://github.com/oliver006/redis_exporter";
|
|
license = licenses.mit;
|
|
maintainers = with maintainers; [ eskytthe srhb ma27 ];
|
|
};
|
|
}
|