2024-06-05 15:53:02 +00:00
|
|
|
{
|
|
|
|
stdenv,
|
|
|
|
lib,
|
|
|
|
buildPythonPackage,
|
|
|
|
fetchFromGitHub,
|
|
|
|
fetchpatch,
|
|
|
|
isPy27,
|
|
|
|
pytestCheckHook,
|
|
|
|
autoconf271,
|
|
|
|
automake,
|
|
|
|
cmake,
|
|
|
|
gcc,
|
|
|
|
libtool,
|
|
|
|
perl,
|
|
|
|
setuptools,
|
|
|
|
simplejson,
|
2021-10-01 09:20:50 +00:00
|
|
|
}:
|
2021-04-08 16:26:57 +00:00
|
|
|
|
|
|
|
buildPythonPackage rec {
|
|
|
|
pname = "awslambdaric";
|
2024-07-27 06:49:29 +00:00
|
|
|
version = "2.0.11";
|
2024-01-13 08:15:51 +00:00
|
|
|
pyproject = true;
|
|
|
|
|
2021-04-08 16:26:57 +00:00
|
|
|
disabled = isPy27;
|
|
|
|
|
|
|
|
src = fetchFromGitHub {
|
|
|
|
owner = "aws";
|
|
|
|
repo = "aws-lambda-python-runtime-interface-client";
|
2023-11-16 04:20:00 +00:00
|
|
|
rev = "refs/tags/${version}";
|
2024-07-27 06:49:29 +00:00
|
|
|
sha256 = "sha256-9DiUpgeL4bY7G3b5R06FjpN0st03F84fj0bhp70moKo=";
|
2021-04-08 16:26:57 +00:00
|
|
|
};
|
|
|
|
|
2021-10-01 09:20:50 +00:00
|
|
|
patches = [
|
|
|
|
(fetchpatch {
|
|
|
|
# https://github.com/aws/aws-lambda-python-runtime-interface-client/pull/58
|
|
|
|
url = "https://github.com/aws/aws-lambda-python-runtime-interface-client/commit/162c3c0051bb9daa92e4a2a4af7e90aea60ee405.patch";
|
|
|
|
sha256 = "09qqq5x6npc9jw2qbhzifqn5sqiby4smiin1aw30psmlp21fv7j8";
|
|
|
|
})
|
|
|
|
];
|
|
|
|
|
2021-08-08 23:34:03 +00:00
|
|
|
postPatch = ''
|
|
|
|
substituteInPlace requirements/base.txt \
|
|
|
|
--replace 'simplejson==3' 'simplejson~=3'
|
|
|
|
'';
|
|
|
|
|
2021-04-08 16:26:57 +00:00
|
|
|
propagatedBuildInputs = [ simplejson ];
|
|
|
|
|
2024-06-05 15:53:02 +00:00
|
|
|
nativeBuildInputs = [
|
|
|
|
autoconf271
|
|
|
|
automake
|
|
|
|
cmake
|
|
|
|
libtool
|
|
|
|
perl
|
|
|
|
setuptools
|
|
|
|
];
|
2021-04-08 16:26:57 +00:00
|
|
|
|
|
|
|
buildInputs = [ gcc ];
|
|
|
|
|
|
|
|
dontUseCmakeConfigure = true;
|
|
|
|
|
2023-02-02 18:25:31 +00:00
|
|
|
nativeCheckInputs = [ pytestCheckHook ];
|
2021-04-08 16:26:57 +00:00
|
|
|
|
2022-07-18 16:21:45 +00:00
|
|
|
disabledTests = [
|
|
|
|
# Test fails with: Assertion error
|
|
|
|
"test_handle_event_request_fault_exception_logging_syntax_error"
|
|
|
|
];
|
|
|
|
|
2024-06-05 15:53:02 +00:00
|
|
|
pythonImportsCheck = [
|
|
|
|
"awslambdaric"
|
|
|
|
"runtime_client"
|
|
|
|
];
|
2021-04-08 16:26:57 +00:00
|
|
|
|
|
|
|
meta = with lib; {
|
2022-06-16 17:23:12 +00:00
|
|
|
broken = (stdenv.isLinux && stdenv.isAarch64);
|
2021-04-08 16:26:57 +00:00
|
|
|
description = "AWS Lambda Runtime Interface Client for Python";
|
|
|
|
homepage = "https://github.com/aws/aws-lambda-python-runtime-interface-client";
|
|
|
|
license = licenses.asl20;
|
|
|
|
maintainers = with maintainers; [ austinbutler ];
|
|
|
|
platforms = platforms.linux;
|
|
|
|
};
|
|
|
|
}
|