1{ lib 2, buildPythonPackage 3, fetchFromGitHub 4, apispec 5, boto3 6, cachetools 7, click 8, localstack-client 9, localstack-ext 10, plux 11, psutil 12, python-dotenv 13, pyyaml 14, packaging 15, requests 16, rich 17, semver 18, tailer 19}: 20 21buildPythonPackage rec { 22 pname = "localstack"; 23 version = "2.3.2"; 24 25 src = fetchFromGitHub { 26 owner = "localstack"; 27 repo = "localstack"; 28 rev = "refs/tags/v${version}"; 29 hash = "sha256-8HrPnMmzoxgAhu3Qm18FBJ3kNoGOD7bGmI1t7tcETwM="; 30 }; 31 32 postPatch = '' 33 substituteInPlace setup.cfg \ 34 --replace "requests>=2.20.0,<2.26" "requests~=2.20" \ 35 --replace "cachetools~=5.0.0" "cachetools~=5.0" \ 36 --replace "boto3>=1.20,<1.25.0" "boto3~=1.20" 37 ''; 38 39 propagatedBuildInputs = [ 40 apispec 41 boto3 42 cachetools 43 click 44 localstack-client 45 localstack-ext 46 plux 47 psutil 48 python-dotenv 49 pyyaml 50 packaging 51 requests 52 rich 53 semver 54 tailer 55 ]; 56 57 pythonImportsCheck = [ "localstack" ]; 58 59 # Test suite requires boto, which has been removed from nixpkgs 60 # Just do minimal test, buildPythonPackage maps checkPhase 61 # to installCheckPhase, so we can test that entrypoint point works. 62 checkPhase = '' 63 $out/bin/localstack --version 64 ''; 65 66 meta = with lib; { 67 description = "A fully functional local Cloud stack"; 68 homepage = "https://github.com/localstack/localstack"; 69 license = licenses.asl20; 70 maintainers = with maintainers; [ jonringer ]; 71 }; 72}