2021-01-25 08:26:54 +00:00
|
|
|
{ lib, buildGoModule, fetchFromGitHub, nixosTests }:
|
2019-09-20 09:34:00 +01:00
|
|
|
|
2020-06-08 15:06:07 +01:00
|
|
|
buildGoModule rec {
|
2019-09-20 09:34:00 +01:00
|
|
|
pname = "apcupsd-exporter";
|
2020-06-08 15:06:07 +01:00
|
|
|
version = "0.2.0";
|
2019-09-20 09:34:00 +01:00
|
|
|
|
|
|
|
src = fetchFromGitHub {
|
|
|
|
owner = "mdlayher";
|
|
|
|
repo = "apcupsd_exporter";
|
2020-06-08 15:06:07 +01:00
|
|
|
rev = "v${version}";
|
|
|
|
sha256 = "0gjj23qdjs7rqimq95rbfw43m4l6g73j840svxjlmpd1vzzz2v2q";
|
2019-09-20 09:34:00 +01:00
|
|
|
};
|
|
|
|
|
2020-06-08 15:06:07 +01:00
|
|
|
vendorSha256 = "09x8y8pmgfn897hvnk122ry460y12b8a7y5fafri5wn9vxab9r82";
|
2019-09-20 09:34:00 +01:00
|
|
|
|
2020-08-04 01:26:27 +01:00
|
|
|
doCheck = false;
|
|
|
|
|
2020-06-18 11:48:40 +01:00
|
|
|
passthru.tests = { inherit (nixosTests.prometheus-exporters) apcupsd; };
|
|
|
|
|
2021-01-11 07:54:33 +00:00
|
|
|
meta = with lib; {
|
2019-09-20 09:34:00 +01: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 11:57:20 +01:00
|
|
|
maintainers = with maintainers; [ _1000101 mdlayher ];
|
2019-09-20 09:34:00 +01:00
|
|
|
};
|
|
|
|
}
|