at master 1.4 kB view raw
1{ 2 lib, 3 aiosqlite, 4 buildPythonPackage, 5 fetchFromGitHub, 6 fetchpatch2, 7 hatchling, 8 pyaes, 9 pysocks, 10 pytest-asyncio, 11 pytestCheckHook, 12 pythonOlder, 13}: 14 15buildPythonPackage rec { 16 pname = "hydrogram"; 17 version = "0.2.0"; 18 pyproject = true; 19 20 disabled = pythonOlder "3.7"; 21 22 src = fetchFromGitHub { 23 owner = "hydrogram"; 24 repo = "hydrogram"; 25 tag = "v${version}"; 26 hash = "sha256-QpweUDCypTxOOWL08gCUuMgbuE4130iNyxRpUNuSBac="; 27 }; 28 29 patches = [ 30 (fetchpatch2 { 31 name = "fix-async-in-test.patch"; 32 excludes = [ ".github/workflows/code-style.yml" ]; 33 url = "https://github.com/hydrogram/hydrogram/commit/7431319a1d990aa838012bd566a9746da7df2a6e.patch"; 34 hash = "sha256-MPv13cxnNPDD+p9EPjDPFqydGy57oXzLeRxL3lG8JKU="; 35 }) 36 ]; 37 38 build-system = [ hatchling ]; 39 40 dependencies = [ 41 pyaes 42 pysocks 43 aiosqlite 44 ]; 45 46 nativeCheckInputs = [ 47 pytestCheckHook 48 pytest-asyncio 49 ]; 50 51 pythonImportsCheck = [ 52 "hydrogram" 53 "hydrogram.errors" 54 "hydrogram.types" 55 ]; 56 57 meta = with lib; { 58 description = "Asynchronous Telegram MTProto API framework for fluid user and bot interactions"; 59 homepage = "https://github.com/hydrogram/hydrogram"; 60 changelog = "https://github.com/hydrogram/hydrogram/releases/tag/${src.tag}"; 61 license = licenses.lgpl3Plus; 62 maintainers = with maintainers; [ tholo ]; 63 }; 64}