From cecfde44e6f68395abb2fef79cfb84d153f0296e Mon Sep 17 00:00:00 2001 From: ivegotasthma Date: Mon, 12 Aug 2019 21:53:25 +0200 Subject: [PATCH] pythonPackages.drf-yasg: init at 1.16.1 --- .../python-modules/coreapi/default.nix | 4 +- .../python-modules/coreschema/default.nix | 4 +- .../python-modules/drf-yasg/default.nix | 40 +++++++++++++++++++ pkgs/top-level/python-packages.nix | 2 + 4 files changed, 46 insertions(+), 4 deletions(-) create mode 100644 pkgs/development/python-modules/drf-yasg/default.nix diff --git a/pkgs/development/python-modules/coreapi/default.nix b/pkgs/development/python-modules/coreapi/default.nix index 0bbaa0b1b51d..216d1ee69850 100644 --- a/pkgs/development/python-modules/coreapi/default.nix +++ b/pkgs/development/python-modules/coreapi/default.nix @@ -31,8 +31,8 @@ buildPythonPackage rec { checkInputs = [ pytest ]; checkPhase = '' - mv coreapi coreapi.hidden - pytest tests + cd ./tests + pytest ''; meta = with stdenv.lib; { diff --git a/pkgs/development/python-modules/coreschema/default.nix b/pkgs/development/python-modules/coreschema/default.nix index ba836f78a6e9..949fa31df958 100644 --- a/pkgs/development/python-modules/coreschema/default.nix +++ b/pkgs/development/python-modules/coreschema/default.nix @@ -21,8 +21,8 @@ buildPythonPackage rec { checkInputs = [ pytest ]; checkPhase = '' - mv coreschema coreschema.hidden - pytest tests + cd ./tests + pytest ''; meta = with stdenv.lib; { diff --git a/pkgs/development/python-modules/drf-yasg/default.nix b/pkgs/development/python-modules/drf-yasg/default.nix new file mode 100644 index 000000000000..707b1e5bc6e2 --- /dev/null +++ b/pkgs/development/python-modules/drf-yasg/default.nix @@ -0,0 +1,40 @@ +{ + stdenv, + buildPythonPackage, + fetchPypi, + inflection, + ruamel_yaml, + setuptools_scm, + six, + coreapi, + djangorestframework, +}: + +buildPythonPackage rec { + pname = "drf-yasg"; + version = "1.16.1"; + + src = fetchPypi { + inherit pname version; + sha256 = "0ri5h5xsacm99c6gvb4ldwisbqgiv2vq8qbn7vrh6vplzlpyvzb8"; + }; + + nativeBuildInputs = [ + setuptools_scm + ]; + + propagatedBuildInputs = [ + six + inflection + ruamel_yaml + coreapi + djangorestframework + ]; + + meta = with stdenv.lib; { + description = "Generation of Swagger/OpenAPI schemas for Django REST Framework"; + homepage = https://github.com/axnsan12/drf-yasg; + maintainers = with maintainers; [ ivegotasthma ]; + license = licenses.bsd3; + }; +} diff --git a/pkgs/top-level/python-packages.nix b/pkgs/top-level/python-packages.nix index c6f073711c77..d3ee05a8b255 100644 --- a/pkgs/top-level/python-packages.nix +++ b/pkgs/top-level/python-packages.nix @@ -2168,6 +2168,8 @@ in { urllib3 = callPackage ../development/python-modules/urllib3 {}; + drf-yasg = callPackage ../development/python-modules/drf-yasg { }; + dropbox = callPackage ../development/python-modules/dropbox {}; drms = callPackage ../development/python-modules/drms { };