ff1a94e523
The nixpkgs-unstable channel's programs.sqlite was used to identify packages producing exactly one binary, and these automatically added to their package definitions wherever possible.
47 lines
1.1 KiB
Nix
47 lines
1.1 KiB
Nix
{ lib
|
|
, buildGoModule
|
|
, fetchFromGitHub
|
|
, nixosTests
|
|
, testers
|
|
, telegraf
|
|
}:
|
|
|
|
buildGoModule rec {
|
|
pname = "telegraf";
|
|
version = "1.30.0";
|
|
|
|
subPackages = [ "cmd/telegraf" ];
|
|
|
|
src = fetchFromGitHub {
|
|
owner = "influxdata";
|
|
repo = "telegraf";
|
|
rev = "v${version}";
|
|
hash = "sha256-+dQMQsieer0/BfvAKnT35bjNjPjC0Z1houUqFBVIWDE=";
|
|
};
|
|
|
|
vendorHash = "sha256-6RfhSrb9mTt2IzEv3zzj26gChz7XKV5uazfwanNe7Pc=";
|
|
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";
|
|
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 ];
|
|
};
|
|
}
|