depot/third_party/nixpkgs/pkgs/servers/monitoring/telegraf/default.nix

34 lines
858 B
Nix
Raw Normal View History

{ lib, buildGoModule, fetchFromGitHub, nixosTests }:
buildGoModule rec {
pname = "telegraf";
version = "1.24.2";
excludedPackages = "test";
subPackages = [ "cmd/telegraf" ];
src = fetchFromGitHub {
owner = "influxdata";
repo = "telegraf";
rev = "v${version}";
sha256 = "sha256-2DUP3g7k0DLXlmhCZH0IUgWpYbdUnRjtsc7uEioYzrE=";
};
vendorSha256 = "sha256-RsNsjDUAqNtNDqCC+UjKTw4ue4Yd0A7k8tU+wYiQIbc=";
proxyVendor = true;
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 timstott ];
};
}