2024-09-19 14:19:46 +00:00
|
|
|
{ lib, rustPlatform, fetchCrate, installShellFiles, stdenv }:
|
2022-10-21 18:38:19 +00:00
|
|
|
|
|
|
|
rustPlatform.buildRustPackage rec {
|
|
|
|
pname = "cauwugo";
|
|
|
|
version = "0.1.0";
|
|
|
|
|
|
|
|
src = fetchCrate {
|
|
|
|
inherit version;
|
|
|
|
pname = "bpaf_cauwugo";
|
2024-07-27 06:49:29 +00:00
|
|
|
hash = "sha256-9gWUu2qbscKlbWZlRbOn+rrmizegkHxPnwnAmpaV1Ww=";
|
2022-10-21 18:38:19 +00:00
|
|
|
};
|
|
|
|
|
2024-07-31 10:19:44 +00:00
|
|
|
cargoHash = "sha256-dXlSBb3ey3dAiifrQ9Bbhscnm1QmcChiQbX1ic069V4=";
|
2022-10-21 18:38:19 +00:00
|
|
|
|
|
|
|
nativeBuildInputs = [ installShellFiles ];
|
|
|
|
|
2024-09-19 14:19:46 +00:00
|
|
|
postInstall = lib.optionalString (stdenv.buildPlatform.canExecute stdenv.hostPlatform) ''
|
2022-10-21 18:38:19 +00:00
|
|
|
installShellCompletion --cmd cauwugo \
|
|
|
|
--bash <($out/bin/cauwugo --bpaf-complete-style-bash) \
|
|
|
|
--fish <($out/bin/cauwugo --bpaf-complete-style-fish) \
|
|
|
|
--zsh <($out/bin/cauwugo --bpaf-complete-style-zsh)
|
|
|
|
'';
|
|
|
|
|
|
|
|
meta = with lib; {
|
2024-06-20 14:57:18 +00:00
|
|
|
description = "Alternative cargo frontend that implements dynamic shell completion for usual cargo commands";
|
2024-04-21 15:54:59 +00:00
|
|
|
mainProgram = "cauwugo";
|
2022-10-21 18:38:19 +00:00
|
|
|
homepage = "https://github.com/pacak/bpaf/tree/master/bpaf_cauwugo";
|
|
|
|
license = with licenses; [ mit /* or */ asl20 ];
|
|
|
|
maintainers = with maintainers; [ figsoda ];
|
|
|
|
};
|
|
|
|
}
|