depot/third_party/nixpkgs/pkgs/servers/monitoring/telegraf/default.nix
Default email 0eaa97ffad Project import generated by Copybara.
GitOrigin-RevId: c59ea8b8a0e7f927e7291c14ea6cd1bd3a16ff38
2020-08-20 19:08:02 +02:00

41 lines
1.1 KiB
Nix

{ lib, buildGoModule, fetchFromGitHub, nixosTests, fetchpatch }:
buildGoModule rec {
pname = "telegraf";
version = "1.15.2";
excludedPackages = "test";
subPackages = [ "cmd/telegraf" ];
src = fetchFromGitHub {
owner = "influxdata";
repo = "telegraf";
rev = "v${version}";
sha256 = "045wjpq29dr0s48ns3a4p8pw1j0ssfcw6m91iim4pkrppj7bm2di";
};
patches = [
# https://github.com/influxdata/telegraf/pull/7988
# fix broken cgo vendoring
(fetchpatch {
url = "https://github.com/influxdata/telegraf/commit/63e1f41d8ff246d191d008ff7f69d69cc34b4fae.patch";
sha256 = "0ikifc4414bid3g6hhxz18cw71z63s5g805klx98vrndjlpbqkzw";
})
];
vendorSha256 = "0f95xigpkindd7dmci8kqpqq5dlirimbqh8ai73142asbrd5h4yr";
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 ];
};
}