diff options
author | Linus Heckemann <git@sphalerite.org> | 2020-09-08 09:53:07 +0200 |
---|---|---|
committer | GitHub <noreply@github.com> | 2020-09-08 09:53:07 +0200 |
commit | ef4e81d756b044ed0d8c6cf54595664a90578511 (patch) | |
tree | 52f8219248579ccf57a3a7382c33ee287d60e571 /pkgs/servers/monitoring | |
parent | 26f8b201a174b79bf254534a1dabd72453deb9e0 (diff) | |
parent | aaf0002f68d3f8235006b813d763b9e14b3259cd (diff) |
Merge pull request #96830 from mayflower/unifi-poller
unifi-poller: add service and prometheus-exporter
Diffstat (limited to 'pkgs/servers/monitoring')
-rw-r--r-- | pkgs/servers/monitoring/unifi-poller/default.nix | 31 |
1 files changed, 31 insertions, 0 deletions
diff --git a/pkgs/servers/monitoring/unifi-poller/default.nix b/pkgs/servers/monitoring/unifi-poller/default.nix new file mode 100644 index 0000000000000..7ddc53f38e8f6 --- /dev/null +++ b/pkgs/servers/monitoring/unifi-poller/default.nix @@ -0,0 +1,31 @@ +{ stdenv, buildGoModule, fetchFromGitHub }: + +buildGoModule rec { + pname = "unifi-poller"; + version = "2.0.1"; + + src = fetchFromGitHub { + owner = "unifi-poller"; + repo = "unifi-poller"; + rev = "v${version}"; + sha256 = "16q9hrbl9qgilj3vb7865l1yx0xhm7m4sx5j1ys5vi63drq59g93"; + }; + + vendorSha256 = "1fgcbg34g0a0f85qv7bjanv2lpnnszcrspfppp2lnj9kv52j4c1w"; + + buildFlagsArray = '' + -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 + ''; + + meta = with stdenv.lib; { + description = "Collect ALL UniFi Controller, Site, Device & Client Data - Export to InfluxDB or Prometheus"; + homepage = "https://github.com/unifi-poller/unifi-poller"; + license = licenses.mit; + maintainers = with maintainers; [ elseym ]; + platforms = platforms.unix; + }; +} |