Merge pull request #294455 from pedorich-n/ast-grep-completions

ast-grep: install shell completions

authored by Sandro and committed by GitHub 010e1d59 c38616a7

+10
+10
pkgs/by-name/as/ast-grep/package.nix
··· 2 , rustPlatform 3 , fetchFromGitHub 4 , stdenv 5 }: 6 7 rustPlatform.buildRustPackage rec { ··· 22 NIX_LDFLAGS = "-l${stdenv.cc.libcxx.cxxabi.libName}"; 23 }; 24 25 # error: linker `aarch64-linux-gnu-gcc` not found 26 postPatch = '' 27 rm .cargo/config.toml 28 ''; 29 30 checkFlags = [
··· 2 , rustPlatform 3 , fetchFromGitHub 4 , stdenv 5 + , installShellFiles 6 }: 7 8 rustPlatform.buildRustPackage rec { ··· 23 NIX_LDFLAGS = "-l${stdenv.cc.libcxx.cxxabi.libName}"; 24 }; 25 26 + nativeBuildInputs = [ installShellFiles ]; 27 + 28 # error: linker `aarch64-linux-gnu-gcc` not found 29 postPatch = '' 30 rm .cargo/config.toml 31 + ''; 32 + 33 + postInstall = '' 34 + installShellCompletion --cmd sg \ 35 + --bash <($out/bin/sg completions bash) \ 36 + --fish <($out/bin/sg completions fish) \ 37 + --zsh <($out/bin/sg completions zsh) 38 ''; 39 40 checkFlags = [