2024-06-05 15:53:02 +00:00
|
|
|
{
|
|
|
|
lib,
|
|
|
|
buildPythonPackage,
|
|
|
|
fetchPypi,
|
2024-10-09 16:51:18 +00:00
|
|
|
setuptools,
|
2024-06-05 15:53:02 +00:00
|
|
|
setuptools-scm,
|
2024-10-09 16:51:18 +00:00
|
|
|
django,
|
2024-06-05 15:53:02 +00:00
|
|
|
djangorestframework,
|
2024-10-09 16:51:18 +00:00
|
|
|
inflection,
|
|
|
|
packaging,
|
|
|
|
pytz,
|
|
|
|
pyyaml,
|
|
|
|
uritemplate,
|
2024-06-05 15:53:02 +00:00
|
|
|
datadiff,
|
2024-10-09 16:51:18 +00:00
|
|
|
dj-database-url,
|
|
|
|
pytest-django,
|
|
|
|
pytestCheckHook,
|
2020-04-24 23:36:52 +00:00
|
|
|
}:
|
|
|
|
|
|
|
|
buildPythonPackage rec {
|
|
|
|
pname = "drf-yasg";
|
2023-10-09 19:29:22 +00:00
|
|
|
version = "1.21.7";
|
2024-10-09 16:51:18 +00:00
|
|
|
pyproject = true;
|
2020-04-24 23:36:52 +00:00
|
|
|
|
|
|
|
src = fetchPypi {
|
|
|
|
inherit pname version;
|
2023-10-09 19:29:22 +00:00
|
|
|
hash = "sha256-TDuTBos9/KaWmrERFV5N1vey1oC5h3jej9Rgt4N72w0=";
|
2020-04-24 23:36:52 +00:00
|
|
|
};
|
|
|
|
|
2021-04-05 15:23:46 +00:00
|
|
|
postPatch = ''
|
|
|
|
# https://github.com/axnsan12/drf-yasg/pull/710
|
2022-08-12 12:06:08 +00:00
|
|
|
sed -i "/packaging/d" requirements/base.txt
|
2021-04-05 15:23:46 +00:00
|
|
|
'';
|
|
|
|
|
2024-10-09 16:51:18 +00:00
|
|
|
build-system = [
|
|
|
|
setuptools
|
|
|
|
setuptools-scm
|
|
|
|
];
|
2020-04-24 23:36:52 +00:00
|
|
|
|
2024-10-09 16:51:18 +00:00
|
|
|
dependencies = [
|
|
|
|
django
|
2020-04-24 23:36:52 +00:00
|
|
|
djangorestframework
|
2024-10-09 16:51:18 +00:00
|
|
|
inflection
|
|
|
|
packaging
|
|
|
|
pytz
|
|
|
|
pyyaml
|
|
|
|
uritemplate
|
2020-04-24 23:36:52 +00:00
|
|
|
];
|
|
|
|
|
2023-02-02 18:25:31 +00:00
|
|
|
nativeCheckInputs = [
|
2021-04-05 15:23:46 +00:00
|
|
|
pytestCheckHook
|
|
|
|
pytest-django
|
|
|
|
datadiff
|
2024-10-09 16:51:18 +00:00
|
|
|
dj-database-url
|
2021-04-05 15:23:46 +00:00
|
|
|
];
|
|
|
|
|
2024-10-09 16:51:18 +00:00
|
|
|
env.DJANGO_SETTINGS_MODULE = "testproj.settings.local";
|
|
|
|
|
|
|
|
preCheck = ''
|
|
|
|
cd testproj
|
|
|
|
'';
|
|
|
|
|
|
|
|
# a lot of libraries are missing
|
2021-04-05 15:23:46 +00:00
|
|
|
doCheck = false;
|
|
|
|
|
|
|
|
pythonImportsCheck = [ "drf_yasg" ];
|
|
|
|
|
2021-01-15 22:18:51 +00:00
|
|
|
meta = with lib; {
|
2020-04-24 23:36:52 +00:00
|
|
|
description = "Generation of Swagger/OpenAPI schemas for Django REST Framework";
|
|
|
|
homepage = "https://github.com/axnsan12/drf-yasg";
|
2024-07-31 10:19:44 +00:00
|
|
|
maintainers = [ ];
|
2020-04-24 23:36:52 +00:00
|
|
|
license = licenses.bsd3;
|
|
|
|
};
|
|
|
|
}
|