2022-09-14 18:05:37 +00:00
|
|
|
{ lib
|
|
|
|
, buildPythonPackage
|
|
|
|
, fetchFromGitHub
|
2024-01-13 08:15:51 +00:00
|
|
|
, setuptools
|
2022-09-14 18:05:37 +00:00
|
|
|
, apispec
|
|
|
|
, boto3
|
|
|
|
, cachetools
|
|
|
|
, click
|
|
|
|
, localstack-client
|
|
|
|
, localstack-ext
|
|
|
|
, plux
|
|
|
|
, psutil
|
|
|
|
, python-dotenv
|
|
|
|
, pyyaml
|
2023-02-02 18:25:31 +00:00
|
|
|
, packaging
|
2022-09-14 18:05:37 +00:00
|
|
|
, requests
|
|
|
|
, rich
|
|
|
|
, semver
|
|
|
|
, tailer
|
|
|
|
}:
|
|
|
|
|
|
|
|
buildPythonPackage rec {
|
|
|
|
pname = "localstack";
|
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 = fetchFromGitHub {
|
|
|
|
owner = "localstack";
|
|
|
|
repo = "localstack";
|
2023-01-20 10:41:00 +00:00
|
|
|
rev = "refs/tags/v${version}";
|
2024-04-21 15:54:59 +00:00
|
|
|
hash = "sha256-r0KRPtsLr6Pyn/va93reLdHHKtiOLB1uflAJ2L/uZmU=";
|
2022-09-14 18:05:37 +00:00
|
|
|
};
|
|
|
|
|
|
|
|
postPatch = ''
|
|
|
|
substituteInPlace setup.cfg \
|
|
|
|
--replace "requests>=2.20.0,<2.26" "requests~=2.20" \
|
2023-02-02 18:25:31 +00:00
|
|
|
--replace "cachetools~=5.0.0" "cachetools~=5.0" \
|
|
|
|
--replace "boto3>=1.20,<1.25.0" "boto3~=1.20"
|
2022-09-14 18:05:37 +00:00
|
|
|
'';
|
|
|
|
|
2024-01-13 08:15:51 +00:00
|
|
|
nativeBuildInputs = [
|
|
|
|
setuptools
|
|
|
|
];
|
|
|
|
|
2022-09-14 18:05:37 +00:00
|
|
|
propagatedBuildInputs = [
|
|
|
|
apispec
|
|
|
|
boto3
|
|
|
|
cachetools
|
|
|
|
click
|
|
|
|
localstack-client
|
|
|
|
localstack-ext
|
|
|
|
plux
|
|
|
|
psutil
|
|
|
|
python-dotenv
|
|
|
|
pyyaml
|
2023-02-02 18:25:31 +00:00
|
|
|
packaging
|
2022-09-14 18:05:37 +00:00
|
|
|
requests
|
|
|
|
rich
|
|
|
|
semver
|
|
|
|
tailer
|
|
|
|
];
|
|
|
|
|
|
|
|
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 = ''
|
|
|
|
$out/bin/localstack --version
|
|
|
|
'';
|
|
|
|
|
|
|
|
meta = with lib; {
|
|
|
|
description = "A fully functional local Cloud stack";
|
|
|
|
homepage = "https://github.com/localstack/localstack";
|
|
|
|
license = licenses.asl20;
|
|
|
|
maintainers = with maintainers; [ jonringer ];
|
|
|
|
};
|
|
|
|
}
|