summary refs log tree commit diff
path: root/pkgs/servers/monitoring/prometheus/apcupsd-exporter.nix
blob: 648bb59b0d2dd7a9b63b463023bf662f452051f9 (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
{ lib, stdenv, buildGoModule, fetchFromGitHub, nixosTests }:

buildGoModule rec {
  pname = "apcupsd-exporter";
  version = "0.2.0";

  src = fetchFromGitHub {
    owner = "mdlayher";
    repo = "apcupsd_exporter";
    rev = "v${version}";
    sha256 = "0gjj23qdjs7rqimq95rbfw43m4l6g73j840svxjlmpd1vzzz2v2q";
  };

  vendorSha256 = "09x8y8pmgfn897hvnk122ry460y12b8a7y5fafri5wn9vxab9r82";

  doCheck = false;

  passthru.tests = { inherit (nixosTests.prometheus-exporters) apcupsd; };

  meta = with lib; {
    description = "Provides a Prometheus exporter for the apcupsd Network Information Server (NIS)";
    homepage = "https://github.com/mdlayher/apcupsd_exporter";
    license = licenses.mit;
    maintainers = with maintainers; [ _1000101 mdlayher ];
  };
}