c7e6337bd0
GitOrigin-RevId: 08e4dc3a907a6dfec8bb3bbf1540d8abbffea22b
40 lines
1 KiB
Nix
40 lines
1 KiB
Nix
{ stdenv, lib, buildGoModule, fetchFromGitHub, makeWrapper, iproute2, nettools }:
|
|
|
|
buildGoModule rec {
|
|
pname = "mackerel-agent";
|
|
version = "0.75.2";
|
|
|
|
src = fetchFromGitHub {
|
|
owner = "mackerelio";
|
|
repo = pname;
|
|
rev = "v${version}";
|
|
sha256 = "sha256-xRujItV8xgIiQZktcEeq+hCDaD7HaHFEOsbtzmWfLQQ=";
|
|
};
|
|
|
|
nativeBuildInputs = [ makeWrapper ];
|
|
nativeCheckInputs = lib.optionals (!stdenv.isDarwin) [ nettools ];
|
|
buildInputs = lib.optionals (!stdenv.isDarwin) [ iproute2 ];
|
|
|
|
vendorHash = "sha256-Ow1Ho6+VMvb0hKsAAd8nieFyVqDDX2prHDIkTuy1je8=";
|
|
|
|
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";
|
|
homepage = "https://github.com/mackerelio/mackerel-agent";
|
|
license = licenses.asl20;
|
|
maintainers = with maintainers; [ midchildan ];
|
|
};
|
|
}
|