From ca1ec659ee9168db0a159a7d433cdc241c5616e3 Mon Sep 17 00:00:00 2001 From: Hoang Nguyen Date: Fri, 23 May 2025 18:05:07 +0700 Subject: [PATCH] kubie: wrap kubectl kubie executes kubectl to list namespaces for `kubie ns` command. --- pkgs/by-name/ku/kubie/package.nix | 14 +++++++++++++- 1 file changed, 13 insertions(+), 1 deletion(-) diff --git a/pkgs/by-name/ku/kubie/package.nix b/pkgs/by-name/ku/kubie/package.nix index cf25e473476a..70603e620d1c 100644 --- a/pkgs/by-name/ku/kubie/package.nix +++ b/pkgs/by-name/ku/kubie/package.nix @@ -1,8 +1,10 @@ { lib, + kubectl, rustPlatform, fetchFromGitHub, installShellFiles, + makeWrapper, }: rustPlatform.buildRustPackage rec { @@ -20,10 +22,20 @@ rustPlatform.buildRustPackage rec { useFetchCargoVendor = true; cargoHash = "sha256-Yf8fAW65K7SLaRpvegjWBLVDV33sMGV+I1rqlWvx5Ss="; - nativeBuildInputs = [ installShellFiles ]; + nativeBuildInputs = [ + installShellFiles + makeWrapper + ]; postInstall = '' installShellCompletion completion/kubie.bash + + wrapProgram "$out/bin/kubie" \ + --prefix PATH : "${ + lib.makeBinPath [ + kubectl + ] + }" ''; meta = with lib; {