at master 1.8 kB view raw
1{ 2 lib, 3 aiodns, 4 aiofiles, 5 aiohttp-socks, 6 aiohttp, 7 aresponses, 8 babel, 9 buildPythonPackage, 10 certifi, 11 cryptography, 12 fetchFromGitHub, 13 gitUpdater, 14 hatchling, 15 magic-filter, 16 motor, 17 pycryptodomex, 18 pydantic, 19 pymongo, 20 pytest-aiohttp, 21 pytest-asyncio, 22 pytest-lazy-fixture, 23 pytestCheckHook, 24 pythonOlder, 25 pytz, 26 redis, 27 uvloop, 28}: 29 30buildPythonPackage rec { 31 pname = "aiogram"; 32 version = "3.22.0"; 33 pyproject = true; 34 35 disabled = pythonOlder "3.9"; 36 37 src = fetchFromGitHub { 38 owner = "aiogram"; 39 repo = "aiogram"; 40 tag = "v${version}"; 41 hash = "sha256-4LZ4+bt9n0q8WMaMEaAAIFnEuDUSd+Aq+YW49Xbcp5c="; 42 }; 43 44 build-system = [ hatchling ]; 45 46 pythonRelaxDeps = [ "aiohttp" ]; 47 48 dependencies = [ 49 aiofiles 50 aiohttp 51 certifi 52 magic-filter 53 pydantic 54 ]; 55 56 optional-dependencies = { 57 fast = [ 58 aiodns 59 uvloop 60 ]; 61 mongo = [ 62 motor 63 pymongo 64 ]; 65 redis = [ redis ]; 66 proxy = [ aiohttp-socks ]; 67 i18n = [ babel ]; 68 signature = [ cryptography ]; 69 }; 70 71 nativeCheckInputs = [ 72 aresponses 73 pycryptodomex 74 pytest-aiohttp 75 pytest-asyncio 76 pytest-lazy-fixture 77 pytestCheckHook 78 pytz 79 ] 80 ++ lib.flatten (builtins.attrValues optional-dependencies); 81 82 pythonImportsCheck = [ "aiogram" ]; 83 84 passthru.updateScript = gitUpdater { 85 rev-prefix = "v"; 86 ignoredVersions = "4.1"; 87 }; 88 89 __darwinAllowLocalNetworking = true; 90 91 meta = { 92 description = "Modern and fully asynchronous framework for Telegram Bot API"; 93 homepage = "https://github.com/aiogram/aiogram"; 94 changelog = "https://github.com/aiogram/aiogram/releases/tag/${src.tag}"; 95 license = lib.licenses.mit; 96 maintainers = with lib.maintainers; [ sikmir ]; 97 }; 98}