mirror of
https://github.com/NixOS/nixpkgs.git
synced 2025-01-02 19:14:14 +00:00
36 lines
1.0 KiB
Nix
36 lines
1.0 KiB
Nix
{ lib, buildGoModule, fetchFromGitHub }:
|
|
|
|
let
|
|
version = "1.3.1";
|
|
src = fetchFromGitHub {
|
|
owner = "tynany";
|
|
repo = "frr_exporter";
|
|
rev = "v${version}";
|
|
hash = "sha256-SDtI7CvCeuRL1cXNsWGCl/zupVbgMxv5bzYYqJWTrMw=";
|
|
};
|
|
in
|
|
buildGoModule {
|
|
pname = "prometheus-frr-exporter";
|
|
vendorHash = "sha256-G+S4XORrg0AEKoAqYdmg+uW6x0Ub5diQTyQGY0iebHg=";
|
|
inherit src version;
|
|
|
|
ldflags = [
|
|
"-X github.com/prometheus/common/version.Version=${version}"
|
|
"-X github.com/prometheus/common/version.Revision=${src.rev}"
|
|
"-X github.com/prometheus/common/version.Branch=unknown"
|
|
];
|
|
|
|
meta = with lib; {
|
|
description = "Prometheus exporter for FRR version 3.0+";
|
|
longDescription = ''
|
|
Prometheus exporter for FRR version 3.0+ that collects metrics from the
|
|
FRR Unix sockets and exposes them via HTTP, ready for collecting by
|
|
Prometheus.
|
|
'';
|
|
homepage = "https://github.com/tynany/frr_exporter";
|
|
license = licenses.mit;
|
|
maintainers = with maintainers; [ javaes ];
|
|
mainProgram = "frr_exporter";
|
|
};
|
|
}
|