2023-05-28 13:01:39 +00:00
|
|
|
{ lib
|
|
|
|
, rustPlatform
|
|
|
|
, fetchFromGitHub
|
|
|
|
, installShellFiles
|
|
|
|
}:
|
|
|
|
|
|
|
|
rustPlatform.buildRustPackage rec {
|
|
|
|
pname = "charasay";
|
2023-12-29 08:52:03 +00:00
|
|
|
version = "3.2.0";
|
2023-05-28 13:01:39 +00:00
|
|
|
|
|
|
|
src = fetchFromGitHub {
|
|
|
|
owner = "latipun7";
|
|
|
|
repo = pname;
|
|
|
|
rev = "v${version}";
|
2023-12-29 08:52:03 +00:00
|
|
|
hash = "sha256-7z5+7yrx5X5rdBMNj9oWBZ2IX0s88c1SLhgz2IDDEn8=";
|
2023-05-28 13:01:39 +00:00
|
|
|
};
|
|
|
|
|
2023-12-29 08:52:03 +00:00
|
|
|
cargoHash = "sha256-5htNU8l+amh+C8EL1K4UcXzf5Pbhhjd5RhxrucJoj/M=";
|
2023-05-28 13:01:39 +00:00
|
|
|
|
|
|
|
nativeBuildInputs = [ installShellFiles ];
|
|
|
|
|
|
|
|
postPatch = ''
|
|
|
|
rm .cargo/config.toml
|
|
|
|
'';
|
|
|
|
|
|
|
|
postInstall = ''
|
|
|
|
installShellCompletion --cmd himalaya \
|
|
|
|
--bash <($out/bin/chara completion --shell bash) \
|
|
|
|
--fish <($out/bin/chara completion --shell fish) \
|
|
|
|
--zsh <($out/bin/chara completion --shell zsh)
|
|
|
|
'';
|
|
|
|
|
|
|
|
meta = with lib; {
|
|
|
|
description = "The future of cowsay - Colorful characters saying something";
|
|
|
|
homepage = "https://github.com/latipun7/charasay";
|
|
|
|
license = licenses.mit;
|
|
|
|
maintainers = with maintainers; [ hmajid2301 ];
|
2023-11-27 01:17:53 +00:00
|
|
|
mainProgram = "chara";
|
2023-05-28 13:01:39 +00:00
|
|
|
};
|
|
|
|
}
|