mirror of
https://github.com/NixOS/nixpkgs.git
synced 2024-12-04 04:46:43 +00:00
40 lines
955 B
Nix
40 lines
955 B
Nix
{ lib
|
|
, rustPlatform
|
|
, fetchFromGitHub
|
|
, installShellFiles
|
|
}:
|
|
|
|
rustPlatform.buildRustPackage rec {
|
|
pname = "charasay";
|
|
version = "3.0.0";
|
|
|
|
src = fetchFromGitHub {
|
|
owner = "latipun7";
|
|
repo = pname;
|
|
rev = "v${version}";
|
|
hash = "sha256-LijIteY0RZxNf6RI61bm1Ug4+GFsoWr6icNu1p2pa2s=";
|
|
};
|
|
|
|
cargoHash = "sha256-sG+tyCYur2UR1U9g5tWOyuU2mJ14PdayBqMdNGOwIrA=";
|
|
|
|
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 ];
|
|
};
|
|
}
|