Skip to content

Commit

Permalink
cilium-cli: enable shell completion
Browse files Browse the repository at this point in the history
  • Loading branch information
bryanasdev000 committed Jun 27, 2022
1 parent 904740b commit 7a242c5
Showing 1 changed file with 9 additions and 2 deletions.
11 changes: 9 additions & 2 deletions pkgs/applications/networking/cluster/cilium/default.nix
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
{ lib, buildGoModule, fetchFromGitHub }:
{ lib, buildGoModule, fetchFromGitHub, installShellFiles }:

buildGoModule rec {
pname = "cilium-cli";
Expand All @@ -20,7 +20,6 @@ buildGoModule rec {
"-X github.com/cilium/cilium-cli/internal/cli/cmd.Version=${version}"
];


# Required to workaround install check error:
# 2022/06/25 10:36:22 Unable to start gops: mkdir /homeless-shelter: permission denied
HOME = "$TMPDIR";
Expand All @@ -30,6 +29,14 @@ buildGoModule rec {
$out/bin/cilium version | grep ${version} > /dev/null
'';

nativeBuildInputs = [ installShellFiles ];
postInstall = ''
installShellCompletion --cmd cilium \
--bash <($out/bin/cilium completion bash) \
--fish <($out/bin/cilium completion fish) \
--zsh <($out/bin/cilium completion zsh)
'';

meta = with lib; {
description = "CLI to install, manage & troubleshoot Kubernetes clusters running Cilium";
license = licenses.asl20;
Expand Down

0 comments on commit 7a242c5

Please sign in to comment.