mirror of
https://github.com/NixOS/nixpkgs.git
synced 2026-07-19 07:01:12 +00:00
67 lines
1.3 KiB
Nix
67 lines
1.3 KiB
Nix
{
|
|
lib,
|
|
buildPythonPackage,
|
|
fetchFromGitHub,
|
|
django,
|
|
dj-database-url,
|
|
inflection,
|
|
pydantic,
|
|
pytestCheckHook,
|
|
pytest-django,
|
|
djangorestframework,
|
|
pyyaml,
|
|
syrupy,
|
|
typing-extensions,
|
|
uritemplate,
|
|
uv-build,
|
|
}:
|
|
|
|
buildPythonPackage rec {
|
|
pname = "django-pydantic-field";
|
|
version = "0.5.4";
|
|
pyproject = true;
|
|
|
|
src = fetchFromGitHub {
|
|
owner = "surenkov";
|
|
repo = "django-pydantic-field";
|
|
tag = "v${version}";
|
|
hash = "sha256-pnB6kYfN67102Z3R41BHIWnWoJQgd/ixyT+bbtY9PC8=";
|
|
};
|
|
|
|
postPatch = ''
|
|
substituteInPlace pyproject.toml \
|
|
--replace-fail "uv_build>=0.9.17,<0.10.0" uv_build
|
|
'';
|
|
|
|
build-system = [ uv-build ];
|
|
|
|
dependencies = [
|
|
django
|
|
pydantic
|
|
typing-extensions
|
|
];
|
|
|
|
nativeCheckInputs = [
|
|
pytestCheckHook
|
|
pytest-django
|
|
djangorestframework
|
|
dj-database-url
|
|
inflection
|
|
pyyaml
|
|
syrupy
|
|
uritemplate
|
|
];
|
|
|
|
preCheck = ''
|
|
export DJANGO_SETTINGS_MODULE=tests.settings.django_test_settings
|
|
'';
|
|
|
|
meta = {
|
|
changelog = "https://github.com/surenkov/django-pydantic-field/releases/tag/${src.tag}";
|
|
description = "Django JSONField with Pydantic models as a Schema";
|
|
homepage = "https://github.com/surenkov/django-pydantic-field";
|
|
maintainers = with lib.maintainers; [ kiara ];
|
|
license = lib.licenses.mit;
|
|
};
|
|
}
|