2022-01-02 22:48:15 +01:00
|
|
|
{ lib
|
|
|
|
, python3
|
|
|
|
, fetchFromGitHub
|
|
|
|
, installShellFiles
|
|
|
|
, awscli
|
|
|
|
}:
|
2021-05-04 00:35:35 +02:00
|
|
|
|
2022-01-02 22:48:15 +01:00
|
|
|
python3.pkgs.buildPythonApplication rec {
|
2021-05-04 00:35:35 +02:00
|
|
|
pname = "nimbo";
|
|
|
|
version = "0.2.4";
|
2022-01-02 22:48:15 +01:00
|
|
|
disabled = python3.pythonOlder "3.6";
|
2021-05-04 00:35:35 +02:00
|
|
|
|
|
|
|
src = fetchFromGitHub {
|
|
|
|
owner = "nimbo-sh";
|
|
|
|
repo = pname;
|
|
|
|
rev = "v${version}";
|
|
|
|
sha256 = "1fs28s9ynfxrb4rzba6cmik0kl0q0vkpb4zdappsq62jqf960k24";
|
|
|
|
};
|
2022-01-02 22:48:15 +01:00
|
|
|
|
|
|
|
postPatch = ''
|
|
|
|
substituteInPlace setup.py \
|
|
|
|
--replace "awscli>=1.19<2.0" ""
|
|
|
|
'';
|
|
|
|
|
2021-05-15 23:15:11 +02:00
|
|
|
nativeBuildInputs = [ installShellFiles ];
|
2022-01-02 22:48:15 +01:00
|
|
|
|
|
|
|
propagatedBuildInputs = with python3.pkgs; [
|
|
|
|
setuptools
|
|
|
|
boto3
|
|
|
|
requests
|
|
|
|
click
|
|
|
|
pyyaml
|
|
|
|
pydantic
|
|
|
|
];
|
2021-05-04 00:35:35 +02:00
|
|
|
|
|
|
|
# nimbo tests require an AWS instance
|
|
|
|
doCheck = false;
|
|
|
|
pythonImportsCheck = [ "nimbo" ];
|
|
|
|
|
2022-01-02 22:48:15 +01:00
|
|
|
makeWrapperArgs = [
|
|
|
|
"--prefix" "PATH" ":" (lib.makeBinPath [ awscli ])
|
|
|
|
];
|
|
|
|
|
2021-05-15 23:15:11 +02:00
|
|
|
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)
|
|
|
|
'';
|
|
|
|
|
2021-05-04 00:35:35 +02:00
|
|
|
meta = with lib; {
|
|
|
|
description = "Run machine learning jobs on AWS with a single command";
|
|
|
|
homepage = "https://github.com/nimbo-sh/nimbo";
|
|
|
|
license = licenses.bsl11;
|
2022-05-08 09:55:27 +02:00
|
|
|
maintainers = with maintainers; [ alexeyre noreferences ];
|
2021-05-04 00:35:35 +02:00
|
|
|
};
|
|
|
|
}
|