1{
2 lib,
3 buildPythonPackage,
4 fetchPypi,
5 dill,
6 dnslib,
7 dnspython,
8 plux,
9 pyaes,
10 python-jose,
11 requests,
12 tabulate,
13
14 # Sensitive downstream dependencies
15 localstack,
16}:
17
18buildPythonPackage rec {
19 pname = "localstack-ext";
20 version = "2.3.2";
21 format = "setuptools";
22
23 src = fetchPypi {
24 inherit pname version;
25 hash = "sha256-Ex5ZPlteDaiyex90QumucVdTTbpp9uWiBrvw1kMr++8=";
26 };
27
28 postPatch = ''
29 # Avoid circular dependency
30 sed -i '/localstack>=/d' setup.cfg
31
32 # Pip is unable to resolve attr logic, so it will emit version as 0.0.0
33 substituteInPlace setup.cfg \
34 --replace "version = attr: localstack_ext.__version__" "version = ${version}"
35 cat setup.cfg
36
37 substituteInPlace setup.cfg \
38 --replace "dill==0.3.2" "dill~=0.3.0" \
39 --replace "requests>=2.20.0,<2.26" "requests~=2.20"
40 '';
41
42 propagatedBuildInputs = [
43 dill
44 dnslib
45 dnspython
46 plux
47 pyaes
48 python-jose
49 requests
50 tabulate
51 ];
52
53 pythonImportsCheck = [ "localstack_ext" ];
54
55 # No tests in repo
56 doCheck = false;
57
58 passthru.tests = {
59 inherit localstack;
60 };
61
62 meta = with lib; {
63 description = "Extensions for LocalStack";
64 homepage = "https://github.com/localstack/localstack";
65 license = licenses.asl20;
66 maintainers = with maintainers; [ jonringer ];
67 };
68}