Merge pull request #307098 from r-ryantm/auto-update/cilium-cli
[NixPkgs.git] / pkgs / development / python-modules / awslambdaric / default.nix
blob75e8897a7144c8c2b8d8cbf0ff41c42fa8c23d3a
1 { stdenv
2 , lib
3 , buildPythonPackage
4 , fetchFromGitHub
5 , fetchpatch
6 , isPy27
7 , pytestCheckHook
8 , autoconf271
9 , automake
10 , cmake
11 , gcc
12 , libtool
13 , perl
14 , setuptools
15 , simplejson
18 buildPythonPackage rec {
19   pname = "awslambdaric";
20   version = "2.0.10";
21   pyproject = true;
23   disabled = isPy27;
25   src = fetchFromGitHub {
26     owner = "aws";
27     repo = "aws-lambda-python-runtime-interface-client";
28     rev = "refs/tags/${version}";
29     sha256 = "sha256-tvTN6gV73Qnbe4OBHtfxt4jXV32fMTPE4H79WIkgkxE=";
30   };
32   patches = [
33     (fetchpatch {
34       # https://github.com/aws/aws-lambda-python-runtime-interface-client/pull/58
35       url = "https://github.com/aws/aws-lambda-python-runtime-interface-client/commit/162c3c0051bb9daa92e4a2a4af7e90aea60ee405.patch";
36       sha256 = "09qqq5x6npc9jw2qbhzifqn5sqiby4smiin1aw30psmlp21fv7j8";
37     })
38   ];
40   postPatch = ''
41     substituteInPlace requirements/base.txt \
42       --replace 'simplejson==3' 'simplejson~=3'
43   '';
45   propagatedBuildInputs = [ simplejson ];
47   nativeBuildInputs = [ autoconf271 automake cmake libtool perl setuptools ];
49   buildInputs = [ gcc ];
51   dontUseCmakeConfigure = true;
53   nativeCheckInputs = [ pytestCheckHook ];
55   disabledTests = [
56     # Test fails with: Assertion error
57     "test_handle_event_request_fault_exception_logging_syntax_error"
58   ];
60   pythonImportsCheck = [ "awslambdaric" "runtime_client" ];
62   meta = with lib; {
63     broken = (stdenv.isLinux && stdenv.isAarch64);
64     description = "AWS Lambda Runtime Interface Client for Python";
65     homepage = "https://github.com/aws/aws-lambda-python-runtime-interface-client";
66     license = licenses.asl20;
67     maintainers = with maintainers; [ austinbutler ];
68     platforms = platforms.linux;
69   };