depot/pkgs/by-name/pr/prometheus-frr-exporter/package.nix
Luke Granger-Brown 57725ef3ec Squashed 'third_party/nixpkgs/' content from commit 76612b17c0ce
git-subtree-dir: third_party/nixpkgs
git-subtree-split: 76612b17c0ce71689921ca12d9ffdc9c23ce40b2
2024-11-10 23:59:47 +00:00

35 lines
1 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";
};
}