kubie: use installShellFiles

This commit is contained in:
Mario Rodas 2020-05-19 04:20:00 -05:00
parent 58ba20dd90
commit d890ac8973
No known key found for this signature in database
GPG Key ID: 325649BCA6D53027

View File

@ -1,8 +1,6 @@
{ stdenv, rustPlatform, fetchFromGitHub }:
{ stdenv, rustPlatform, fetchFromGitHub, installShellFiles }:
with rustPlatform;
buildRustPackage rec {
rustPlatform.buildRustPackage rec {
pname = "kubie";
version = "0.9.1";
@ -15,17 +13,16 @@ buildRustPackage rec {
cargoSha256 = "13zs2xz3s4732zxsimg7b22d9707ln4gpscznxi13cjkf5as9gbz";
installPhase = ''
mkdir -p $out/share/bash-completion/completions
cp -v ${src}/completion/kubie.bash $out/share/bash-completion/completions/kubie
nativeBuildInputs = [ installShellFiles ];
postInstall = ''
installShellCompletion completion/kubie.bash
'';
meta = with stdenv.lib; {
description =
"Shell independent context and namespace switcher for kubectl";
description = "Shell independent context and namespace switcher for kubectl";
homepage = "https://github.com/sbstp/kubie";
license = with licenses; [ zlib ];
maintainers = with maintainers; [ illiusdope ];
platforms = platforms.all;
};
}