1{ 2 lib, 3 buildPythonPackage, 4 fetchFromGitHub, 5 pythonOlder, 6 requests, 7 httpx, 8 pytestCheckHook, 9}: 10 11buildPythonPackage rec { 12 pname = "telegraph"; 13 version = "2.2.0"; 14 format = "setuptools"; 15 16 disabled = pythonOlder "3.7"; 17 18 src = fetchFromGitHub { 19 repo = "telegraph"; 20 owner = "python273"; 21 rev = "refs/tags/v${version}"; 22 hash = "sha256-xARX8lSOftNVYY4InR5vU4OiguCJJJZv/W76G9eLgNY="; 23 }; 24 25 propagatedBuildInputs = [ requests ]; 26 27 passthru.optional-dependencies = { 28 aio = [ httpx ]; 29 }; 30 31 nativeCheckInputs = [ pytestCheckHook ]; 32 33 pytestFlagsArray = [ "tests/" ]; 34 35 disabledTests = [ "test_get_page" ]; 36 37 doCheck = true; 38 39 pythonImportsCheck = [ "telegraph" ]; 40 41 meta = with lib; { 42 description = "Telegraph API wrapper"; 43 homepage = "https://github.com/python273/telegraph"; 44 changelog = "https://github.com/python273/telegraph/releases/tag/v${version}"; 45 license = licenses.mit; 46 maintainers = with maintainers; [ gp2112 ]; 47 }; 48}