2021-02-05 17:12:51 +00:00
|
|
|
{ lib
|
2021-04-12 18:23:04 +00:00
|
|
|
, APScheduler
|
2020-04-24 23:36:52 +00:00
|
|
|
, buildPythonPackage
|
|
|
|
, certifi
|
2020-05-15 21:57:56 +00:00
|
|
|
, decorator
|
2021-04-12 18:23:04 +00:00
|
|
|
, fetchPypi
|
2020-04-24 23:36:52 +00:00
|
|
|
, future
|
2020-05-15 21:57:56 +00:00
|
|
|
, isPy3k
|
2021-04-12 18:23:04 +00:00
|
|
|
, tornado
|
|
|
|
, urllib3
|
2020-04-24 23:36:52 +00:00
|
|
|
}:
|
|
|
|
|
|
|
|
buildPythonPackage rec {
|
|
|
|
pname = "python-telegram-bot";
|
2021-04-12 18:23:04 +00:00
|
|
|
version = "13.4.1";
|
2020-05-15 21:57:56 +00:00
|
|
|
disabled = !isPy3k;
|
2020-04-24 23:36:52 +00:00
|
|
|
|
|
|
|
src = fetchPypi {
|
|
|
|
inherit pname version;
|
2021-04-12 18:23:04 +00:00
|
|
|
sha256 = "141w3701jjl460702xddqvi3hswp24jnkl6cakvz2aqrmcyxq7sc";
|
2020-04-24 23:36:52 +00:00
|
|
|
};
|
|
|
|
|
2021-04-12 18:23:04 +00:00
|
|
|
propagatedBuildInputs = [
|
|
|
|
APScheduler
|
|
|
|
certifi
|
|
|
|
decorator
|
|
|
|
future
|
|
|
|
tornado
|
|
|
|
urllib3
|
|
|
|
];
|
2020-04-24 23:36:52 +00:00
|
|
|
|
2020-05-15 21:57:56 +00:00
|
|
|
# --with-upstream-urllib3 is not working properly
|
|
|
|
postPatch = ''
|
2021-03-09 03:18:52 +00:00
|
|
|
rm -r telegram/vendor
|
|
|
|
|
|
|
|
substituteInPlace requirements.txt \
|
|
|
|
--replace 'APScheduler==3.6.3' 'APScheduler'
|
2020-04-24 23:36:52 +00:00
|
|
|
'';
|
2021-04-12 18:23:04 +00:00
|
|
|
|
2020-05-15 21:57:56 +00:00
|
|
|
setupPyGlobalFlags = "--with-upstream-urllib3";
|
2020-04-24 23:36:52 +00:00
|
|
|
|
|
|
|
# tests not included with release
|
|
|
|
doCheck = false;
|
2020-05-15 21:57:56 +00:00
|
|
|
pythonImportsCheck = [ "telegram" ];
|
2020-04-24 23:36:52 +00:00
|
|
|
|
2021-01-15 22:18:51 +00:00
|
|
|
meta = with lib; {
|
2021-04-12 18:23:04 +00:00
|
|
|
description = "Python library to interface with the Telegram Bot API";
|
2020-04-24 23:36:52 +00:00
|
|
|
homepage = "https://python-telegram-bot.org";
|
2021-03-09 03:18:52 +00:00
|
|
|
license = licenses.lgpl3Only;
|
2020-04-24 23:36:52 +00:00
|
|
|
maintainers = with maintainers; [ veprbl pingiun ];
|
|
|
|
};
|
|
|
|
}
|