From 6e588e5b0eb1fab72a479762929a36e927459e1d Mon Sep 17 00:00:00 2001 From: Alex Eyre Date: Sat, 15 May 2021 22:15:11 +0100 Subject: [PATCH] nimbo: add shell completions nimbo: run nixfmt nimbo: fix fish completion nimbo: apply changes from @SuperSandro2000 Co-authored-by: Sandro --- pkgs/applications/misc/nimbo/default.nix | 14 +++++++++++--- 1 file changed, 11 insertions(+), 3 deletions(-) diff --git a/pkgs/applications/misc/nimbo/default.nix b/pkgs/applications/misc/nimbo/default.nix index 1bc45bc6aee0..802a9f9a32c1 100644 --- a/pkgs/applications/misc/nimbo/default.nix +++ b/pkgs/applications/misc/nimbo/default.nix @@ -1,5 +1,6 @@ -{ lib, setuptools, boto3, requests, click, pyyaml, pydantic, buildPythonApplication -, pythonOlder, fetchFromGitHub, awscli }: +{ lib, setuptools, boto3, requests, click, pyyaml, pydantic +, buildPythonApplication, pythonOlder, installShellFiles, fetchFromGitHub +, awscli }: buildPythonApplication rec { pname = "nimbo"; @@ -12,13 +13,20 @@ buildPythonApplication rec { rev = "v${version}"; sha256 = "1fs28s9ynfxrb4rzba6cmik0kl0q0vkpb4zdappsq62jqf960k24"; }; - + nativeBuildInputs = [ installShellFiles ]; propagatedBuildInputs = [ setuptools boto3 awscli requests click pyyaml pydantic ]; # nimbo tests require an AWS instance doCheck = false; pythonImportsCheck = [ "nimbo" ]; + postInstall = '' + installShellCompletion --cmd nimbo \ + --zsh <(_NIMBO_COMPLETE=source_zsh $out/bin/nimbo) \ + --bash <(_NIMBO_COMPLETE=source_bash $out/bin/nimbo) \ + --fish <(_NIMBO_COMPLETE=source_fish $out/bin/nimbo) + ''; + meta = with lib; { description = "Run machine learning jobs on AWS with a single command"; homepage = "https://github.com/nimbo-sh/nimbo";