5c370c0b2a
GitOrigin-RevId: 33d1e753c82ffc557b4a585c77de43d4c922ebb5
36 lines
838 B
Nix
36 lines
838 B
Nix
{ lib
|
|
, stdenv
|
|
, buildGoModule
|
|
, fetchFromGitHub
|
|
}:
|
|
|
|
buildGoModule rec {
|
|
pname = "mtail";
|
|
version = "3.0.1";
|
|
|
|
src = fetchFromGitHub {
|
|
owner = "google";
|
|
repo = "mtail";
|
|
rev = "v${version}";
|
|
hash = "sha256-HXnudY9GUCjFL4JvdNYGZ1fPeaPZjt63jrZfUfOWjEc=";
|
|
};
|
|
|
|
vendorHash = "sha256-XKELlrsyumv3EbNdepLRgX7kPWxzo2ZdKrOwiM0myf8=";
|
|
|
|
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.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";
|
|
};
|
|
}
|