2024-06-24 18:47:55 +00:00
|
|
|
{ lib
|
|
|
|
, fetchFromGitHub
|
|
|
|
, rustPlatform
|
|
|
|
, installShellFiles
|
|
|
|
}:
|
2024-06-20 14:57:18 +00:00
|
|
|
rustPlatform.buildRustPackage rec {
|
|
|
|
pname = "tabiew";
|
2024-09-19 14:19:46 +00:00
|
|
|
version = "0.6.2";
|
2024-06-20 14:57:18 +00:00
|
|
|
|
|
|
|
src = fetchFromGitHub {
|
|
|
|
owner = "shshemi";
|
|
|
|
repo = "tabiew";
|
|
|
|
rev = "v${version}";
|
2024-09-19 14:19:46 +00:00
|
|
|
hash = "sha256-3f+l1gmJYl/7aTkZGxmCur9khDNSoUNjDGAHhe6T13U=";
|
2024-06-20 14:57:18 +00:00
|
|
|
};
|
|
|
|
|
2024-09-19 14:19:46 +00:00
|
|
|
cargoHash = "sha256-FT98jzx/NQ1AWtGGLY63izKzGyjHnJNMuuQREqw+qnw=";
|
2024-06-20 14:57:18 +00:00
|
|
|
|
|
|
|
nativeBuildInputs = [ installShellFiles ];
|
|
|
|
|
|
|
|
outputs = [ "out" "man" ];
|
|
|
|
|
|
|
|
postInstall = ''
|
|
|
|
installManPage target/manual/tabiew.1
|
|
|
|
|
|
|
|
installShellCompletion \
|
|
|
|
--bash target/completion/tw.bash \
|
|
|
|
--zsh target/completion/_tw \
|
|
|
|
--fish target/completion/tw.fish
|
|
|
|
'';
|
|
|
|
|
|
|
|
doCheck = false; # there are no tests
|
|
|
|
|
|
|
|
meta = {
|
|
|
|
description =
|
|
|
|
"Lightweight, terminal-based application to view and query delimiter separated value formatted documents, such as CSV and TSV files";
|
|
|
|
homepage = "https://github.com/shshemi/tabiew";
|
|
|
|
changelog = "https://github.com/shshemi/tabiew/releases/tag/v${version}";
|
|
|
|
license = lib.licenses.mit;
|
|
|
|
mainProgram = "tw";
|
|
|
|
maintainers = with lib.maintainers; [ anas ];
|
|
|
|
platforms = with lib.platforms; unix ++ windows;
|
|
|
|
};
|
|
|
|
}
|