1{ 2 lib, 3 buildPythonPackage, 4 fetchFromGitHub, 5 fetchpatch, 6 flit-core, 7 django, 8 djangorestframework, 9 drf-spectacular, 10 inflection, 11 pytestCheckHook, 12 pytest-django, 13 django-filter, 14}: 15 16buildPythonPackage rec { 17 pname = "drf-standardized-errors"; 18 version = "0.15.0"; 19 pyproject = true; 20 21 src = fetchFromGitHub { 22 owner = "ghazi-git"; 23 repo = "drf-standardized-errors"; 24 tag = "v${version}"; 25 hash = "sha256-OM1bTqM3yQSPuerTrq5FKTf5eKpZsF6/QgupMtnnT4Q="; 26 }; 27 28 build-system = [ flit-core ]; 29 30 dependencies = [ 31 django 32 djangorestframework 33 ]; 34 35 nativeCheckInputs = [ 36 pytestCheckHook 37 pytest-django 38 django-filter 39 drf-spectacular 40 ]; 41 42 env.DJANGO_SETTINGS_MODULE = "tests.settings"; 43 44 pythonImportsCheck = [ "drf_standardized_errors" ]; 45 46 optional-dependencies.openapi = [ 47 drf-spectacular 48 inflection 49 ]; 50 51 meta = with lib; { 52 description = "Standardize your DRF API error responses"; 53 homepage = "https://github.com/ghazi-git/drf-standardized-errors"; 54 changelog = "https://github.com/ghazi-git/drf-standardized-errors/releases/tag/${src.tag}"; 55 license = licenses.mit; 56 maintainers = with maintainers; [ erictapen ]; 57 }; 58}