1{ lib
2, buildPythonPackage
3, fetchPypi
4, inflection
5, ruamel-yaml
6, setuptools-scm
7, six
8, coreapi
9, djangorestframework
10, pytestCheckHook
11, pytest-django
12, datadiff
13}:
14
15buildPythonPackage rec {
16 pname = "drf-yasg";
17 version = "1.21.5";
18
19 src = fetchPypi {
20 inherit pname version;
21 hash = "sha256-zu8MO13EOJeBr9eG5tw2l68qL+DYck7h9jfCPXW7xbI=";
22 };
23
24 postPatch = ''
25 # https://github.com/axnsan12/drf-yasg/pull/710
26 sed -i "/packaging/d" requirements/base.txt
27 '';
28
29 nativeBuildInputs = [
30 setuptools-scm
31 ];
32
33 propagatedBuildInputs = [
34 six
35 inflection
36 ruamel-yaml
37 coreapi
38 djangorestframework
39 ];
40
41 nativeCheckInputs = [
42 pytestCheckHook
43 pytest-django
44 datadiff
45 ];
46
47 # ImportError: No module named 'testproj.settings'
48 doCheck = false;
49
50 pythonImportsCheck = [ "drf_yasg" ];
51
52 meta = with lib; {
53 description = "Generation of Swagger/OpenAPI schemas for Django REST Framework";
54 homepage = "https://github.com/axnsan12/drf-yasg";
55 maintainers = with maintainers; [ ];
56 license = licenses.bsd3;
57 };
58}