1 { lib, rustPlatform, fetchCrate, installShellFiles, stdenv }:
3 rustPlatform.buildRustPackage rec {
9 pname = "bpaf_cauwugo";
10 hash = "sha256-9gWUu2qbscKlbWZlRbOn+rrmizegkHxPnwnAmpaV1Ww=";
13 cargoHash = "sha256-dXlSBb3ey3dAiifrQ9Bbhscnm1QmcChiQbX1ic069V4=";
15 nativeBuildInputs = [ installShellFiles ];
17 postInstall = lib.optionalString (stdenv.buildPlatform.canExecute stdenv.hostPlatform) ''
18 installShellCompletion --cmd cauwugo \
19 --bash <($out/bin/cauwugo --bpaf-complete-style-bash) \
20 --fish <($out/bin/cauwugo --bpaf-complete-style-fish) \
21 --zsh <($out/bin/cauwugo --bpaf-complete-style-zsh)
25 description = "Alternative cargo frontend that implements dynamic shell completion for usual cargo commands";
26 mainProgram = "cauwugo";
27 homepage = "https://github.com/pacak/bpaf/tree/master/bpaf_cauwugo";
28 license = with licenses; [ mit /* or */ asl20 ];
29 maintainers = with maintainers; [ figsoda ];