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-07-31 10:19:44 +00:00
|
|
|
version = "0.6.1";
|
2024-06-20 14:57:18 +00:00
|
|
|
|
|
|
|
src = fetchFromGitHub {
|
|
|
|
owner = "shshemi";
|
|
|
|
repo = "tabiew";
|
|
|
|
rev = "v${version}";
|
2024-07-31 10:19:44 +00:00
|
|
|
hash = "sha256-WnIlGWfIoCq9jrMG9SI3zYFs6ItjrMFF6KiNYkiA9Ag=";
|
2024-06-20 14:57:18 +00:00
|
|
|
};
|
|
|
|
|
2024-07-31 10:19:44 +00:00
|
|
|
cargoHash = "sha256-lB6EaJnPoUxB+cs6rmiiOmgoOo+kzETRwKWbtsik42A=";
|
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;
|
|
|
|
};
|
|
|
|
}
|