1{ 2 lib, 3 aiohttp, 4 asgiref, 5 buildPythonPackage, 6 chalice, 7 channels, 8 daphne, 9 django, 10 email-validator, 11 fastapi, 12 fetchFromGitHub, 13 flask, 14 freezegun, 15 graphql-core, 16 inline-snapshot, 17 libcst, 18 opentelemetry-api, 19 opentelemetry-sdk, 20 poetry-core, 21 pydantic, 22 pygments, 23 pyinstrument, 24 pytest-aiohttp, 25 pytest-asyncio, 26 pytest-django, 27 pytest-emoji, 28 pytest-flask, 29 pytest-mock, 30 pytest-snapshot, 31 pytestCheckHook, 32 python-dateutil, 33 python-multipart, 34 pythonOlder, 35 rich, 36 sanic, 37 sanic-testing, 38 starlette, 39 typing-extensions, 40 uvicorn, 41 typer, 42 graphlib-backport, 43}: 44 45buildPythonPackage rec { 46 pname = "strawberry-graphql"; 47 version = "0.278.0"; 48 pyproject = true; 49 50 disabled = pythonOlder "3.10"; 51 52 src = fetchFromGitHub { 53 owner = "strawberry-graphql"; 54 repo = "strawberry"; 55 tag = version; 56 hash = "sha256-GNjjSD40fhbMqfvuYSuP3tU8lfOqBGJIsoGWZCfj6C4="; 57 }; 58 59 postPatch = '' 60 substituteInPlace pyproject.toml \ 61 --replace-fail "--emoji" "" \ 62 ''; 63 64 build-system = [ poetry-core ]; 65 66 dependencies = [ 67 graphql-core 68 python-dateutil 69 typing-extensions 70 ]; 71 72 optional-dependencies = { 73 aiohttp = [ 74 aiohttp 75 pytest-aiohttp 76 ]; 77 asgi = [ 78 starlette 79 python-multipart 80 ]; 81 debug = [ 82 rich 83 libcst 84 ]; 85 debug-server = [ 86 typer 87 libcst 88 pygments 89 python-multipart 90 rich 91 starlette 92 uvicorn 93 ]; 94 django = [ 95 django 96 pytest-django 97 asgiref 98 ]; 99 channels = [ 100 channels 101 asgiref 102 ]; 103 flask = [ 104 flask 105 pytest-flask 106 ]; 107 opentelemetry = [ 108 opentelemetry-api 109 opentelemetry-sdk 110 ]; 111 pydantic = [ pydantic ]; 112 sanic = [ sanic ]; 113 fastapi = [ 114 fastapi 115 python-multipart 116 ]; 117 chalice = [ chalice ]; 118 cli = [ 119 pygments 120 rich 121 libcst 122 typer 123 graphlib-backport 124 ]; 125 # starlite = [ starlite ]; 126 # litestar = [ litestar ]; 127 pyinstrument = [ pyinstrument ]; 128 }; 129 130 nativeCheckInputs = [ 131 daphne 132 email-validator 133 freezegun 134 inline-snapshot 135 pytest-asyncio 136 pytest-emoji 137 pytest-mock 138 pytest-snapshot 139 pytestCheckHook 140 sanic-testing 141 ] 142 ++ lib.flatten (builtins.attrValues optional-dependencies); 143 144 pythonImportsCheck = [ "strawberry" ]; 145 146 disabledTestPaths = [ 147 "tests/benchmarks/" 148 "tests/cli/" 149 "tests/django/test_dataloaders.py" 150 "tests/exceptions/" 151 "tests/experimental/pydantic/test_fields.py" 152 "tests/http/" 153 "tests/schema/extensions/" 154 "tests/schema/test_dataloaders.py" 155 "tests/schema/test_lazy/" 156 "tests/sanic/test_file_upload.py" 157 "tests/test_dataloaders.py" 158 "tests/utils/test_pretty_print.py" 159 "tests/websockets/test_graphql_transport_ws.py" 160 "tests/litestar/" 161 ]; 162 163 __darwinAllowLocalNetworking = true; 164 165 meta = with lib; { 166 description = "GraphQL library for Python that leverages type annotations"; 167 homepage = "https://strawberry.rocks"; 168 changelog = "https://github.com/strawberry-graphql/strawberry/blob/${src.tag}/CHANGELOG.md"; 169 license = licenses.mit; 170 maintainers = with maintainers; [ izorkin ]; 171 mainProgram = "strawberry"; 172 }; 173}