depot/third_party/nixpkgs/pkgs/development/python-modules/pyTelegramBotAPI/default.nix
Default email 5e7c2d6cef Project import generated by Copybara.
GitOrigin-RevId: f99e5f03cc0aa231ab5950a15ed02afec45ed51a
2023-10-09 21:29:22 +02:00

83 lines
1.4 KiB
Nix

{ lib
, aiohttp
, aioredis
, buildPythonPackage
, coloredlogs
, fastapi
, fetchFromGitHub
, pillow
, psutil
, pytestCheckHook
, pythonOlder
, redis
, requests
, ujson
, uvicorn
, watchdog
}:
buildPythonPackage rec {
pname = "pytelegrambotapi";
version = "4.14.0";
format = "setuptools";
disabled = pythonOlder "3.7";
src = fetchFromGitHub {
owner = "eternnoir";
repo = "pyTelegramBotAPI";
rev = "refs/tags/${version}";
hash = "sha256-R52j4JnoM0nlZvlcDox2Wz3WjTEstNaqbg8SPiPHD4c=";
};
passthru.optional-dependencies = {
json = [
ujson
];
PIL = [
pillow
];
redis = [
redis
];
aioredis = [
aioredis
];
aiohttp = [
aiohttp
];
fastapi = [
fastapi
];
uvicorn = [
uvicorn
];
psutil = [
psutil
];
coloredlogs = [
coloredlogs
];
watchdog = [
watchdog
];
};
checkInputs = [
pytestCheckHook
requests
] ++ passthru.optional-dependencies.watchdog
++ passthru.optional-dependencies.aiohttp;
pythonImportsCheck = [
"telebot"
];
meta = with lib; {
description = "Python implementation for the Telegram Bot API";
homepage = "https://github.com/eternnoir/pyTelegramBotAPI";
changelog = "https://github.com/eternnoir/pyTelegramBotAPI/releases/tag/${version}";
license = licenses.gpl2Only;
maintainers = with maintainers; [ das_j ];
};
}