1{ lib
2, buildPythonPackage
3, pythonOlder
4, fetchFromGitHub
5, pytestCheckHook
6}:
7
8buildPythonPackage rec {
9 pname = "tgcrypto";
10 version = "1.2.2";
11
12 disabled = pythonOlder "3.6";
13
14 src = fetchFromGitHub {
15 owner = "pyrogram";
16 repo = "tgcrypto";
17 rev = "v${version}";
18 sha256 = "1vyjycjb2n790371kf47qc0mkvd4bxmhh65cfxjsrcjpiri7shjf";
19 };
20
21 checkInputs = [
22 pytestCheckHook
23 ];
24
25 pythonImportsCheck = [ "tgcrypto" ];
26
27 meta = with lib; {
28 description = "Fast and Portable Telegram Crypto Library for Python";
29 homepage = "https://github.com/pyrogram/tgcrypto";
30 license = licenses.lgpl3Plus;
31 maintainers = with maintainers; [ dotlambda ];
32 };
33}