kops: use installShellFiles
This commit is contained in:
parent
7a40eb5763
commit
16df60734a
@ -1,4 +1,4 @@
|
|||||||
{ stdenv, lib, buildGoPackage, fetchFromGitHub, go-bindata }:
|
{ stdenv, lib, buildGoPackage, fetchFromGitHub, go-bindata, installShellFiles }:
|
||||||
|
|
||||||
let
|
let
|
||||||
goPackagePath = "k8s.io/kops";
|
goPackagePath = "k8s.io/kops";
|
||||||
@ -18,7 +18,7 @@ let
|
|||||||
inherit sha256;
|
inherit sha256;
|
||||||
};
|
};
|
||||||
|
|
||||||
nativeBuildInputs = [ go-bindata ];
|
nativeBuildInputs = [ go-bindata installShellFiles ];
|
||||||
subPackages = [ "cmd/kops" ];
|
subPackages = [ "cmd/kops" ];
|
||||||
|
|
||||||
buildFlagsArray = ''
|
buildFlagsArray = ''
|
||||||
@ -33,10 +33,10 @@ let
|
|||||||
'';
|
'';
|
||||||
|
|
||||||
postInstall = ''
|
postInstall = ''
|
||||||
mkdir -p $bin/share/bash-completion/completions
|
for shell in bash zsh; do
|
||||||
mkdir -p $bin/share/zsh/site-functions
|
$bin/bin/kops completion $shell > kops.$shell
|
||||||
$bin/bin/kops completion bash > $bin/share/bash-completion/completions/kops
|
installShellCompletion kops.$shell
|
||||||
$bin/bin/kops completion zsh > $bin/share/zsh/site-functions/_kops
|
done
|
||||||
'';
|
'';
|
||||||
|
|
||||||
meta = with stdenv.lib; {
|
meta = with stdenv.lib; {
|
||||||
|
Loading…
x
Reference in New Issue
Block a user