Skip to content

Commit 2066463

Browse files
authored
kubie: wrap kubectl program, add fish completion (#410119)
2 parents 136cada + 1d8ea85 commit 2066463

File tree

1 file changed

+14
-2
lines changed

1 file changed

+14
-2
lines changed

pkgs/by-name/ku/kubie/package.nix

Lines changed: 14 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,10 @@
11
{
22
lib,
3+
kubectl,
34
rustPlatform,
45
fetchFromGitHub,
56
installShellFiles,
7+
makeWrapper,
68
}:
79

810
rustPlatform.buildRustPackage rec {
@@ -20,10 +22,20 @@ rustPlatform.buildRustPackage rec {
2022
useFetchCargoVendor = true;
2123
cargoHash = "sha256-Yf8fAW65K7SLaRpvegjWBLVDV33sMGV+I1rqlWvx5Ss=";
2224

23-
nativeBuildInputs = [ installShellFiles ];
25+
nativeBuildInputs = [
26+
installShellFiles
27+
makeWrapper
28+
];
2429

2530
postInstall = ''
26-
installShellCompletion completion/kubie.bash
31+
installShellCompletion completion/kubie.{bash,fish}
32+
33+
wrapProgram "$out/bin/kubie" \
34+
--prefix PATH : "${
35+
lib.makeBinPath [
36+
kubectl
37+
]
38+
}"
2739
'';
2840

2941
meta = with lib; {

0 commit comments

Comments
 (0)