depot/third_party/nixpkgs/pkgs/development/python-modules/drf-yasg/default.nix
Default email 24fdeddc0a Project import generated by Copybara.
GitOrigin-RevId: 2768c7d042a37de65bb1b5b3268fc987e534c49d
2024-10-23 09:41:50 +03: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.8";
pyproject = true;
src = fetchPypi {
inherit pname version;
hash = "sha256-y7f4HD0UDyIHOStLxd3mU4TutY4bfuoabWQd7C9zUqk=";
};
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;
};
}