1{ lib
2, buildPythonPackage
3, fetchFromGitHub
4, poetry-core
5, poetry-dynamic-versioning
6, aiobotocore
7, chalice
8, cryptography
9, boto3
10, pytestCheckHook
11, pytest-asyncio
12, requests
13, aiofiles
14, moto
15, dill
16}:
17
18buildPythonPackage rec {
19 pname = "aioboto3";
20 version = "11.3.0";
21 pyproject = true;
22
23 src = fetchFromGitHub {
24 owner = "terrycain";
25 repo = "aioboto3";
26 rev = "v${version}";
27 hash = "sha256-jU9sKhbUdVeOvOXQnXR/S/4sBwTNcQCc9ZduO+HDXho=";
28 };
29
30 postPatch = ''
31 substituteInPlace pyproject.toml \
32 --replace poetry.masonry.api poetry.core.masonry.api \
33 --replace "poetry>=0.12" "poetry-core>=0.12"
34 '';
35
36 nativeBuildInputs = [
37 poetry-core
38 poetry-dynamic-versioning
39 ];
40
41 propagatedBuildInputs = [
42 aiobotocore
43 boto3
44 ];
45
46 passthru.optional-dependencies = {
47 chalice = [
48 chalice
49 ];
50 s3cse = [
51 cryptography
52 ];
53 };
54
55 nativeCheckInputs = [
56 pytestCheckHook
57 pytest-asyncio
58 requests
59 aiofiles
60 moto
61 dill
62 ] ++ lib.flatten (builtins.attrValues passthru.optional-dependencies);
63
64 pythonImportsCheck = [ "aioboto3" ];
65
66 meta = with lib; {
67 description = "Wrapper to use boto3 resources with the aiobotocore async backend";
68 homepage = "https://github.com/terrycain/aioboto3";
69 changelog = "https://github.com/terrycain/aioboto3/blob/${src.rev}/CHANGELOG.rst";
70 license = licenses.asl20;
71 maintainers = with maintainers; [ mbalatsko ];
72 };
73}