summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorivegotasthma <ivegotasthma@protonmail.com>2019-08-12 21:53:25 +0200
committerivegotasthma <ivegotasthma@protonmail.com>2019-08-14 23:52:20 +0200
commitcecfde44e6f68395abb2fef79cfb84d153f0296e (patch)
treee5f2c62b3797730bd6f19ed5a89bdf1c283b7687
parentpythonPackages.itypes: init at 1.1.0 (diff)
downloadnixpkgs-cecfde44e6f68395abb2fef79cfb84d153f0296e.tar.gz
pythonPackages.drf-yasg: init at 1.16.1
-rw-r--r--pkgs/development/python-modules/coreapi/default.nix4
-rw-r--r--pkgs/development/python-modules/coreschema/default.nix4
-rw-r--r--pkgs/development/python-modules/drf-yasg/default.nix40
-rw-r--r--pkgs/top-level/python-packages.nix2
4 files changed, 46 insertions, 4 deletions
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 { };