1 { stdenv, lib, buildGoModule, fetchFromGitHub, makeWrapper, iproute2, nettools }:
4 pname = "mackerel-agent";
7 src = fetchFromGitHub {
11 sha256 = "sha256-ETM7OTJEdySej9wrV9sth1JCJAtfBVdsPH8ndOBV118=";
14 nativeBuildInputs = [ makeWrapper ];
15 nativeCheckInputs = lib.optionals (!stdenv.isDarwin) [ nettools ];
16 buildInputs = lib.optionals (!stdenv.isDarwin) [ iproute2 ];
18 vendorHash = "sha256-pCUHDHKNaSoIPB3fS+Jf953YMI5cXcUOLF+YP62iPMo=";
20 subPackages = [ "." ];
23 "-X=main.version=${version}"
24 "-X=main.gitcommit=v${version}"
28 wrapProgram $out/bin/mackerel-agent \
29 --prefix PATH : "${lib.makeBinPath buildInputs}"
35 description = "System monitoring service for mackerel.io";
36 mainProgram = "mackerel-agent";
37 homepage = "https://github.com/mackerelio/mackerel-agent";
38 license = licenses.asl20;
39 maintainers = with maintainers; [ midchildan ];