Merge pull request #327392 from wegank/localstack-fix

python312Packages.localstack: fix build
This commit is contained in:
Weijia Wang 2024-08-04 02:28:41 +03:00 committed by GitHub
commit 3f44ade8e8
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

View File

@ -4,8 +4,10 @@
fetchFromGitHub,
apispec,
boto3,
build,
cachetools,
click,
cryptography,
localstack-client,
localstack-ext,
plux,
@ -22,7 +24,7 @@
buildPythonPackage rec {
pname = "localstack";
version = "3.5.0";
format = "setuptools";
pyproject = true;
src = fetchFromGitHub {
owner = "localstack";
@ -31,18 +33,13 @@ buildPythonPackage rec {
hash = "sha256-Sd5B4+pvUwNXfP3hsqBkUoHo06YyzUGCUHzc8f77Vx4=";
};
postPatch = ''
substituteInPlace setup.cfg \
--replace "requests>=2.20.0,<2.26" "requests~=2.20" \
--replace "cachetools~=5.0.0" "cachetools~=5.0" \
--replace "boto3>=1.20,<1.25.0" "boto3~=1.20"
'';
propagatedBuildInputs = [
dependencies = [
apispec
boto3
build
cachetools
click
cryptography
localstack-client
localstack-ext
plux
@ -56,13 +53,20 @@ buildPythonPackage rec {
tailer
];
pythonRelaxDeps = [ "dill" ];
pythonImportsCheck = [ "localstack" ];
# Test suite requires boto, which has been removed from nixpkgs
# Just do minimal test, buildPythonPackage maps checkPhase
# to installCheckPhase, so we can test that entrypoint point works.
checkPhase = ''
runHook preCheck
export HOME=$(mktemp -d)
$out/bin/localstack --version
runHook postCheck
'';
meta = with lib; {