1{
2 lib,
3 buildPythonPackage,
4 fetchFromGitHub,
5 django,
6 dj-database-url,
7 inflection,
8 pydantic,
9 pytestCheckHook,
10 pytest-django,
11 djangorestframework,
12 pyyaml,
13 setuptools,
14 syrupy,
15 uritemplate,
16}:
17
18buildPythonPackage rec {
19 pname = "django-pydantic-field";
20 version = "0.3.13";
21 pyproject = true;
22
23 src = fetchFromGitHub {
24 owner = "surenkov";
25 repo = "django-pydantic-field";
26 tag = "v${version}";
27 hash = "sha256-RxZxDQZdFiT67YcAQtf4t42XU3XfzT3KS7ZCyfHZUOs=";
28 };
29
30 build-system = [ setuptools ];
31
32 dependencies = [
33 django
34 pydantic
35 ];
36
37 nativeCheckInputs = [
38 pytestCheckHook
39 pytest-django
40 djangorestframework
41 dj-database-url
42 inflection
43 pyyaml
44 syrupy
45 uritemplate
46 ];
47
48 preCheck = ''
49 export DJANGO_SETTINGS_MODULE=tests.settings.django_test_settings
50 '';
51
52 meta = with lib; {
53 changelog = "https://github.com/surenkov/django-pydantic-field/releases/tag/${src.tag}";
54 description = "Django JSONField with Pydantic models as a Schema";
55 homepage = "https://github.com/surenkov/django-pydantic-field";
56 maintainers = with lib.maintainers; [ kiara ];
57 license = licenses.mit;
58 };
59}