9c6ee729d6
GitOrigin-RevId: 6cee3b5893090b0f5f0a06b4cf42ca4e60e5d222
48 lines
1.1 KiB
Nix
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 ];
|
|
};
|
|
}
|