depot/third_party/nixpkgs/pkgs/servers/monitoring/mtail/default.nix
Default email f34ce41345 Project import generated by Copybara.
GitOrigin-RevId: b73c2221a46c13557b1b3be9c2070cc42cf01eb3
2024-07-27 08:49:29 +02:00

36 lines
838 B
Nix

{ lib
, stdenv
, buildGoModule
, fetchFromGitHub
}:
buildGoModule rec {
pname = "mtail";
version = "3.0.7";
src = fetchFromGitHub {
owner = "google";
repo = "mtail";
rev = "v${version}";
hash = "sha256-Uo3Mq3NaQf/MlvvqfIfVlvQ+7YmrhKn/hb2HpEoc628=";
};
vendorHash = "sha256-FdvbwFrhvwJgqlssyqzZiBbh2HJEHAUi2s6IuBa6LC8=";
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";
};
}