nixpkgs mirror (for testing) github.com/NixOS/nixpkgs
nix
at r-updates 66 lines 1.3 kB view raw
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 syrupy, 14 typing-extensions, 15 uritemplate, 16 uv-build, 17}: 18 19buildPythonPackage rec { 20 pname = "django-pydantic-field"; 21 version = "0.5.4"; 22 pyproject = true; 23 24 src = fetchFromGitHub { 25 owner = "surenkov"; 26 repo = "django-pydantic-field"; 27 tag = "v${version}"; 28 hash = "sha256-pnB6kYfN67102Z3R41BHIWnWoJQgd/ixyT+bbtY9PC8="; 29 }; 30 31 postPatch = '' 32 substituteInPlace pyproject.toml \ 33 --replace-fail "uv_build>=0.9.17,<0.10.0" uv_build 34 ''; 35 36 build-system = [ uv-build ]; 37 38 dependencies = [ 39 django 40 pydantic 41 typing-extensions 42 ]; 43 44 nativeCheckInputs = [ 45 pytestCheckHook 46 pytest-django 47 djangorestframework 48 dj-database-url 49 inflection 50 pyyaml 51 syrupy 52 uritemplate 53 ]; 54 55 preCheck = '' 56 export DJANGO_SETTINGS_MODULE=tests.settings.django_test_settings 57 ''; 58 59 meta = { 60 changelog = "https://github.com/surenkov/django-pydantic-field/releases/tag/${src.tag}"; 61 description = "Django JSONField with Pydantic models as a Schema"; 62 homepage = "https://github.com/surenkov/django-pydantic-field"; 63 maintainers = with lib.maintainers; [ kiara ]; 64 license = lib.licenses.mit; 65 }; 66}