1{ 2 lib, 3 buildPythonPackage, 4 fetchFromGitHub, 5 djangorestframework, 6 setuptools, 7}: 8 9buildPythonPackage rec { 10 pname = "djangorestframework-dataclasses"; 11 version = "1.4.0"; 12 pyproject = true; 13 14 src = fetchFromGitHub { 15 owner = "oxan"; 16 repo = "djangorestframework-dataclasses"; 17 tag = "v${version}"; 18 hash = "sha256-nUkR5xTyeBv7ziJ6Mej9TKvMOa5/k+ELBqt4BVam/wk="; 19 }; 20 21 build-system = [ setuptools ]; 22 23 postPatch = '' 24 patchShebangs manage.py 25 ''; 26 27 dependencies = [ djangorestframework ]; 28 29 checkPhase = '' 30 runHook preCheck 31 32 ./manage.py test 33 34 runHook postCheck 35 ''; 36 37 pythonImportsCheck = [ "rest_framework_dataclasses" ]; 38 39 meta = { 40 changelog = "https://github.com/oxan/djangorestframework-dataclasses/blob/${src.tag}/CHANGELOG.rst"; 41 description = "Dataclasses serializer for Django REST framework"; 42 homepage = "https://github.com/oxan/djangorestframework-dataclasses"; 43 license = lib.licenses.bsd3; 44 maintainers = [ ]; 45 }; 46}