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