diff options
author | Alex Eyre <A.Eyre@sms.ed.ac.uk> | 2021-05-15 22:15:11 +0100 |
---|---|---|
committer | Alex Eyre <A.Eyre@sms.ed.ac.uk> | 2021-06-05 20:05:03 +0100 |
commit | 6e588e5b0eb1fab72a479762929a36e927459e1d (patch) | |
tree | 46a42f753054fc877ead1a4fbb3a6d151883488b | |
parent | 64abed3b574b4d496fc220e9cd197fe681a060e8 (diff) |
nimbo: add shell completions
nimbo: run nixfmt nimbo: fix fish completion nimbo: apply changes from @SuperSandro2000 Co-authored-by: Sandro <sandro.jaeckel@gmail.com>
-rw-r--r-- | pkgs/applications/misc/nimbo/default.nix | 14 |
1 files changed, 11 insertions, 3 deletions
diff --git a/pkgs/applications/misc/nimbo/default.nix b/pkgs/applications/misc/nimbo/default.nix index 1bc45bc6aee03..802a9f9a32c16 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"; |