2021-02-22 21:28:39 +00:00
|
|
|
{ lib, buildGoModule, fetchFromGitHub, nixosTests }:
|
2020-04-24 23:36:52 +00:00
|
|
|
|
|
|
|
buildGoModule rec {
|
|
|
|
pname = "telegraf";
|
2021-07-14 22:03:04 +00:00
|
|
|
version = "1.19.1";
|
2020-04-24 23:36:52 +00:00
|
|
|
|
|
|
|
excludedPackages = "test";
|
|
|
|
|
|
|
|
subPackages = [ "cmd/telegraf" ];
|
|
|
|
|
|
|
|
src = fetchFromGitHub {
|
|
|
|
owner = "influxdata";
|
|
|
|
repo = "telegraf";
|
|
|
|
rev = "v${version}";
|
2021-07-14 22:03:04 +00:00
|
|
|
sha256 = "sha256-8shyNKwSg3pUxfQsIHBNnIaks/86vHuHN/SroDE3QFU=";
|
2020-04-24 23:36:52 +00:00
|
|
|
};
|
|
|
|
|
2021-07-14 22:03:04 +00:00
|
|
|
vendorSha256 = "sha256-jP6P2NShzlFCptCQ04XY4cIrONNArwthiEONEo32Btw=";
|
2020-04-24 23:36:52 +00:00
|
|
|
|
2021-02-22 21:28:39 +00:00
|
|
|
preBuild = ''
|
|
|
|
buildFlagsArray+=("-ldflags=-w -s -X main.version=${version}")
|
|
|
|
'';
|
2020-04-24 23:36:52 +00:00
|
|
|
|
|
|
|
passthru.tests = { inherit (nixosTests) telegraf; };
|
|
|
|
|
|
|
|
meta = with lib; {
|
2020-10-19 00:13:06 +00:00
|
|
|
description = "The plugin-driven server agent for collecting & reporting metrics";
|
2020-04-24 23:36:52 +00:00
|
|
|
license = licenses.mit;
|
|
|
|
homepage = "https://www.influxdata.com/time-series-platform/telegraf/";
|
2021-07-16 19:40:57 +00:00
|
|
|
maintainers = with maintainers; [ mic92 roblabla timstott ];
|
2020-04-24 23:36:52 +00:00
|
|
|
};
|
2020-08-20 17:08:02 +00:00
|
|
|
}
|