forked from 39bit/spoilerobot
-
Notifications
You must be signed in to change notification settings - Fork 2
/
Copy pathtelethon.nix
46 lines (38 loc) · 1.07 KB
/
telethon.nix
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
{ lib , buildPythonPackage , fetchFromGitHub , openssl , rsa , pyaes , pythonOlder , setuptools , pytest-asyncio , pytestCheckHook }:
buildPythonPackage rec {
pname = "telethon";
version = "1.33.1";
format = "pyproject";
disabled = pythonOlder "3.5";
src = fetchFromGitHub {
owner = "LonamiWebs";
repo = "Telethon";
rev = "refs/tags/v${version}";
hash = "sha256:1b125xhppwjz3rd5xarmwciwcxznjl08f93m226331kwa1ywca1z";
};
patchPhase = ''
substituteInPlace telethon/crypto/libssl.py --replace \
"ctypes.util.find_library('ssl')" "'${lib.getLib openssl}/lib/libssl.so'"
'';
nativeBuildInputs = [
setuptools
];
propagatedBuildInputs = [
rsa
pyaes
];
# this is fine
# nativeCheckInputs = [
# pytest-asyncio
# pytestCheckHook
# ];
# pytestFlagsArray = [
# "tests/telethon"
# ];
meta = with lib; {
homepage = "https://github.com/LonamiWebs/Telethon";
description = "Full-featured Telegram client library for Python 3";
license = licenses.mit;
maintainers = with maintainers; [ nyanloutre ];
};
}