summary refs log tree commit diff
path: root/pkgs/servers/monitoring/prometheus/apcupsd-exporter.nix
blob: c2f903228503524605d58e32a401e34c8d2eb48e (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
{ 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=";
  };

  vendorSha256 = "sha256-bvLwHLviIAGmxYY1O0wFDWAMginEUklicrbjIbbPuUw=";

  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 ];
  };
}