nixpkgs-suyu/pkgs/servers/monitoring/telegraf/default.nix
2020-12-05 02:28:41 +00:00

32 lines
866 B
Nix

{ lib, buildGoModule, fetchFromGitHub, nixosTests, fetchpatch }:
buildGoModule rec {
pname = "telegraf";
version = "1.16.3";
excludedPackages = "test";
subPackages = [ "cmd/telegraf" ];
src = fetchFromGitHub {
owner = "influxdata";
repo = "telegraf";
rev = "v${version}";
sha256 = "1vhxa1sdnkjy86rn2zsyf8kc3nn2fdbym3kw5zxz88mjc8iq3x0d";
};
vendorSha256 = "12rh8pggpdjgw9x23qa99cj7i67iqchacgzd11m4ficxv8a4bkyc";
buildFlagsArray = [ ''-ldflags=
-w -s -X main.version=${version}
'' ];
passthru.tests = { inherit (nixosTests) telegraf; };
meta = with lib; {
description = "The plugin-driven server agent for collecting & reporting metrics";
license = licenses.mit;
homepage = "https://www.influxdata.com/time-series-platform/telegraf/";
maintainers = with maintainers; [ mic92 roblabla foxit64 ];
};
}