nixos-config/pkgs/prometheus-fritzbox-exporter/default.nix

29 lines
844 B
Nix

{ lib, stdenv, buildGoModule, fetchFromGitHub, nixosTests }:
buildGoModule rec {
pname = "fritzbox-exporter";
version = "unstable-2021-03-03";
rev = "6d66f6b8e47878c61feb710e36306fe714350658";
src = fetchFromGitHub {
inherit rev;
owner = "mxschmitt";
repo = "fritzbox_exporter";
sha256 = "0n9fwslcwgfghscrwbz7p3zamb474zk425ijkkh6cixpnc7p3vi6";
};
subPackages = [ "cmd/exporter" ];
vendorSha256 = "0k6bd052pjfg5c1ba1yhni8msv3wl512vfzy2hrk49jibh8h052n";
passthru.tests = { inherit (nixosTests.prometheus-exporters) fritzbox; };
meta = with lib; {
description = "Prometheus Exporter for FRITZ!Box (TR64 and UPnP)";
homepage = "https://github.com/mxschmitt/fritzbox_exporter";
license = licenses.asl20;
maintainers = with maintainers; [ bachp flokli ];
platforms = platforms.unix;
};
}