1{
2 lib,
3 python3,
4 fetchFromGitHub,
5}:
6
7python3.pkgs.buildPythonApplication rec {
8 pname = "localstack";
9 version = "4.6.0";
10 pyproject = true;
11
12 src = fetchFromGitHub {
13 owner = "localstack";
14 repo = "localstack";
15 tag = "v${version}";
16 hash = "sha256-95jg/FmeES64DSMPvWWaNXIxOTOtwvvXixZAgxWMqYo=";
17 };
18
19 build-system = with python3.pkgs; [
20 setuptools
21 setuptools-scm
22 ];
23
24 propagatedBuildInputs = with python3.pkgs; [
25 apispec
26 boto3
27 build
28 cachetools
29 click
30 cryptography
31 localstack-client
32 localstack-ext
33 plux
34 psutil
35 python-dotenv
36 pyyaml
37 packaging
38 requests
39 rich
40 semver
41 tailer
42 ];
43
44 pythonRelaxDeps = [
45 "dill"
46 ];
47
48 pythonImportsCheck = [ "localstack" ];
49
50 # Test suite requires boto, which has been removed from nixpkgs
51 # Just do minimal test, buildPythonPackage maps checkPhase
52 # to installCheckPhase, so we can test that entrypoint point works.
53 checkPhase = ''
54 runHook preCheck
55
56 export HOME=$(mktemp -d)
57 $out/bin/localstack --version
58
59 runHook postCheck
60 '';
61
62 # Propagating dependencies leaks them through $PYTHONPATH which causes issues
63 # when used in nix-shell.
64 postFixup = ''
65 rm $out/nix-support/propagated-build-inputs
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 mainProgram = "localstack";
74 };
75}