depot/third_party/nixpkgs/pkgs/servers/monitoring/telegraf/default.nix
Default email 9c6ee729d6 Project import generated by Copybara.
GitOrigin-RevId: 6cee3b5893090b0f5f0a06b4cf42ca4e60e5d222
2023-07-15 19:15:38 +02:00

48 lines
1.1 KiB
Nix

{ lib
, buildGoModule
, fetchFromGitHub
, nixosTests
, testers
, telegraf
}:
buildGoModule rec {
pname = "telegraf";
version = "1.27.2";
excludedPackages = "test";
subPackages = [ "cmd/telegraf" ];
src = fetchFromGitHub {
owner = "influxdata";
repo = "telegraf";
rev = "v${version}";
sha256 = "sha256-SkStt8PRWWkM01NrO4UTRVq84s3qlRrddl2vTxWsLME=";
};
vendorHash = "sha256-gOsVBvjPb2MLe2xOfuDldUy9ZpaBaCPxgxbZae1gyUQ=";
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 ];
};
}