depot/pkgs/servers/monitoring/prometheus/apcupsd-exporter.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

25 lines
770 B
Nix

{ lib, buildGoModule, fetchFromGitHub, nixosTests }:
buildGoModule rec {
pname = "apcupsd-exporter";
version = "0.3.0";
src = fetchFromGitHub {
owner = "mdlayher";
repo = "apcupsd_exporter";
rev = "v${version}";
sha256 = "sha256-c0LsUqpJbmWQmbmSGdEy7Bbk20my6iWNLeqtU5BjYlw=";
};
vendorHash = "sha256-bvLwHLviIAGmxYY1O0wFDWAMginEUklicrbjIbbPuUw=";
passthru.tests = { inherit (nixosTests.prometheus-exporters) apcupsd; };
meta = with lib; {
description = "Provides a Prometheus exporter for the apcupsd Network Information Server (NIS)";
mainProgram = "apcupsd_exporter";
homepage = "https://github.com/mdlayher/apcupsd_exporter";
license = licenses.mit;
maintainers = with maintainers; [ _1000101 mdlayher ];
};
}