python3Packages.python-openstackclient: enable bash completion

This commit is contained in:
Vinetos
2026-03-07 21:35:57 +01:00
parent f9ddc75fe5
commit cb8f9bcd3c
@@ -3,6 +3,7 @@
buildPythonPackage,
fetchFromGitHub,
ddt,
installShellFiles,
openstackdocstheme,
osc-lib,
osc-placement,
@@ -27,6 +28,7 @@
setuptools,
sphinxHook,
sphinxcontrib-apidoc,
stdenv,
stestrCheckHook,
versionCheckHook,
}:
@@ -68,6 +70,10 @@ buildPythonPackage (finalAttrs: {
# to support proxy envs like ALL_PROXY in requests
++ requests.optional-dependencies.socks;
nativeBuildInputs = [
installShellFiles
];
nativeCheckInputs = [
ddt
requests-mock
@@ -116,6 +122,11 @@ buildPythonPackage (finalAttrs: {
];
doInstallCheck = true;
postInstall = lib.optionalString (stdenv.buildPlatform.canExecute stdenv.hostPlatform) ''
installShellCompletion --cmd openstack \
--bash <($out/bin/openstack complete)
'';
meta = {
description = "OpenStack Command-line Client";
mainProgram = "openstack";