diff options
author | Sarah Brofeldt <sbrofeldt@gmail.com> | 2024-05-22 13:22:25 +0200 |
---|---|---|
committer | GitHub <noreply@github.com> | 2024-05-22 13:22:25 +0200 |
commit | 441ad6ecb68b402a872f7f7db9a7d86b173609c4 (patch) | |
tree | 06af31c6312cf60dcce4600e4c99191a5403ef9a /pkgs/by-name/pr | |
parent | a68d0e68197c7c47e4d6bcec73da588e6d1c601a (diff) | |
parent | 5424ae8ee5739dbcb05e850f2ab0d41580dee2c5 (diff) |
Merge pull request #309442 from javaes/init_frr-exporter
frr-exporter: init at 1.2.0
Diffstat (limited to 'pkgs/by-name/pr')
-rw-r--r-- | pkgs/by-name/pr/prometheus-frr-exporter/package.nix | 35 |
1 files changed, 35 insertions, 0 deletions
diff --git a/pkgs/by-name/pr/prometheus-frr-exporter/package.nix b/pkgs/by-name/pr/prometheus-frr-exporter/package.nix new file mode 100644 index 0000000000000..40f2a982bf4b9 --- /dev/null +++ b/pkgs/by-name/pr/prometheus-frr-exporter/package.nix @@ -0,0 +1,35 @@ +{ lib, buildGoModule, fetchFromGitHub }: + +let + version = "1.2.0"; + src = fetchFromGitHub { + owner = "tynany"; + repo = "frr_exporter"; + rev = "v${version}"; + hash = "sha256-sjC6ee7VMbr5zlahAA/i4wrZIu8CBUF+LYaq6uEvukk="; + }; +in +buildGoModule { + pname = "prometheus-frr-exporter"; + vendorHash = "sha256-xckGN/FKN2bwFPll6IRDBOGGUm2JTzoZDwKC6ZkoD/Y="; + 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"; + }; +} |