nixpkgs mirror (for testing)
github.com/NixOS/nixpkgs
nix
1{ lib, rustPlatform, fetchCrate, installShellFiles }:
2
3rustPlatform.buildRustPackage rec {
4 pname = "cauwugo";
5 version = "0.1.0";
6
7 src = fetchCrate {
8 inherit version;
9 pname = "bpaf_cauwugo";
10 sha256 = "sha256-9gWUu2qbscKlbWZlRbOn+rrmizegkHxPnwnAmpaV1Ww=";
11 };
12
13 cargoSha256 = "sha256-dXlSBb3ey3dAiifrQ9Bbhscnm1QmcChiQbX1ic069V4=";
14
15 nativeBuildInputs = [ installShellFiles ];
16
17 postInstall = ''
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 '';
23
24 meta = with lib; {
25 description = "An alternative cargo frontend that implements dynamic shell completion for usual cargo commands";
26 homepage = "https://github.com/pacak/bpaf/tree/master/bpaf_cauwugo";
27 license = with licenses; [ mit /* or */ asl20 ];
28 maintainers = with maintainers; [ figsoda ];
29 };
30}