nixpkgs/pkgs/servers/monitoring/unpoller/default.nix

Ignoring revisions in .git-blame-ignore-revs. Click here to bypass and see the normal blame view.

38 lines
1.1 KiB
Nix
Raw Normal View History

2022-11-20 19:41:36 +00:00
{ lib
, buildGoModule
, fetchFromGitHub
2022-12-05 20:21:33 +00:00
, nixosTests
2022-11-20 19:41:36 +00:00
}:
2020-08-12 11:14:45 +00:00
buildGoModule rec {
2022-11-24 15:29:36 +00:00
pname = "unpoller";
2022-12-12 21:17:17 +00:00
version = "2.4.1";
2020-08-12 11:14:45 +00:00
src = fetchFromGitHub {
2022-11-24 15:29:36 +00:00
owner = "unpoller";
repo = "unpoller";
2020-08-12 11:14:45 +00:00
rev = "v${version}";
2022-12-12 21:17:17 +00:00
hash = "sha256-t4f7iAIOg19n1aKG0tQy/GHNXdVAEnaRyTXMZY+1IUw=";
2020-08-12 11:14:45 +00:00
};
2022-12-09 05:05:00 +00:00
vendorHash = "sha256-GUzMu3ltdmFCKKWi9Hlr39rNe5uPnZpwQfhVAHtbeiw=";
2020-08-12 11:14:45 +00:00
2021-08-26 06:45:51 +00:00
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"
];
2020-08-12 11:14:45 +00:00
2022-12-05 20:21:33 +00:00
passthru.tests = { inherit (nixosTests.prometheus-exporters) unpoller; };
meta = with lib; {
2020-08-12 11:14:45 +00:00
description = "Collect ALL UniFi Controller, Site, Device & Client Data - Export to InfluxDB or Prometheus";
2022-11-24 15:29:36 +00:00
homepage = "https://github.com/unpoller/unpoller";
2022-11-20 19:41:36 +00:00
changelog = "https://github.com/unpoller/unpoller/releases/tag/v${version}";
2020-08-12 11:14:45 +00:00
license = licenses.mit;
2022-12-05 18:47:13 +00:00
maintainers = with maintainers; [ Frostman ];
2020-08-12 11:14:45 +00:00
};
}