From 8fa3fccecb5d7fac49442ba14ddb7cc0c17c8925 Mon Sep 17 00:00:00 2001 From: Rodrigo Arias Mallo Date: Thu, 21 Sep 2023 21:34:18 +0200 Subject: [PATCH] Add prometheus-slurm-exporter package --- pkgs/overlay.nix | 2 ++ pkgs/slurm-exporter.nix | 22 ++++++++++++++++++++++ 2 files changed, 24 insertions(+) create mode 100644 pkgs/slurm-exporter.nix diff --git a/pkgs/overlay.nix b/pkgs/overlay.nix index 03208c5..47a4f3a 100644 --- a/pkgs/overlay.nix +++ b/pkgs/overlay.nix @@ -32,4 +32,6 @@ final: prev: lua = prev.lua5_4; fmt = prev.fmt_8; }) ceph ceph-client; + + prometheus-slurm-exporter = prev.callPackage ./slurm-exporter.nix { }; } diff --git a/pkgs/slurm-exporter.nix b/pkgs/slurm-exporter.nix new file mode 100644 index 0000000..49070cd --- /dev/null +++ b/pkgs/slurm-exporter.nix @@ -0,0 +1,22 @@ +{ buildGoModule, fetchFromGitHub, lib }: + +buildGoModule rec { + pname = "prometheus-slurm-exporter"; + version = "0.20"; + + src = fetchFromGitHub { + rev = version; + owner = "vpenso"; + repo = pname; + sha256 = "sha256-KS9LoDuLQFq3KoKpHd8vg1jw20YCNRJNJrnBnu5vxvs="; + }; + + vendorSha256 = "sha256-A1dd9T9SIEHDCiVT2UwV6T02BSLh9ej6LC/2l54hgwI="; + doCheck = false; + + meta = with lib; { + description = "Prometheus SLURM Exporter"; + homepage = "https://github.com/vpenso/prometheus-slurm-exporter"; + platforms = platforms.linux; + }; +}