orbstack: Adds shell completions to orbstack package
This commit is contained in:
@@ -3,6 +3,7 @@
|
||||
stdenvNoCC,
|
||||
fetchurl,
|
||||
_7zz,
|
||||
installShellFiles,
|
||||
}:
|
||||
let
|
||||
inherit (stdenvNoCC.hostPlatform) system;
|
||||
@@ -41,7 +42,10 @@ stdenvNoCC.mkDerivation (finalAttrs: {
|
||||
# These bogus files corrupt the .app bundle and prevent it from launching.
|
||||
unpackCmd = "7zz x -snld -xr'!*:com.apple.*' $curSrc";
|
||||
|
||||
nativeBuildInputs = [ _7zz ];
|
||||
nativeBuildInputs = [
|
||||
_7zz
|
||||
installShellFiles
|
||||
];
|
||||
|
||||
sourceRoot = ".";
|
||||
|
||||
@@ -59,6 +63,12 @@ stdenvNoCC.mkDerivation (finalAttrs: {
|
||||
runHook postInstall
|
||||
'';
|
||||
|
||||
postInstall = ''
|
||||
installShellCompletion --bash "$out"/Applications/OrbStack.app/Contents/Resources/completions/bash/{docker,kubectl,orbctl}.bash
|
||||
installShellCompletion --zsh "$out"/Applications/OrbStack.app/Contents/Resources/completions/zsh/{_docker,_kubectl,_orb,_orbctl}
|
||||
installShellCompletion --fish "$out"/Applications/OrbStack.app/Contents/Resources/completions/fish/{docker,kubectl,orbctl}.fish
|
||||
'';
|
||||
|
||||
passthru = {
|
||||
inherit sources;
|
||||
updateScript = ./update.sh;
|
||||
|
||||
Reference in New Issue
Block a user