Files
nixpkgs/pkgs/development/python-modules/pyTelegramBotAPI/default.nix
Ihar Hrachyshka 567e8dfd8e treewide: clean up 'meta = with' pattern
This commit was created by a combination of scripts and tools:
- an ast-grep script to prefix things in meta with `lib.`,
- a modified nixf-diagnose / nixf combination to remove unused `with
lib;`, and
- regular nixfmt.

Co-authored-by: Wolfgang Walther <walther@technowledgy.de>
2025-12-10 18:09:49 +01:00

67 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.29.1";
pyproject = true;
disabled = pythonOlder "3.9";
src = fetchFromGitHub {
owner = "eternnoir";
repo = "pyTelegramBotAPI";
tag = version;
hash = "sha256-djiuIHTcPiKIfMxFevCa4c3V8ydGpSqH4mo0qH+Cpw8=";
};
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 = {
description = "Python implementation for the Telegram Bot API";
homepage = "https://github.com/eternnoir/pyTelegramBotAPI";
changelog = "https://github.com/eternnoir/pyTelegramBotAPI/releases/tag/${src.tag}";
license = lib.licenses.gpl2Only;
maintainers = with lib.maintainers; [ das_j ];
};
}