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