2022-09-14 18:05:37 +00:00
|
|
|
{ lib
|
|
|
|
, buildPythonPackage
|
|
|
|
, fetchPypi
|
2024-01-13 08:15:51 +00:00
|
|
|
|
|
|
|
# build-system
|
|
|
|
, setuptools
|
|
|
|
, plux
|
|
|
|
|
|
|
|
# dependencies
|
|
|
|
, cachetools
|
|
|
|
, click
|
|
|
|
, cryptography
|
2022-09-14 18:05:37 +00:00
|
|
|
, dill
|
|
|
|
, dnslib
|
|
|
|
, dnspython
|
2024-01-13 08:15:51 +00:00
|
|
|
, psutil
|
|
|
|
, python-dotenv
|
|
|
|
, pyyaml
|
2022-09-14 18:05:37 +00:00
|
|
|
, requests
|
2024-01-13 08:15:51 +00:00
|
|
|
, rich
|
|
|
|
, semver
|
|
|
|
, stevedore
|
|
|
|
, tailer
|
2022-10-30 15:09:59 +00:00
|
|
|
|
|
|
|
# Sensitive downstream dependencies
|
|
|
|
, localstack
|
2022-09-14 18:05:37 +00:00
|
|
|
}:
|
|
|
|
|
|
|
|
buildPythonPackage rec {
|
|
|
|
pname = "localstack-ext";
|
2024-04-21 15:54:59 +00:00
|
|
|
version = "3.2.0";
|
2024-01-13 08:15:51 +00:00
|
|
|
pyproject = true;
|
2022-09-14 18:05:37 +00:00
|
|
|
|
|
|
|
src = fetchPypi {
|
|
|
|
inherit pname version;
|
2024-04-21 15:54:59 +00:00
|
|
|
hash = "sha256-53pbt7kNaYQRsLb+OI8gLwR3cBE18ZKLZmG4aP1/93E=";
|
2022-09-14 18:05:37 +00:00
|
|
|
};
|
|
|
|
|
|
|
|
postPatch = ''
|
|
|
|
# Avoid circular dependency
|
|
|
|
sed -i '/localstack>=/d' setup.cfg
|
|
|
|
|
|
|
|
# Pip is unable to resolve attr logic, so it will emit version as 0.0.0
|
|
|
|
substituteInPlace setup.cfg \
|
|
|
|
--replace "version = attr: localstack_ext.__version__" "version = ${version}"
|
|
|
|
cat setup.cfg
|
|
|
|
|
|
|
|
substituteInPlace setup.cfg \
|
|
|
|
--replace "dill==0.3.2" "dill~=0.3.0" \
|
|
|
|
--replace "requests>=2.20.0,<2.26" "requests~=2.20"
|
|
|
|
'';
|
|
|
|
|
2024-01-13 08:15:51 +00:00
|
|
|
nativeBuildInputs = [
|
|
|
|
plux
|
|
|
|
setuptools
|
|
|
|
];
|
|
|
|
|
2022-09-14 18:05:37 +00:00
|
|
|
propagatedBuildInputs = [
|
2024-01-13 08:15:51 +00:00
|
|
|
cachetools
|
|
|
|
click
|
|
|
|
cryptography
|
2022-09-14 18:05:37 +00:00
|
|
|
dill
|
|
|
|
dnslib
|
|
|
|
dnspython
|
|
|
|
plux
|
2024-01-13 08:15:51 +00:00
|
|
|
psutil
|
|
|
|
python-dotenv
|
|
|
|
pyyaml
|
|
|
|
rich
|
2022-09-14 18:05:37 +00:00
|
|
|
requests
|
2024-01-13 08:15:51 +00:00
|
|
|
semver
|
|
|
|
stevedore
|
|
|
|
tailer
|
2022-09-14 18:05:37 +00:00
|
|
|
];
|
|
|
|
|
|
|
|
pythonImportsCheck = [ "localstack_ext" ];
|
|
|
|
|
|
|
|
# No tests in repo
|
|
|
|
doCheck = false;
|
|
|
|
|
2022-10-30 15:09:59 +00:00
|
|
|
passthru.tests = {
|
|
|
|
inherit localstack;
|
|
|
|
};
|
|
|
|
|
2022-09-14 18:05:37 +00:00
|
|
|
meta = with lib; {
|
|
|
|
description = "Extensions for LocalStack";
|
|
|
|
homepage = "https://github.com/localstack/localstack";
|
|
|
|
license = licenses.asl20;
|
|
|
|
maintainers = with maintainers; [ jonringer ];
|
|
|
|
};
|
|
|
|
}
|