mirror of
https://github.com/NixOS/nixpkgs.git
synced 2024-12-04 21:03:15 +00:00
00a68ebfd3
Diff: https://github.com/chmouel/snazy/compare/0.52.0...0.52.1 Changelog: https://github.com/chmouel/snazy/releases/tag/0.52.1
49 lines
1.2 KiB
Nix
49 lines
1.2 KiB
Nix
{ lib
|
|
, rustPlatform
|
|
, fetchFromGitHub
|
|
, installShellFiles
|
|
}:
|
|
|
|
rustPlatform.buildRustPackage rec {
|
|
pname = "snazy";
|
|
version = "0.52.1";
|
|
|
|
src = fetchFromGitHub {
|
|
owner = "chmouel";
|
|
repo = pname;
|
|
rev = version;
|
|
hash = "sha256-OoUu42vRe4wPaunb2vJ9ITd0Q76pBI/yC8FI0J+J+ts=";
|
|
};
|
|
|
|
cargoHash = "sha256-gUeKZNSo/zJ4Nqy4Fpk5JuvFylGBlKJu+Nw9XWXVx0g=";
|
|
|
|
nativeBuildInputs = [ installShellFiles ];
|
|
|
|
postInstall = ''
|
|
installShellCompletion --cmd snazy \
|
|
--bash <($out/bin/snazy --shell-completion bash) \
|
|
--fish <($out/bin/snazy --shell-completion fish) \
|
|
--zsh <($out/bin/snazy --shell-completion zsh)
|
|
'';
|
|
|
|
doInstallCheck = true;
|
|
installCheckPhase = ''
|
|
runHook preInstallCheck
|
|
$out/bin/snazy --help
|
|
$out/bin/snazy --version | grep "snazy ${version}"
|
|
runHook postInstallCheck
|
|
'';
|
|
|
|
meta = with lib; {
|
|
description = "A snazzy json log viewer";
|
|
longDescription = ''
|
|
Snazy is a simple tool to parse json logs and output them in a nice format
|
|
with nice colors.
|
|
'';
|
|
homepage = "https://github.com/chmouel/snazy/";
|
|
changelog = "https://github.com/chmouel/snazy/releases/tag/${src.rev}";
|
|
license = licenses.asl20;
|
|
maintainers = with maintainers; [ figsoda jk ];
|
|
};
|
|
}
|