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