9c6ee729d6
GitOrigin-RevId: 6cee3b5893090b0f5f0a06b4cf42ca4e60e5d222
37 lines
1.1 KiB
Nix
37 lines
1.1 KiB
Nix
{ lib
|
|
, buildGoModule
|
|
, fetchFromGitHub
|
|
, nixosTests
|
|
}:
|
|
|
|
buildGoModule rec {
|
|
pname = "unpoller";
|
|
version = "2.7.14";
|
|
|
|
src = fetchFromGitHub {
|
|
owner = "unpoller";
|
|
repo = "unpoller";
|
|
rev = "v${version}";
|
|
hash = "sha256-rIAqR13TKHv4i7n8s7QehFlU4C3z/Cgw8lQaKFZcCt0=";
|
|
};
|
|
|
|
vendorHash = "sha256-fPUwMQQK8D0FA/X4E0yFEIP2ZO0iwyVapYctGCKyMjk=";
|
|
|
|
ldflags = [
|
|
"-w" "-s"
|
|
"-X github.com/prometheus/common/version.Branch=master"
|
|
"-X github.com/prometheus/common/version.BuildDate=unknown"
|
|
"-X github.com/prometheus/common/version.Revision=${src.rev}"
|
|
"-X github.com/prometheus/common/version.Version=${version}-0"
|
|
];
|
|
|
|
passthru.tests = { inherit (nixosTests.prometheus-exporters) unpoller; };
|
|
|
|
meta = with lib; {
|
|
description = "Collect ALL UniFi Controller, Site, Device & Client Data - Export to InfluxDB or Prometheus";
|
|
homepage = "https://github.com/unpoller/unpoller";
|
|
changelog = "https://github.com/unpoller/unpoller/releases/tag/v${version}";
|
|
license = licenses.mit;
|
|
maintainers = with maintainers; [ Frostman ];
|
|
};
|
|
}
|