diff --git a/pkgs/tools/admin/oci-cli/default.nix b/pkgs/tools/admin/oci-cli/default.nix index 1d09e02b6ba6..a84c62ca6330 100644 --- a/pkgs/tools/admin/oci-cli/default.nix +++ b/pkgs/tools/admin/oci-cli/default.nix @@ -2,6 +2,7 @@ , fetchFromGitHub , fetchPypi , python3 +, installShellFiles }: let @@ -46,6 +47,8 @@ buildPythonApplication rec { hash = "sha256-yooEZuSIw2EMJVyT/Z/x4hJi8a1F674CtsMMGkMAYLg="; }; + nativeBuildInputs = [ installShellFiles ]; + propagatedBuildInputs = [ arrow certifi @@ -73,6 +76,24 @@ buildPythonApplication rec { --replace "oci==2.78.0" "oci" ''; + postInstall = '' + cat >oci.zsh <>oci.zsh + + installShellCompletion \ + --cmd oci \ + --bash src/oci_cli/bin/oci_autocomplete.sh \ + --zsh oci.zsh + ''; + # https://github.com/oracle/oci-cli/issues/187 doCheck = false;