python3Packages.drf-standardized-errors: init at 0.14.1
This commit is contained in:
parent
d1eb0a9cae
commit
f2cd48bb9c
@ -0,0 +1,66 @@
|
||||
{
|
||||
lib,
|
||||
buildPythonPackage,
|
||||
fetchFromGitHub,
|
||||
fetchpatch,
|
||||
flit-core,
|
||||
django,
|
||||
djangorestframework,
|
||||
drf-spectacular,
|
||||
inflection,
|
||||
pytestCheckHook,
|
||||
pytest-django,
|
||||
django-filter,
|
||||
}:
|
||||
|
||||
buildPythonPackage rec {
|
||||
pname = "drf-standardized-errors";
|
||||
version = "0.14.1";
|
||||
pyproject = true;
|
||||
|
||||
src = fetchFromGitHub {
|
||||
owner = "ghazi-git";
|
||||
repo = "drf-standardized-errors";
|
||||
tag = "v${version}";
|
||||
hash = "sha256-Gr4nj2dd0kZTc4IbLhb0i3CnY+VZaNnr3YJctyxIgQU=";
|
||||
};
|
||||
|
||||
patches = [
|
||||
# fix test_openapi_utils test
|
||||
(fetchpatch {
|
||||
url = "https://github.com/ghazi-git/drf-standardized-errors/pull/96/commits/4a2b1be3c97cd6db50543e6ff0303c0df0731d8a.patch";
|
||||
hash = "sha256-8+zVzBX7yDGfpsyvj61auqV+zdG6mIyj2LtR3D8l4jc=";
|
||||
})
|
||||
];
|
||||
|
||||
build-system = [ flit-core ];
|
||||
|
||||
dependencies = [
|
||||
django
|
||||
djangorestframework
|
||||
];
|
||||
|
||||
nativeCheckInputs = [
|
||||
pytestCheckHook
|
||||
pytest-django
|
||||
django-filter
|
||||
drf-spectacular
|
||||
];
|
||||
|
||||
env.DJANGO_SETTINGS_MODULE = "tests.settings";
|
||||
|
||||
pythonImportsCheck = [ "drf_standardized_errors" ];
|
||||
|
||||
optional-dependencies.openapi = [
|
||||
drf-spectacular
|
||||
inflection
|
||||
];
|
||||
|
||||
meta = with lib; {
|
||||
description = "Standardize your DRF API error responses";
|
||||
homepage = "https://github.com/ghazi-git/drf-standardized-errors";
|
||||
changelog = "https://github.com/ghazi-git/drf-standardized-errors/releases/tag/${src.tag}";
|
||||
license = licenses.mit;
|
||||
maintainers = with maintainers; [ erictapen ];
|
||||
};
|
||||
}
|
||||
@ -3926,6 +3926,8 @@ self: super: with self; {
|
||||
|
||||
drf-spectacular-sidecar = callPackage ../development/python-modules/drf-spectacular-sidecar { };
|
||||
|
||||
drf-standardized-errors = callPackage ../development/python-modules/drf-standardized-errors { };
|
||||
|
||||
drf-ujson2 = callPackage ../development/python-modules/drf-ujson2 { };
|
||||
|
||||
drf-writable-nested = callPackage ../development/python-modules/drf-writable-nested { };
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user