hl-log-viewer: init at 0.30.3 (#375147)
This commit is contained in:
@@ -18845,6 +18845,11 @@
|
||||
githubId = 939420;
|
||||
name = "Petros Angelatos";
|
||||
};
|
||||
petrzjunior = {
|
||||
github = "petrzjunior";
|
||||
githubId = 7000918;
|
||||
name = "Petr Zahradnik";
|
||||
};
|
||||
petterstorvik = {
|
||||
email = "petterstorvik@gmail.com";
|
||||
github = "storvik";
|
||||
|
||||
@@ -0,0 +1,51 @@
|
||||
{
|
||||
lib,
|
||||
rustPlatform,
|
||||
installShellFiles,
|
||||
fetchFromGitHub,
|
||||
nix-update-script,
|
||||
versionCheckHook,
|
||||
}:
|
||||
rustPlatform.buildRustPackage (finalAttrs: {
|
||||
pname = "hl-log-viewer";
|
||||
version = "0.30.3";
|
||||
|
||||
src = fetchFromGitHub {
|
||||
owner = "pamburus";
|
||||
repo = "hl";
|
||||
tag = "v${finalAttrs.version}";
|
||||
hash = "sha256-18FzXUvpMHu3EfECgcslhReinMM6Oa1qdTKbbqFiv1w=";
|
||||
};
|
||||
|
||||
cargoHash = "sha256-qx3NxWgCsCurU+TObQIvn1Xyn5IRP/iNem3s201MD4A=";
|
||||
useFetchCargoVendor = true;
|
||||
|
||||
nativeBuildInputs = [ installShellFiles ];
|
||||
|
||||
postInstall = ''
|
||||
installShellCompletion --cmd hl \
|
||||
--bash <($out/bin/hl --shell-completions bash) \
|
||||
--fish <($out/bin/hl --shell-completions fish) \
|
||||
--zsh <($out/bin/hl --shell-completions zsh)
|
||||
$out/bin/hl --man-page >hl.1
|
||||
installManPage hl.1
|
||||
'';
|
||||
|
||||
doInstallCheck = true;
|
||||
nativeInstallCheckInputs = [
|
||||
versionCheckHook
|
||||
];
|
||||
versionCheckProgram = "${placeholder "out"}/bin/hl";
|
||||
versionCheckProgramArg = "--version";
|
||||
|
||||
passthru.updateScript = nix-update-script { };
|
||||
|
||||
meta = {
|
||||
description = "JSON and logfmt log converter to human readable representation";
|
||||
homepage = "https://github.com/pamburus/hl";
|
||||
changelog = "https://github.com/pamburus/hl/releases/tag/v${finalAttrs.version}";
|
||||
license = lib.licenses.mit;
|
||||
mainProgram = "hl";
|
||||
maintainers = with lib.maintainers; [ petrzjunior ];
|
||||
};
|
||||
})
|
||||
Reference in New Issue
Block a user