Files
nixpkgs/pkgs/by-name/ni/nimbo/package.nix
Dark Steveneq 646b892680
Some checks failed
Periodic Merges (6h) / master → staging-nixos (push) Failing after 12m50s
Periodic Merges (6h) / master → staging-next (push) Failing after 12m54s
Periodic Merges (24h) / merge-base(master,staging) → haskell-updates (push) Failing after 11m54s
Periodic Merges (6h) / staging-next → staging (push) Failing after 12m13s
Periodic Merges (24h) / staging-next-25.05 → staging-25.05 (push) Failing after 13m24s
Periodic Merges (24h) / release-25.05 → staging-next-25.05 (push) Failing after 14m28s
push sheeet
2025-10-09 14:15:47 +02:00

69 lines
1.5 KiB
Nix

{
lib,
stdenv,
python3,
fetchFromGitHub,
installShellFiles,
awscli,
}:
python3.pkgs.buildPythonApplication rec {
pname = "nimbo";
version = "0.3.0";
format = "setuptools";
disabled = python3.pythonOlder "3.6";
src = fetchFromGitHub {
owner = "nimbo-sh";
repo = "nimbo";
rev = "v${version}";
sha256 = "YC5T02Sw22Uczufbyts8l99oCQW4lPq0gPMRXCoKsvw=";
};
# Rich + Colorama are added in `propagatedBuildInputs`
postPatch = ''
substituteInPlace setup.py \
--replace "awscli>=1.19<2.0" "" \
--replace "colorama==0.4.3" "" \
--replace "rich>=10.1.0" ""
'';
nativeBuildInputs = [ installShellFiles ];
propagatedBuildInputs = with python3.pkgs; [
setuptools
boto3
requests
click
pyyaml
pydantic
rich
colorama
];
# nimbo tests require an AWS instance
doCheck = false;
pythonImportsCheck = [ "nimbo" ];
makeWrapperArgs = [
"--prefix"
"PATH"
":"
(lib.makeBinPath [ awscli ])
];
postInstall = lib.optionalString (stdenv.buildPlatform.canExecute stdenv.hostPlatform) ''
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";
license = licenses.bsl11;
maintainers = with maintainers; [ noreferences ];
};
}