From d890ac8973e8147eae1773778041883d2cd5d56d Mon Sep 17 00:00:00 2001 From: Mario Rodas Date: Tue, 19 May 2020 04:20:00 -0500 Subject: [PATCH] kubie: use installShellFiles --- pkgs/development/tools/kubie/default.nix | 17 +++++++---------- 1 file changed, 7 insertions(+), 10 deletions(-) diff --git a/pkgs/development/tools/kubie/default.nix b/pkgs/development/tools/kubie/default.nix index c8985fc063f..bdb8f0ea147 100644 --- a/pkgs/development/tools/kubie/default.nix +++ b/pkgs/development/tools/kubie/default.nix @@ -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; }; }