Clone of https://github.com/NixOS/nixpkgs.git (to stress-test knotserver)
1{ 2 lib, 3 anyio, 4 buildPythonPackage, 5 fetchFromGitHub, 6 hishel, 7 httpx, 8 poetry-core, 9 pydantic, 10 pyjwt, 11 pytest-cov-stub, 12 pytest-xdist, 13 pytestCheckHook, 14 pythonOlder, 15 typing-extensions, 16}: 17 18buildPythonPackage rec { 19 pname = "githubkit"; 20 version = "0.13.0"; 21 pyproject = true; 22 23 disabled = pythonOlder "3.9"; 24 25 src = fetchFromGitHub { 26 owner = "yanyongyu"; 27 repo = "githubkit"; 28 tag = "v${version}"; 29 hash = "sha256-BhTGik8JZ9QxE8zmfgToU7rVkY8T5iykJx4Bg4evyzY="; 30 }; 31 32 pythonRelaxDeps = [ "hishel" ]; 33 34 build-system = [ poetry-core ]; 35 36 dependencies = [ 37 hishel 38 httpx 39 pydantic 40 typing-extensions 41 ]; 42 43 optional-dependencies = { 44 all = [ 45 anyio 46 pyjwt 47 ]; 48 jwt = [ pyjwt ]; 49 auth-app = [ pyjwt ]; 50 auth-oauth-device = [ anyio ]; 51 auth = [ 52 anyio 53 pyjwt 54 ]; 55 }; 56 57 nativeCheckInputs = [ 58 pytestCheckHook 59 pytest-cov-stub 60 pytest-xdist 61 ] 62 ++ lib.flatten (builtins.attrValues optional-dependencies); 63 64 pythonImportsCheck = [ "githubkit" ]; 65 66 disabledTests = [ 67 # Tests require network access 68 "test_graphql" 69 "test_async_graphql" 70 "test_call" 71 "test_async_call" 72 "test_versioned_call" 73 "test_versioned_async_call" 74 ]; 75 76 meta = { 77 description = "GitHub SDK for Python"; 78 homepage = "https://github.com/yanyongyu/githubkit"; 79 changelog = "https://github.com/yanyongyu/githubkit/releases/tag/${src.tag}"; 80 license = lib.licenses.mit; 81 maintainers = with lib.maintainers; [ kranzes ]; 82 }; 83}