Files

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

50 lines
1.1 KiB
Nix
Raw Permalink Normal View History

2025-10-09 14:15:47 +02:00
{
stdenv,
lib,
buildGoModule,
fetchFromGitHub,
makeWrapper,
iproute2,
net-tools,
}:
buildGoModule rec {
pname = "mackerel-agent";
version = "0.85.2";
src = fetchFromGitHub {
owner = "mackerelio";
repo = "mackerel-agent";
rev = "v${version}";
sha256 = "sha256-3A3x32JytJGXebgZeJcToHXNqRB+rbyziT5Zwgc9rEM=";
};
nativeBuildInputs = [ makeWrapper ];
nativeCheckInputs = lib.optionals (!stdenv.hostPlatform.isDarwin) [ net-tools ];
buildInputs = lib.optionals (!stdenv.hostPlatform.isDarwin) [ iproute2 ];
vendorHash = "sha256-Ubk/ms/3FwH1ZqZ5uTy0MubXhrKBoeaC85Y1KKH5cIw=";
subPackages = [ "." ];
ldflags = [
"-X=main.version=${version}"
"-X=main.gitcommit=v${version}"
];
postInstall = ''
wrapProgram $out/bin/mackerel-agent \
--prefix PATH : "${lib.makeBinPath buildInputs}"
'';
doCheck = true;
meta = with lib; {
description = "System monitoring service for mackerel.io";
mainProgram = "mackerel-agent";
homepage = "https://github.com/mackerelio/mackerel-agent";
license = licenses.asl20;
maintainers = with maintainers; [ midchildan ];
};
}