1{
2 lib,
3 aiofiles,
4 aiohttp,
5 aiohttp-socks,
6 aresponses,
7 babel,
8 buildPythonPackage,
9 certifi,
10 fetchFromGitHub,
11 gitUpdater,
12 hatchling,
13 magic-filter,
14 pycryptodomex,
15 pydantic,
16 pytest-aiohttp,
17 pytest-asyncio,
18 pytest-lazy-fixture,
19 pytestCheckHook,
20 pythonOlder,
21 pythonRelaxDepsHook,
22 pytz,
23 redis,
24}:
25
26buildPythonPackage rec {
27 pname = "aiogram";
28 version = "3.6.0";
29 pyproject = true;
30
31 disabled = pythonOlder "3.8";
32
33 src = fetchFromGitHub {
34 owner = "aiogram";
35 repo = "aiogram";
36 rev = "refs/tags/v${version}";
37 hash = "sha256-8hbB6/j9mWONFNpQuC3p91xnHR/74TWA9Cq8E+Gsnlw=";
38 };
39
40 build-system = [ hatchling ];
41
42 nativeBuildInputs = [ pythonRelaxDepsHook ];
43
44 pythonRelaxDeps = [ "pydantic" ];
45
46 dependencies = [
47 aiofiles
48 aiohttp
49 babel
50 certifi
51 magic-filter
52 pydantic
53 ];
54
55 nativeCheckInputs = [
56 aiohttp-socks
57 aresponses
58 pycryptodomex
59 pytest-aiohttp
60 pytest-asyncio
61 pytest-lazy-fixture
62 pytestCheckHook
63 pytz
64 redis
65 ];
66
67 pytestFlagsArray = [
68 "-W"
69 "ignore::pluggy.PluggyTeardownRaisedWarning"
70 "-W"
71 "ignore::pytest.PytestDeprecationWarning"
72 "-W"
73 "ignore::DeprecationWarning"
74 ];
75
76 pythonImportsCheck = [ "aiogram" ];
77
78 passthru.updateScript = gitUpdater { rev-prefix = "v"; };
79
80 meta = with lib; {
81 description = "Modern and fully asynchronous framework for Telegram Bot API";
82 homepage = "https://github.com/aiogram/aiogram";
83 changelog = "https://github.com/aiogram/aiogram/releases/tag/v${version}";
84 license = licenses.mit;
85 maintainers = with maintainers; [ sikmir ];
86 };
87}