From c6cb6a7c55242447c7d94316cf8434902094a111 Mon Sep 17 00:00:00 2001 From: superherointj <5861043+superherointj@users.noreply.github.com> Date: Tue, 20 Apr 2021 18:21:29 -0300 Subject: [PATCH] linode-cli: enable/add test; add bash auto-completion --- pkgs/tools/virtualization/linode-cli/default.nix | 14 +++++++++++--- 1 file changed, 11 insertions(+), 3 deletions(-) diff --git a/pkgs/tools/virtualization/linode-cli/default.nix b/pkgs/tools/virtualization/linode-cli/default.nix index ba343fe657ba..155daf41a7f2 100644 --- a/pkgs/tools/virtualization/linode-cli/default.nix +++ b/pkgs/tools/virtualization/linode-cli/default.nix @@ -7,6 +7,7 @@ , requests , pyyaml , setuptools +, installShellFiles }: let @@ -48,14 +49,21 @@ buildPythonApplication rec { cp data-3 linodecli/ ''; - # requires linode access token for unit tests, and running executable - doCheck = false; + doInstallCheck = true; + installCheckPhase = '' + $out/bin/linode-cli --skip-config --version | grep ${version} > /dev/null + ''; + + nativeBuildInputs = [ installShellFiles ]; + postInstall = '' + installShellCompletion --cmd linode-cli --bash <($out/bin/linode-cli --skip-config completion bash) + ''; meta = with lib; { homepage = "https://github.com/linode/linode-cli"; description = "The Linode Command Line Interface"; license = licenses.bsd3; - maintainers = with maintainers; [ ryantm ]; + maintainers = with maintainers; [ ryantm superherointj ]; }; }