bazel: use installShellCompletion
for completions
This commit is contained in:
parent
a06fda4c5d
commit
595afc2c3f
@ -1,4 +1,4 @@
|
|||||||
{ stdenv, callPackage, lib, fetchurl, fetchFromGitHub
|
{ stdenv, callPackage, lib, fetchurl, fetchFromGitHub, installShellFiles
|
||||||
, runCommand, runCommandCC, makeWrapper, recurseIntoAttrs
|
, runCommand, runCommandCC, makeWrapper, recurseIntoAttrs
|
||||||
# this package (through the fixpoint glass)
|
# this package (through the fixpoint glass)
|
||||||
, bazel_self
|
, bazel_self
|
||||||
@ -465,6 +465,7 @@ stdenv.mkDerivation rec {
|
|||||||
# when a command can’t be found in a bazel build, you might also
|
# when a command can’t be found in a bazel build, you might also
|
||||||
# need to add it to `defaultShellPath`.
|
# need to add it to `defaultShellPath`.
|
||||||
nativeBuildInputs = [
|
nativeBuildInputs = [
|
||||||
|
installShellFiles
|
||||||
zip
|
zip
|
||||||
python3
|
python3
|
||||||
unzip
|
unzip
|
||||||
@ -507,15 +508,15 @@ stdenv.mkDerivation rec {
|
|||||||
mv ./bazel_src/output/bazel $out/bin/bazel-${version}-${system}-${arch}
|
mv ./bazel_src/output/bazel $out/bin/bazel-${version}-${system}-${arch}
|
||||||
|
|
||||||
# shell completion files
|
# shell completion files
|
||||||
install -Dm644 \
|
installShellCompletion --bash \
|
||||||
./bazel_src/output/bazel-complete.bash \
|
--name bazel.bash \
|
||||||
$out/share/bash-completion/completions/bazel/bazel-complete.bash
|
./bazel_src/output/bazel-complete.bash
|
||||||
install -Dm644 \
|
installShellCompletion --zsh \
|
||||||
./bazel_src/scripts/zsh_completion/_bazel \
|
--name _bazel \
|
||||||
$out/share/zsh/site-functions/_bazel
|
./bazel_src/scripts/zsh_completion/_bazel
|
||||||
install -Dm644 \
|
installShellCompletion --fish \
|
||||||
./bazel_src/scripts/fish/completions/bazel.fish \
|
--name bazel.fish \
|
||||||
$out/share/fish/vendor_completions.d/bazel.fish
|
./bazel_src/scripts/fish/completions/bazel.fish
|
||||||
'';
|
'';
|
||||||
|
|
||||||
doInstallCheck = true;
|
doInstallCheck = true;
|
||||||
|
Loading…
Reference in New Issue
Block a user