Unverified Commit 9dea4837 authored by Sandro Jäckel's avatar Sandro Jäckel Committed by GitHub
Browse files

python3Packages.python-openstackclient: enable bash completion (#497687)

parents c130e17a cb8f9bcd
Loading
Loading
Loading
Loading
+11 −0
Original line number Diff line number Diff line
@@ -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";