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 = "3.5.0";
21 format = "setuptools";
22
23 src = fetchPypi {
24 pname = "localstack_ext";
25 inherit version;
26 hash = "sha256-tJNgNqCzlebbDOOgkScOKaf04bLTVIjP+BaFiDLo/Gs=";
27 };
28
29 postPatch = ''
30 # Avoid circular dependency
31 sed -i '/localstack>=/d' setup.cfg
32
33 # Pip is unable to resolve attr logic, so it will emit version as 0.0.0
34 substituteInPlace setup.cfg \
35 --replace "version = attr: localstack_ext.__version__" "version = ${version}"
36 cat setup.cfg
37
38 substituteInPlace setup.cfg \
39 --replace "dill==0.3.2" "dill~=0.3.0" \
40 --replace "requests>=2.20.0,<2.26" "requests~=2.20"
41 '';
42
43 propagatedBuildInputs = [
44 dill
45 dnslib
46 dnspython
47 plux
48 pyaes
49 python-jose
50 requests
51 tabulate
52 ];
53
54 pythonImportsCheck = [ "localstack_ext" ];
55
56 # No tests in repo
57 doCheck = false;
58
59 passthru.tests = {
60 inherit localstack;
61 };
62
63 meta = with lib; {
64 description = "Extensions for LocalStack";
65 homepage = "https://github.com/localstack/localstack";
66 license = licenses.asl20;
67 maintainers = [ ];
68 };
69}