1{ 2 lib, 3 buildPythonPackage, 4 fetchFromGitHub, 5 setuptools, 6 appdirs, 7 asgiref, 8 attrs, 9 black, 10 click, 11 django, 12 djangorestframework, 13 entrypoints, 14 flake8, 15 mccabe, 16 mypy, 17 mypy-extensions, 18 pycodestyle, 19 pyflakes, 20 pytz, 21 sqlparse, 22 toml, 23 typing-extensions, 24 25 # tests 26 pytestCheckHook, 27 pytest-django, 28}: 29 30buildPythonPackage rec { 31 pname = "drf-flex-fields"; 32 version = "1.0.2"; 33 pyproject = true; 34 35 src = fetchFromGitHub { 36 owner = "rsinger86"; 37 repo = "drf-flex-fields"; 38 tag = version; 39 hash = "sha256-+9ToxCEIDpsA+BK8Uk0VueVjoId41/S93+a716EGvCU="; 40 }; 41 42 patches = [ ./django4-compat.patch ]; 43 44 build-system = [ setuptools ]; 45 46 nativeCheckInputs = [ 47 django 48 djangorestframework 49 pytestCheckHook 50 pytest-django 51 ]; 52 53 preCheck = '' 54 export DJANGO_SETTINGS_MODULE=tests.settings 55 ''; 56 57 meta = { 58 changelog = "https://github.com/rsinger86/drf-flex-fields/releases/tag/${src.tag}"; 59 description = "Dynamically set fields and expand nested resources in Django REST Framework serializers"; 60 homepage = "https://github.com/rsinger86/drf-flex-fields"; 61 license = lib.licenses.mit; 62 maintainers = with lib.maintainers; [ hexa ]; 63 }; 64}