14 buildPythonPackage rec {
15 pname = "python-telegram";
19 disabled = pythonOlder "3.9";
21 src = fetchFromGitHub {
22 owner = "alexander-akhmetov";
23 repo = "python-telegram";
24 rev = "refs/tags/${version}";
25 hash = "sha256-JnU59DZXpnaZXIY/apXQ2gBgiwT12rJIeVqzaP0l7Zk=";
29 # Remove bundled libtdjson
32 substituteInPlace telegram/tdjson.py \
33 --replace-fail "ctypes.util.find_library(\"tdjson\")" \
34 "\"${tdlib}/lib/libtdjson${stdenv.hostPlatform.extensions.sharedLibrary}\""
37 build-inputs = [ setuptools ];
44 nativeCheckInputs = [ pytestCheckHook ];
46 disabledTests = [ "TestGetTdjsonTdlibPath" ];
48 pythonImportsCheck = [ "telegram.client" ];
51 description = "Python client for the Telegram's tdlib";
52 homepage = "https://github.com/alexander-akhmetov/python-telegram";
53 changelog = "https://github.com/alexander-akhmetov/python-telegram/releases/tag/${version}";
54 license = licenses.mit;
55 maintainers = with maintainers; [ sikmir ];