1{ 2 lib, 3 buildPythonPackage, 4 fetchFromGitHub, 5 6 # build-system 7 poetry-core, 8 setuptools, 9 10 # dependencies 11 asgiref, 12 django, 13 strawberry-graphql, 14 15 # optional-dependencies 16 django-debug-toolbar, 17 django-choices-field, 18 19 # check inputs 20 pytestCheckHook, 21 django-guardian, 22 django-model-utils, 23 django-mptt, 24 django-polymorphic, 25 django-tree-queries, 26 factory-boy, 27 pillow, 28 psycopg2, 29 pytest-asyncio, 30 pytest-cov-stub, 31 pytest-django, 32 pytest-mock, 33 pytest-snapshot, 34}: 35 36buildPythonPackage rec { 37 pname = "strawberry-django"; 38 version = "0.65.1"; 39 pyproject = true; 40 41 src = fetchFromGitHub { 42 owner = "strawberry-graphql"; 43 repo = "strawberry-django"; 44 tag = "v${version}"; 45 hash = "sha256-cX/eG6qWe/h9U4p1pMhhI+bZ5pLmiwGeYxNthKvdI6o="; 46 }; 47 48 postPatch = '' 49 # django.core.exceptions.ImproperlyConfigured: You're using the staticfiles app without having set the required STATIC_URL setting. 50 echo 'STATIC_URL = "static/"' >> tests/django_settings.py 51 ''; 52 53 build-system = [ 54 poetry-core 55 setuptools 56 ]; 57 58 dependencies = [ 59 django 60 asgiref 61 strawberry-graphql 62 ]; 63 64 optional-dependencies = { 65 debug-toolbar = [ django-debug-toolbar ]; 66 enum = [ django-choices-field ]; 67 }; 68 69 nativeCheckInputs = [ 70 pytestCheckHook 71 72 django-guardian 73 django-model-utils 74 django-mptt 75 django-polymorphic 76 django-tree-queries 77 factory-boy 78 pillow 79 psycopg2 80 pytest-asyncio 81 pytest-cov-stub 82 pytest-django 83 pytest-mock 84 pytest-snapshot 85 ] 86 ++ optional-dependencies.debug-toolbar 87 ++ optional-dependencies.enum; 88 89 pythonImportsCheck = [ "strawberry_django" ]; 90 91 meta = { 92 description = "Strawberry GraphQL Django extension"; 93 homepage = "https://github.com/strawberry-graphql/strawberry-django"; 94 changelog = "https://github.com/strawberry-graphql/strawberry-django/blob/${src.tag}/CHANGELOG.md"; 95 license = lib.licenses.mit; 96 maintainers = with lib.maintainers; [ minijackson ]; 97 }; 98}