depot/third_party/nixpkgs/pkgs/development/python-modules/drf-yasg/default.nix
Default email 555cd8a8f9 Project import generated by Copybara.
GitOrigin-RevId: 5633bcff0c6162b9e4b5f1264264611e950c8ec7
2024-10-09 18:51:18 +02:00

74 lines
1.2 KiB
Nix

{
lib,
buildPythonPackage,
fetchPypi,
setuptools,
setuptools-scm,
django,
djangorestframework,
inflection,
packaging,
pytz,
pyyaml,
uritemplate,
datadiff,
dj-database-url,
pytest-django,
pytestCheckHook,
}:
buildPythonPackage rec {
pname = "drf-yasg";
version = "1.21.7";
pyproject = true;
src = fetchPypi {
inherit pname version;
hash = "sha256-TDuTBos9/KaWmrERFV5N1vey1oC5h3jej9Rgt4N72w0=";
};
postPatch = ''
# https://github.com/axnsan12/drf-yasg/pull/710
sed -i "/packaging/d" requirements/base.txt
'';
build-system = [
setuptools
setuptools-scm
];
dependencies = [
django
djangorestframework
inflection
packaging
pytz
pyyaml
uritemplate
];
nativeCheckInputs = [
pytestCheckHook
pytest-django
datadiff
dj-database-url
];
env.DJANGO_SETTINGS_MODULE = "testproj.settings.local";
preCheck = ''
cd testproj
'';
# a lot of libraries are missing
doCheck = false;
pythonImportsCheck = [ "drf_yasg" ];
meta = with lib; {
description = "Generation of Swagger/OpenAPI schemas for Django REST Framework";
homepage = "https://github.com/axnsan12/drf-yasg";
maintainers = [ ];
license = licenses.bsd3;
};
}