{ lib, buildGoModule, fetchFromGitHub, nixosTests }: buildGoModule rec { pname = "telegraf"; version = "1.22.4"; excludedPackages = "test"; subPackages = [ "cmd/telegraf" ]; src = fetchFromGitHub { owner = "influxdata"; repo = "telegraf"; rev = "v${version}"; sha256 = "sha256-Cftxm+Lb3ekK8YZrklD/C+p0EpyEVU/xxVI5oiNgBxk="; }; vendorSha256 = "sha256-VyNPIYRMAC51zp38BKoM5/bLbfwULtFEtRC3LQjVJK4="; proxyVendor = true; ldflags = [ "-w" "-s" "-X main.version=${version}" ]; passthru.tests = { inherit (nixosTests) telegraf; }; meta = with lib; { description = "The plugin-driven server agent for collecting & reporting metrics"; license = licenses.mit; homepage = "https://www.influxdata.com/time-series-platform/telegraf/"; maintainers = with maintainers; [ mic92 roblabla timstott ]; }; }