1{
2 lib,
3 buildPythonPackage,
4 pythonOlder,
5 fetchFromGitHub,
6 setuptools,
7 pytestCheckHook,
8}:
9
10buildPythonPackage rec {
11 pname = "tgcrypto";
12 version = "1.2.5";
13
14 disabled = pythonOlder "3.6";
15
16 format = "pyproject";
17
18 src = fetchFromGitHub {
19 owner = "pyrogram";
20 repo = "tgcrypto";
21 tag = "v${version}";
22 hash = "sha256-u+mXzkmM79NBi4oHnb32RbN9WPnba/cm1q2Ko0uNEZg=";
23 };
24
25 nativeBuildInputs = [ setuptools ];
26
27 nativeCheckInputs = [ pytestCheckHook ];
28
29 pythonImportsCheck = [ "tgcrypto" ];
30
31 meta = with lib; {
32 description = "Fast and Portable Telegram Crypto Library for Python";
33 homepage = "https://github.com/pyrogram/tgcrypto";
34 license = licenses.lgpl3Plus;
35 maintainers = with maintainers; [ dotlambda ];
36 };
37}