Files
nixpkgs/pkgs/development/python-modules/awslambdaric/default.nix
T
Sergei Trofimovich 24f0289b18 python3Packages.awslambdaric: pin to autoconf-2.71
Without the change `python3Packages.awslambdaric` fails the build
against `autoconf-2.72` as:

    python3.11-awslambdaric> checking curl version... 7.83.1
    python3.11-awslambdaric> ./configure: line 6673: syntax error near unexpected token `;;'
    python3.11-awslambdaric> ./configure: line 6673: ` ;;'

`python3Packages.awslambdaric` embeds tarballs of external dependencies
and is a bit tricky to patch. Let's pin it to a working version.
2024-01-13 21:35:09 +00:00

71 lines
1.7 KiB
Nix

{ stdenv
, lib
, buildPythonPackage
, fetchFromGitHub
, fetchpatch
, isPy27
, pytestCheckHook
, autoconf271
, automake
, cmake
, gcc
, libtool
, perl
, setuptools
, simplejson
}:
buildPythonPackage rec {
pname = "awslambdaric";
version = "2.0.8";
pyproject = true;
disabled = isPy27;
src = fetchFromGitHub {
owner = "aws";
repo = "aws-lambda-python-runtime-interface-client";
rev = "refs/tags/${version}";
sha256 = "sha256-0ej+Gy9nF96SaGhohHF9EJObSpHdxIe9QXHNHejVwbQ=";
};
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";
})
];
postPatch = ''
substituteInPlace requirements/base.txt \
--replace 'simplejson==3' 'simplejson~=3'
'';
propagatedBuildInputs = [ simplejson ];
nativeBuildInputs = [ autoconf271 automake cmake libtool perl setuptools ];
buildInputs = [ gcc ];
dontUseCmakeConfigure = true;
nativeCheckInputs = [ pytestCheckHook ];
disabledTests = [
# Test fails with: Assertion error
"test_handle_event_request_fault_exception_logging_syntax_error"
];
pythonImportsCheck = [ "awslambdaric" "runtime_client" ];
meta = with lib; {
broken = (stdenv.isLinux && stdenv.isAarch64);
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;
};
}