depot/third_party/nixpkgs/pkgs/development/python-modules/pyTelegramBotAPI/default.nix
Default email 472aeafc57 Project import generated by Copybara.
GitOrigin-RevId: c31898adf5a8ed202ce5bea9f347b1c6871f32d1
2024-10-04 18:56:33 +02:00

64 lines
1.3 KiB
Nix

{
lib,
aiohttp,
aioredis,
buildPythonPackage,
coloredlogs,
fastapi,
fetchFromGitHub,
hatchling,
pillow,
psutil,
pytestCheckHook,
pythonOlder,
redis,
requests,
ujson,
uvicorn,
watchdog,
}:
buildPythonPackage rec {
pname = "pytelegrambotapi";
version = "4.23.0";
pyproject = true;
disabled = pythonOlder "3.7";
src = fetchFromGitHub {
owner = "eternnoir";
repo = "pyTelegramBotAPI";
rev = "refs/tags/${version}";
hash = "sha256-R/RbkiKkhcZd17hgDJnEpr3OCVMvn744YM+lmzSXKWs=";
};
build-system = [ hatchling ];
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
] ++ optional-dependencies.watchdog ++ 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 ];
};
}