2021-01-25 08:26:54 +00:00
|
|
|
{ lib, buildGoModule, fetchFromGitHub, nixosTests }:
|
2019-09-20 08:34:00 +00:00
|
|
|
|
2020-06-08 14:06:07 +00:00
|
|
|
buildGoModule rec {
|
2019-09-20 08:34:00 +00:00
|
|
|
pname = "apcupsd-exporter";
|
2020-06-08 14:06:07 +00:00
|
|
|
version = "0.2.0";
|
2019-09-20 08:34:00 +00:00
|
|
|
|
|
|
|
src = fetchFromGitHub {
|
|
|
|
owner = "mdlayher";
|
|
|
|
repo = "apcupsd_exporter";
|
2020-06-08 14:06:07 +00:00
|
|
|
rev = "v${version}";
|
|
|
|
sha256 = "0gjj23qdjs7rqimq95rbfw43m4l6g73j840svxjlmpd1vzzz2v2q";
|
2019-09-20 08:34:00 +00:00
|
|
|
};
|
|
|
|
|
2020-06-08 14:06:07 +00:00
|
|
|
vendorSha256 = "09x8y8pmgfn897hvnk122ry460y12b8a7y5fafri5wn9vxab9r82";
|
2019-09-20 08:34:00 +00:00
|
|
|
|
2020-08-04 00:26:27 +00:00
|
|
|
doCheck = false;
|
|
|
|
|
2020-06-18 10:48:40 +00:00
|
|
|
passthru.tests = { inherit (nixosTests.prometheus-exporters) apcupsd; };
|
|
|
|
|
2021-01-11 07:54:33 +00:00
|
|
|
meta = with lib; {
|
2019-09-20 08:34:00 +00:00
|
|
|
description = "Provides a Prometheus exporter for the apcupsd Network Information Server (NIS)";
|
|
|
|
homepage = "https://github.com/mdlayher/apcupsd_exporter";
|
|
|
|
license = licenses.mit;
|
2020-07-29 10:57:20 +00:00
|
|
|
maintainers = with maintainers; [ _1000101 mdlayher ];
|
2019-09-20 08:34:00 +00:00
|
|
|
};
|
|
|
|
}
|