depot/third_party/nixpkgs/pkgs/servers/monitoring/mtail/default.nix
Default email 7e47f3658e Project import generated by Copybara.
GitOrigin-RevId: 1925c603f17fc89f4c8f6bf6f631a802ad85d784
2024-09-26 11:04:55 +00:00

36 lines
851 B
Nix

{ lib
, stdenv
, buildGoModule
, fetchFromGitHub
}:
buildGoModule rec {
pname = "mtail";
version = "3.0.8";
src = fetchFromGitHub {
owner = "google";
repo = "mtail";
rev = "v${version}";
hash = "sha256-Rnpf0RgGltSrUPHra5LbvVmS9jftcimYM2Zc39xoxDk=";
};
vendorHash = "sha256-30V+SS+fl1qmK/0i7eB4OGI6pv232kNIMPclRyTNWww=";
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";
};
}