python3Packages.orjson: Disable failing tests on 32 bit
[NixPkgs.git] / pkgs / development / python-modules / telethon / default.nix
blob71df98720834e9eab0ba5df60030e9b34da3253a
1 { lib
2 , buildPythonPackage
3 , fetchFromGitHub
4 , openssl
5 , rsa
6 , pyaes
7 , pythonOlder
8 , setuptools
9 , pytest-asyncio
10 , pytestCheckHook
13 buildPythonPackage rec {
14   pname = "telethon";
15   version = "1.25.1";
16   format = "pyproject";
17   disabled = pythonOlder "3.5";
19   src = fetchFromGitHub {
20     owner = "LonamiWebs";
21     repo = "Telethon";
22     rev = "refs/tags/v${version}";
23     hash = "sha256-xmFoCUqYo600RH72KWG/aM7hKGiTYdCBsbPOFipxIzA=";
24   };
26   patchPhase = ''
27     substituteInPlace telethon/crypto/libssl.py --replace \
28       "ctypes.util.find_library('ssl')" "'${lib.getLib openssl}/lib/libssl.so'"
29   '';
31   nativeBuildInputs = [
32     setuptools
33   ];
35   propagatedBuildInputs = [
36     rsa
37     pyaes
38   ];
40   checkInputs = [
41     pytest-asyncio
42     pytestCheckHook
43   ];
45   pytestFlagsArray = [
46     "tests/telethon"
47   ];
49   meta = with lib; {
50     homepage = "https://github.com/LonamiWebs/Telethon";
51     description = "Full-featured Telegram client library for Python 3";
52     license = licenses.mit;
53     maintainers = with maintainers; [ nyanloutre ];
54   };