2020-08-15 07:32:02 +02:00
|
|
|
{ lib, buildGoModule, fetchFromGitHub, nixosTests, fetchpatch }:
|
2016-09-08 15:30:20 +02:00
|
|
|
|
2020-03-27 08:18:52 +01:00
|
|
|
buildGoModule rec {
|
2019-08-15 14:41:18 +02:00
|
|
|
pname = "telegraf";
|
2020-08-11 17:11:29 +02:00
|
|
|
version = "1.15.2";
|
2016-09-08 15:30:20 +02:00
|
|
|
|
|
|
|
excludedPackages = "test";
|
|
|
|
|
2019-01-21 12:28:32 +01:00
|
|
|
subPackages = [ "cmd/telegraf" ];
|
|
|
|
|
2016-09-08 15:30:20 +02:00
|
|
|
src = fetchFromGitHub {
|
|
|
|
owner = "influxdata";
|
|
|
|
repo = "telegraf";
|
2020-03-27 08:18:52 +01:00
|
|
|
rev = "v${version}";
|
2020-08-11 17:11:29 +02:00
|
|
|
sha256 = "045wjpq29dr0s48ns3a4p8pw1j0ssfcw6m91iim4pkrppj7bm2di";
|
2016-09-08 15:30:20 +02:00
|
|
|
};
|
|
|
|
|
2020-08-15 07:32:02 +02:00
|
|
|
patches = [
|
|
|
|
# https://github.com/influxdata/telegraf/pull/7988
|
|
|
|
# fix broken cgo vendoring
|
|
|
|
(fetchpatch {
|
|
|
|
url = "https://github.com/influxdata/telegraf/commit/63e1f41d8ff246d191d008ff7f69d69cc34b4fae.patch";
|
|
|
|
sha256 = "0ikifc4414bid3g6hhxz18cw71z63s5g805klx98vrndjlpbqkzw";
|
|
|
|
})
|
|
|
|
];
|
2020-03-27 08:18:52 +01:00
|
|
|
|
2020-08-15 07:32:02 +02:00
|
|
|
vendorSha256 = "0f95xigpkindd7dmci8kqpqq5dlirimbqh8ai73142asbrd5h4yr";
|
2020-08-04 02:26:27 +02:00
|
|
|
|
2017-10-01 11:19:39 +02:00
|
|
|
buildFlagsArray = [ ''-ldflags=
|
2019-09-18 04:16:09 +02:00
|
|
|
-w -s -X main.version=${version}
|
2017-10-01 11:19:39 +02:00
|
|
|
'' ];
|
|
|
|
|
2020-01-28 15:08:38 +01:00
|
|
|
passthru.tests = { inherit (nixosTests) telegraf; };
|
|
|
|
|
2016-09-08 15:30:20 +02:00
|
|
|
meta = with lib; {
|
|
|
|
description = "The plugin-driven server agent for collecting & reporting metrics.";
|
|
|
|
license = licenses.mit;
|
2020-03-27 08:18:52 +01:00
|
|
|
homepage = "https://www.influxdata.com/time-series-platform/telegraf/";
|
2020-01-27 12:51:45 +01:00
|
|
|
maintainers = with maintainers; [ mic92 roblabla foxit64 ];
|
2016-09-08 15:30:20 +02:00
|
|
|
};
|
2020-07-31 05:58:04 +02:00
|
|
|
}
|