nimbo: add awscli to $PATH instead of propagatedBuildInputs

Awscli is never imported.
This commit is contained in:
Robert Schütz 2022-01-02 21:48:15 +00:00 committed by Jonathan Ringer
parent 482634d5ca
commit 741668e4b0

View file

@ -1,11 +1,14 @@
{ lib, setuptools, boto3, requests, click, pyyaml, pydantic
, buildPythonApplication, pythonOlder, installShellFiles, fetchFromGitHub
, awscli }:
{ lib
, python3
, fetchFromGitHub
, installShellFiles
, awscli
}:
buildPythonApplication rec {
python3.pkgs.buildPythonApplication rec {
pname = "nimbo";
version = "0.2.4";
disabled = pythonOlder "3.6";
disabled = python3.pythonOlder "3.6";
src = fetchFromGitHub {
owner = "nimbo-sh";
@ -13,13 +16,31 @@ buildPythonApplication rec {
rev = "v${version}";
sha256 = "1fs28s9ynfxrb4rzba6cmik0kl0q0vkpb4zdappsq62jqf960k24";
};
postPatch = ''
substituteInPlace setup.py \
--replace "awscli>=1.19<2.0" ""
'';
nativeBuildInputs = [ installShellFiles ];
propagatedBuildInputs = [ setuptools boto3 awscli requests click pyyaml pydantic ];
propagatedBuildInputs = with python3.pkgs; [
setuptools
boto3
requests
click
pyyaml
pydantic
];
# nimbo tests require an AWS instance
doCheck = false;
pythonImportsCheck = [ "nimbo" ];
makeWrapperArgs = [
"--prefix" "PATH" ":" (lib.makeBinPath [ awscli ])
];
postInstall = ''
installShellCompletion --cmd nimbo \
--zsh <(_NIMBO_COMPLETE=source_zsh $out/bin/nimbo) \