diff --git a/pkgs/by-name/or/orbstack/package.nix b/pkgs/by-name/or/orbstack/package.nix index eb888578f63a..bebc8b45d2d0 100644 --- a/pkgs/by-name/or/orbstack/package.nix +++ b/pkgs/by-name/or/orbstack/package.nix @@ -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;