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