kubie: wrap kubectl

kubie executes kubectl to list namespaces for `kubie ns` command.
This commit is contained in:
Hoang Nguyen 2025-05-23 18:05:07 +07:00
parent 2c8957887f
commit ca1ec659ee
No known key found for this signature in database
GPG key ID: 14F4F683E34C7DDD

View file

@ -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; {