Files
nixpkgs/pkgs/development/python-modules/drf-yasg/default.nix
T
Ihar Hrachyshka 567e8dfd8e treewide: clean up 'meta = with' pattern
This commit was created by a combination of scripts and tools:
- an ast-grep script to prefix things in meta with `lib.`,
- a modified nixf-diagnose / nixf combination to remove unused `with
lib;`, and
- regular nixfmt.

Co-authored-by: Wolfgang Walther <walther@technowledgy.de>
2025-12-10 18:09:49 +01:00

75 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.10";
pyproject = true;
src = fetchPypi {
inherit pname version;
hash = "sha256-+G1Q+u48MfzsRUWYWocfgyNmx/tbd7YsSAidVuz0+NQ=";
};
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 = {
description = "Generation of Swagger/OpenAPI schemas for Django REST Framework";
homepage = "https://github.com/axnsan12/drf-yasg";
maintainers = [ ];
license = lib.licenses.bsd3;
};
}