mirror of
https://github.com/NixOS/nixpkgs.git
synced 2024-12-15 17:25:11 +00:00
36 lines
887 B
Nix
36 lines
887 B
Nix
{ lib, buildGoModule, fetchFromGitHub, nixosTests }:
|
|
|
|
buildGoModule rec {
|
|
pname = "redis_exporter";
|
|
version = "1.23.1";
|
|
|
|
src = fetchFromGitHub {
|
|
owner = "oliver006";
|
|
repo = "redis_exporter";
|
|
rev = "v${version}";
|
|
sha256 = "0hlzxmc3jnmbym7by89bb73nlr0gw1xj8d88x10zx55kry7p0jfn";
|
|
};
|
|
|
|
vendorSha256 = "11237959ikd7l5glkhfz0g55mbld2hq985b5crwb9bnimaly5lga";
|
|
|
|
buildFlagsArray = ''
|
|
-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;
|
|
};
|
|
}
|