kubelogin: install shell completions (#346587)
This commit is contained in:
commit
a7671c23ac
@ -1,4 +1,4 @@
|
||||
{ lib, fetchFromGitHub, buildGoModule, go }:
|
||||
{ stdenv, lib, fetchFromGitHub, buildGoModule, installShellFiles, go }:
|
||||
|
||||
buildGoModule rec {
|
||||
pname = "kubelogin";
|
||||
@ -18,6 +18,17 @@ buildGoModule rec {
|
||||
"-X main.goVersion=${lib.getVersion go}"
|
||||
];
|
||||
|
||||
nativeBuildInputs = [ installShellFiles ];
|
||||
|
||||
postInstall = lib.optionalString (stdenv.buildPlatform.canExecute stdenv.hostPlatform) ''
|
||||
$out/bin/kubelogin completion bash >kubelogin.bash
|
||||
$out/bin/kubelogin completion fish >kubelogin.fish
|
||||
$out/bin/kubelogin completion zsh >kubelogin.zsh
|
||||
installShellCompletion kubelogin.{bash,fish,zsh}
|
||||
'';
|
||||
|
||||
__darwinAllowLocalNetworking = true;
|
||||
|
||||
meta = with lib; {
|
||||
description = "Kubernetes credential plugin implementing Azure authentication";
|
||||
mainProgram = "kubelogin";
|
||||
|
Loading…
Reference in New Issue
Block a user