depot/third_party/nixpkgs/pkgs/servers/monitoring/unpoller/default.nix
Default email a66bca1520 Project import generated by Copybara.
GitOrigin-RevId: 40f79f003b6377bd2f4ed4027dde1f8f922995dd
2022-12-17 11:02:37 +01:00

37 lines
1.1 KiB
Nix

{ lib
, buildGoModule
, fetchFromGitHub
, nixosTests
}:
buildGoModule rec {
pname = "unpoller";
version = "2.4.1";
src = fetchFromGitHub {
owner = "unpoller";
repo = "unpoller";
rev = "v${version}";
hash = "sha256-t4f7iAIOg19n1aKG0tQy/GHNXdVAEnaRyTXMZY+1IUw=";
};
vendorHash = "sha256-GUzMu3ltdmFCKKWi9Hlr39rNe5uPnZpwQfhVAHtbeiw=";
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 ];
};
}