1{ 2 lib, 3 aiohttp, 4 aioredis, 5 buildPythonPackage, 6 coloredlogs, 7 fastapi, 8 fetchFromGitHub, 9 hatchling, 10 pillow, 11 psutil, 12 pytestCheckHook, 13 pythonOlder, 14 redis, 15 requests, 16 ujson, 17 uvicorn, 18 watchdog, 19}: 20 21buildPythonPackage rec { 22 pname = "pytelegrambotapi"; 23 version = "4.27.0"; 24 pyproject = true; 25 26 disabled = pythonOlder "3.9"; 27 28 src = fetchFromGitHub { 29 owner = "eternnoir"; 30 repo = "pyTelegramBotAPI"; 31 tag = version; 32 hash = "sha256-UozVUdqNxxwWTBoq7ekr8ZX5KdkvQj+SiNSwebVXblI="; 33 }; 34 35 build-system = [ hatchling ]; 36 37 optional-dependencies = { 38 json = [ ujson ]; 39 PIL = [ pillow ]; 40 redis = [ redis ]; 41 aioredis = [ aioredis ]; 42 aiohttp = [ aiohttp ]; 43 fastapi = [ fastapi ]; 44 uvicorn = [ uvicorn ]; 45 psutil = [ psutil ]; 46 coloredlogs = [ coloredlogs ]; 47 watchdog = [ watchdog ]; 48 }; 49 50 checkInputs = 51 [ 52 pytestCheckHook 53 requests 54 ] 55 ++ optional-dependencies.watchdog 56 ++ optional-dependencies.aiohttp; 57 58 pythonImportsCheck = [ "telebot" ]; 59 60 meta = with lib; { 61 description = "Python implementation for the Telegram Bot API"; 62 homepage = "https://github.com/eternnoir/pyTelegramBotAPI"; 63 changelog = "https://github.com/eternnoir/pyTelegramBotAPI/releases/tag/${src.tag}"; 64 license = licenses.gpl2Only; 65 maintainers = with maintainers; [ das_j ]; 66 }; 67}