2021-01-25 09:26:54 +01:00
|
|
|
{ lib
|
2021-04-11 16:02:21 +02:00
|
|
|
, APScheduler
|
2018-10-25 14:13:59 -04:00
|
|
|
, buildPythonPackage
|
|
|
|
, certifi
|
2020-05-03 20:51:49 +02:00
|
|
|
, decorator
|
2021-04-11 16:02:21 +02:00
|
|
|
, fetchPypi
|
2018-10-25 14:13:59 -04:00
|
|
|
, future
|
2020-05-03 15:26:54 -04:00
|
|
|
, isPy3k
|
2021-04-11 16:02:21 +02:00
|
|
|
, tornado
|
|
|
|
, urllib3
|
2018-10-25 14:13:59 -04:00
|
|
|
}:
|
2018-01-18 11:22:53 -05:00
|
|
|
|
|
|
|
buildPythonPackage rec {
|
|
|
|
pname = "python-telegram-bot";
|
2021-04-11 16:02:21 +02:00
|
|
|
version = "13.4.1";
|
2020-05-03 15:26:54 -04:00
|
|
|
disabled = !isPy3k;
|
2018-01-18 11:22:53 -05:00
|
|
|
|
|
|
|
src = fetchPypi {
|
|
|
|
inherit pname version;
|
2021-04-11 16:02:21 +02:00
|
|
|
sha256 = "141w3701jjl460702xddqvi3hswp24jnkl6cakvz2aqrmcyxq7sc";
|
2018-01-18 11:22:53 -05:00
|
|
|
};
|
|
|
|
|
2021-04-11 16:02:21 +02:00
|
|
|
propagatedBuildInputs = [
|
|
|
|
APScheduler
|
|
|
|
certifi
|
|
|
|
decorator
|
|
|
|
future
|
|
|
|
tornado
|
|
|
|
urllib3
|
|
|
|
];
|
2020-05-03 20:51:49 +02:00
|
|
|
|
2020-05-03 15:27:29 -04:00
|
|
|
# --with-upstream-urllib3 is not working properly
|
|
|
|
postPatch = ''
|
2021-03-07 15:56:42 +01:00
|
|
|
rm -r telegram/vendor
|
|
|
|
|
|
|
|
substituteInPlace requirements.txt \
|
|
|
|
--replace 'APScheduler==3.6.3' 'APScheduler'
|
2020-05-03 15:27:29 -04:00
|
|
|
'';
|
2021-04-11 16:02:21 +02:00
|
|
|
|
2020-05-03 15:27:29 -04:00
|
|
|
setupPyGlobalFlags = "--with-upstream-urllib3";
|
2018-01-20 18:03:35 -05:00
|
|
|
|
2018-10-25 14:13:59 -04:00
|
|
|
# tests not included with release
|
2018-01-20 18:03:35 -05:00
|
|
|
doCheck = false;
|
2020-05-03 20:51:49 +02:00
|
|
|
pythonImportsCheck = [ "telegram" ];
|
2018-01-18 11:22:53 -05:00
|
|
|
|
2021-01-11 08:54:33 +01:00
|
|
|
meta = with lib; {
|
2021-04-11 16:02:21 +02:00
|
|
|
description = "Python library to interface with the Telegram Bot API";
|
2020-03-31 21:11:51 -04:00
|
|
|
homepage = "https://python-telegram-bot.org";
|
2021-03-07 15:56:42 +01:00
|
|
|
license = licenses.lgpl3Only;
|
2020-01-24 20:38:27 +01:00
|
|
|
maintainers = with maintainers; [ veprbl pingiun ];
|
2018-01-18 11:22:53 -05:00
|
|
|
};
|
|
|
|
}
|