Files

Ignoring revisions in .git-blame-ignore-revs. Click here to bypass and see the normal blame view.

57 lines
1.2 KiB
Nix
Raw Permalink Normal View History

2025-10-09 14:15:47 +02:00
{
lib,
buildGoModule,
fetchFromGitHub,
nixosTests,
stdenv,
testers,
telegraf,
}:
buildGoModule rec {
pname = "telegraf";
version = "1.36.2";
subPackages = [ "cmd/telegraf" ];
src = fetchFromGitHub {
owner = "influxdata";
repo = "telegraf";
rev = "v${version}";
hash = "sha256-nIYAGsGYZUK5o1KqcH4bI3wPRRXCynN6N5T6f2oy2bo=";
};
vendorHash = "sha256-k4hI/qIQgV1qChOWDCqWcMboaVoDe3k/DP/wNa0Aqg4=";
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.hostPlatform.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
];
};
}