python3Packages.python-openstackclient: enable bash completion
This commit is contained in:
@@ -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";
|
||||
|
||||
Reference in New Issue
Block a user