depot/third_party/nixpkgs/pkgs/servers/monitoring/telegraf/default.nix
Default email 2c76a4cb41 Project import generated by Copybara.
GitOrigin-RevId: c757e9bd77b16ca2e03c89bf8bc9ecb28e0c06ad
2023-11-16 04:20:00 +00:00

46 lines
1.1 KiB
Nix

{ lib
, buildGoModule
, fetchFromGitHub
, nixosTests
, testers
, telegraf
}:
buildGoModule rec {
pname = "telegraf";
version = "1.28.5";
subPackages = [ "cmd/telegraf" ];
src = fetchFromGitHub {
owner = "influxdata";
repo = "telegraf";
rev = "v${version}";
hash = "sha256-dmePzJ10VgzN6CxFAz7QloIsPULuTZH+Pjkd/kIQUmU=";
};
vendorHash = "sha256-3buC6N/tHTf6FMEXU3+XlJVGntLe86Hx3eNpn7w0yMs=";
proxyVendor = true;
ldflags = [
"-s"
"-w"
"-X=github.com/influxdata/telegraf/internal.Commit=${src.rev}"
"-X=github.com/influxdata/telegraf/internal.Version=${version}"
];
passthru.tests = {
inherit (nixosTests) telegraf;
version = testers.testVersion {
package = telegraf;
};
};
meta = with lib; {
description = "The plugin-driven server agent for collecting & reporting metrics";
homepage = "https://www.influxdata.com/time-series-platform/telegraf/";
changelog = "https://github.com/influxdata/telegraf/blob/${src.rev}/CHANGELOG.md";
license = licenses.mit;
maintainers = with maintainers; [ mic92 roblabla timstott zowoq ];
};
}