2021-01-25 08:26:54 +00:00
|
|
|
{ rustPlatform, fetchFromGitHub, lib, installShellFiles }:
|
2019-11-03 20:51:01 +00:00
|
|
|
|
|
|
|
rustPlatform.buildRustPackage rec {
|
2020-06-16 04:06:09 +00:00
|
|
|
pname = "tre-command";
|
2022-06-19 21:37:33 +00:00
|
|
|
version = "0.4.0";
|
2019-11-03 20:51:01 +00:00
|
|
|
|
|
|
|
src = fetchFromGitHub {
|
|
|
|
owner = "dduan";
|
|
|
|
repo = "tre";
|
|
|
|
rev = "v${version}";
|
2022-06-19 21:37:33 +00:00
|
|
|
sha256 = "sha256-JlkONhXMWLzxAf3SYoLkSvXw4bFYBnsCyyj0TUsezwg=";
|
2019-11-03 20:51:01 +00:00
|
|
|
};
|
|
|
|
|
2022-06-19 21:37:33 +00:00
|
|
|
cargoSha256 = "sha256-b3fScJMG/CIkMrahbELLQp1otmT5En+p8kQsip05SOc=";
|
2020-08-08 23:11:36 +00:00
|
|
|
|
|
|
|
nativeBuildInputs = [ installShellFiles ];
|
|
|
|
|
|
|
|
preFixup = ''
|
|
|
|
installManPage manual/tre.1
|
2022-06-19 21:37:33 +00:00
|
|
|
installShellCompletion scripts/completion/tre.{bash,fish}
|
|
|
|
installShellCompletion --zsh scripts/completion/_tre
|
2020-08-08 23:11:36 +00:00
|
|
|
'';
|
2019-11-03 20:51:01 +00:00
|
|
|
|
2022-06-19 21:37:33 +00:00
|
|
|
# this test requires package to be in a git repo to succeed
|
2022-10-03 13:56:51 +00:00
|
|
|
checkFlags = [ "--skip" "respect_git_ignore" ];
|
2022-06-19 21:37:33 +00:00
|
|
|
|
2021-01-11 07:54:33 +00:00
|
|
|
meta = with lib; {
|
2019-11-03 20:51:01 +00:00
|
|
|
description = "Tree command, improved";
|
|
|
|
homepage = "https://github.com/dduan/tre";
|
|
|
|
license = licenses.mit;
|
|
|
|
maintainers = [ maintainers.dduan ];
|
2022-04-01 19:34:55 +00:00
|
|
|
mainProgram = "tre";
|
2019-11-03 20:51:01 +00:00
|
|
|
};
|
|
|
|
}
|