depot/third_party/nixpkgs/pkgs/servers/monitoring/telegraf/default.nix
Default email bcb2f287e1 Project import generated by Copybara.
GitOrigin-RevId: d603719ec6e294f034936c0d0dc06f689d91b6c3
2024-06-20 20:27:18 +05:30

49 lines
1.2 KiB
Nix

{ lib
, buildGoModule
, fetchFromGitHub
, nixosTests
, stdenv
, testers
, telegraf
}:
buildGoModule rec {
pname = "telegraf";
version = "1.31.0";
subPackages = [ "cmd/telegraf" ];
src = fetchFromGitHub {
owner = "influxdata";
repo = "telegraf";
rev = "v${version}";
hash = "sha256-bnto39X/Mn8M5YbdM8JSoEPGCb5+UpHS6FPc5Q0kprE=";
};
vendorHash = "sha256-uyZZnEdAfkCYtgyjgPTLt463kcfdNczOruHaVmA+VIk=";
proxyVendor = true;
ldflags = [
"-s"
"-w"
"-X=github.com/influxdata/telegraf/internal.Commit=${src.rev}"
"-X=github.com/influxdata/telegraf/internal.Version=${version}"
];
passthru.tests = {
version = testers.testVersion {
package = telegraf;
};
} // lib.optionalAttrs stdenv.isLinux {
inherit (nixosTests) telegraf;
};
meta = with lib; {
description = "Plugin-driven server agent for collecting & reporting metrics";
mainProgram = "telegraf";
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 ];
};
}