1{ 2 lib, 3 buildPythonPackage, 4 dj-rest-auth, 5 django, 6 django-allauth, 7 django-filter, 8 django-oauth-toolkit, 9 django-polymorphic, 10 django-rest-auth, 11 django-rest-polymorphic, 12 djangorestframework, 13 djangorestframework-camel-case, 14 djangorestframework-dataclasses, 15 djangorestframework-recursive, 16 djangorestframework-simplejwt, 17 drf-jwt, 18 drf-nested-routers, 19 drf-spectacular-sidecar, 20 fetchFromGitHub, 21 fetchpatch, 22 inflection, 23 jsonschema, 24 psycopg2, 25 pytest-django, 26 pytestCheckHook, 27 pythonOlder, 28 pyyaml, 29 setuptools, 30 uritemplate, 31}: 32 33buildPythonPackage rec { 34 pname = "drf-spectacular"; 35 version = "0.27.2"; 36 pyproject = true; 37 38 disabled = pythonOlder "3.7"; 39 40 src = fetchFromGitHub { 41 owner = "tfranzel"; 42 repo = "drf-spectacular"; 43 rev = "refs/tags/${version}"; 44 hash = "sha256-lOgFDkAY+PqSeyLSvWFT7KPVicSJZxd6yl17GAGHbRs="; 45 }; 46 47 patches = [ 48 (fetchpatch { 49 # https://github.com/tfranzel/drf-spectacular/pull/1090 50 url = "https://github.com/tfranzel/drf-spectacular/commit/8db4c2458f8403c53db0db352dd94057d285814b.patch"; 51 hash = "sha256-Ue5y7IB4ie+9CEineMBgMMCLGiF4zqmn60TJvKsV1h0="; 52 }) 53 ]; 54 55 build-system = [ setuptools ]; 56 57 dependencies = [ 58 django 59 djangorestframework 60 inflection 61 jsonschema 62 pyyaml 63 uritemplate 64 ]; 65 66 nativeCheckInputs = [ 67 dj-rest-auth 68 django-allauth 69 django-filter 70 django-oauth-toolkit 71 django-polymorphic 72 django-rest-auth 73 django-rest-polymorphic 74 djangorestframework-camel-case 75 djangorestframework-dataclasses 76 djangorestframework-recursive 77 djangorestframework-simplejwt 78 drf-jwt 79 drf-nested-routers 80 drf-spectacular-sidecar 81 psycopg2 82 pytest-django 83 pytestCheckHook 84 ]; 85 86 disabledTests = [ 87 # Test requires django with gdal 88 "test_rest_framework_gis" 89 # Outdated test artifact 90 "test_pydantic_decoration" 91 "test_knox_auth_token" 92 ]; 93 94 pythonImportsCheck = [ "drf_spectacular" ]; 95 96 meta = with lib; { 97 description = "Sane and flexible OpenAPI 3 schema generation for Django REST framework"; 98 homepage = "https://github.com/tfranzel/drf-spectacular"; 99 changelog = "https://github.com/tfranzel/drf-spectacular/releases/tag/${version}"; 100 license = licenses.bsd3; 101 maintainers = with maintainers; [ ]; 102 }; 103}