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