ripasso-cursive: cosmetic changes (#361736)
[NixPkgs.git] / pkgs / by-name / ca / cauwugo / package.nix
blob1f497a270b939d45a3ffbdf61d12498837f7ac06
1 { lib, rustPlatform, fetchCrate, installShellFiles, stdenv }:
3 rustPlatform.buildRustPackage rec {
4   pname = "cauwugo";
5   version = "0.1.0";
7   src = fetchCrate {
8     inherit version;
9     pname = "bpaf_cauwugo";
10     hash = "sha256-9gWUu2qbscKlbWZlRbOn+rrmizegkHxPnwnAmpaV1Ww=";
11   };
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)
22   '';
24   meta = with lib; {
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 ];
30   };