depot/third_party/nixpkgs/pkgs/servers/monitoring/mtail/default.nix
Default email 472aeafc57 Project import generated by Copybara.
GitOrigin-RevId: c31898adf5a8ed202ce5bea9f347b1c6871f32d1
2024-10-04 18:56:33 +02:00

36 lines
851 B
Nix

{ lib
, stdenv
, buildGoModule
, fetchFromGitHub
}:
buildGoModule rec {
pname = "mtail";
version = "3.0.9";
src = fetchFromGitHub {
owner = "google";
repo = "mtail";
rev = "v${version}";
hash = "sha256-ZyQpTxWBCU+pmulEXi/Y2PimbNMsUlbEFj8r+gTOTA0=";
};
vendorHash = "sha256-96r2UWM5HUF69BOGW6buV6juJEDYoiBPmR5iGNmI5WA=";
ldflags = [
"-X=main.Branch=main"
"-X=main.Version=${version}"
"-X=main.Revision=${src.rev}"
];
# fails on darwin with: write unixgram -> <tmpdir>/rsyncd.log: write: message too long
doCheck = !stdenv.hostPlatform.isDarwin;
meta = with lib; {
description = "Tool for extracting metrics from application logs";
homepage = "https://github.com/google/mtail";
license = licenses.asl20;
maintainers = with maintainers; [ nickcao ];
mainProgram = "mtail";
};
}