Some checks failed
Periodic Merges (6h) / master → staging-nixos (push) Failing after 12m50s
Periodic Merges (6h) / master → staging-next (push) Failing after 12m54s
Periodic Merges (24h) / merge-base(master,staging) → haskell-updates (push) Failing after 11m54s
Periodic Merges (6h) / staging-next → staging (push) Failing after 12m13s
Periodic Merges (24h) / staging-next-25.05 → staging-25.05 (push) Failing after 13m24s
Periodic Merges (24h) / release-25.05 → staging-next-25.05 (push) Failing after 14m28s
52 lines
1.0 KiB
Nix
52 lines
1.0 KiB
Nix
{
|
|
lib,
|
|
stdenv,
|
|
buildGoModule,
|
|
fetchFromGitHub,
|
|
gotools,
|
|
}:
|
|
|
|
buildGoModule rec {
|
|
pname = "mtail";
|
|
version = "3.2.18";
|
|
|
|
src = fetchFromGitHub {
|
|
owner = "jaqx0r";
|
|
repo = "mtail";
|
|
rev = "v${version}";
|
|
hash = "sha256-Z3FPZNWGyXtY2KLRF/oJIuN+lXE14SQce72pTKBsZEk=";
|
|
};
|
|
|
|
vendorHash = "sha256-SMdEowzg53uori/Ge+GE4542wswBU2kgdyAXxeKQiiU=";
|
|
|
|
nativeBuildInputs = [
|
|
gotools # goyacc
|
|
];
|
|
|
|
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;
|
|
|
|
checkFlags = [
|
|
# can only be executed under bazel
|
|
"-skip=TestExecMtail"
|
|
];
|
|
|
|
preBuild = ''
|
|
GOOS= GOARCH= go generate ./...
|
|
'';
|
|
|
|
meta = {
|
|
description = "Tool for extracting metrics from application logs";
|
|
homepage = "https://github.com/jaqx0r/mtail";
|
|
license = lib.licenses.asl20;
|
|
maintainers = with lib.maintainers; [ nickcao ];
|
|
mainProgram = "mtail";
|
|
};
|
|
}
|