From 1a29857705b9c4c79b740045a0cef06e45674ea2 Mon Sep 17 00:00:00 2001 From: ivegotasthma Date: Mon, 12 Aug 2019 06:23:18 +0200 Subject: [PATCH 1/4] pythonPackages.coreschema: init at 0.0.4 --- .../python-modules/coreschema/default.nix | 34 +++++++++++++++++++ pkgs/top-level/python-packages.nix | 2 ++ 2 files changed, 36 insertions(+) create mode 100644 pkgs/development/python-modules/coreschema/default.nix diff --git a/pkgs/development/python-modules/coreschema/default.nix b/pkgs/development/python-modules/coreschema/default.nix new file mode 100644 index 000000000000..ba836f78a6e9 --- /dev/null +++ b/pkgs/development/python-modules/coreschema/default.nix @@ -0,0 +1,34 @@ +{ + stdenv, + fetchFromGitHub, + buildPythonPackage, + jinja2, + pytest, +}: + +buildPythonPackage rec { + pname = "coreschema"; + version = "0.0.4"; + + src = fetchFromGitHub { + repo = "python-coreschema"; + owner = "core-api"; + rev = version; + sha256 = "027pc753mkgbb3r1v1x7dsdaarq93drx0f79ppvw9pfkcjcq6wb1"; + }; + + propagatedBuildInputs = [ jinja2 ]; + + checkInputs = [ pytest ]; + checkPhase = '' + mv coreschema coreschema.hidden + pytest tests + ''; + + meta = with stdenv.lib; { + description = "Python client library for Core Schema"; + homepage = https://github.com/ivegotasthma/python-coreschema; + license = licenses.bsd3; + maintainers = with maintainers; [ ivegotasthma ]; + }; +} diff --git a/pkgs/top-level/python-packages.nix b/pkgs/top-level/python-packages.nix index 6b89401cb958..23d64541032a 100644 --- a/pkgs/top-level/python-packages.nix +++ b/pkgs/top-level/python-packages.nix @@ -1800,6 +1800,8 @@ in { cookies = callPackage ../development/python-modules/cookies { }; + coreschema = callPackage ../development/python-modules/coreschema { }; + coveralls = callPackage ../development/python-modules/coveralls { }; coverage = callPackage ../development/python-modules/coverage { }; From 4f25a125a7aeee62f0325ade460341a490832244 Mon Sep 17 00:00:00 2001 From: ivegotasthma Date: Mon, 12 Aug 2019 06:23:51 +0200 Subject: [PATCH 2/4] pythonPackages.coreapi: init at 2.3.3 --- .../python-modules/coreapi/default.nix | 44 +++++++++++++++++++ pkgs/top-level/python-packages.nix | 2 + 2 files changed, 46 insertions(+) create mode 100644 pkgs/development/python-modules/coreapi/default.nix diff --git a/pkgs/development/python-modules/coreapi/default.nix b/pkgs/development/python-modules/coreapi/default.nix new file mode 100644 index 000000000000..0bbaa0b1b51d --- /dev/null +++ b/pkgs/development/python-modules/coreapi/default.nix @@ -0,0 +1,44 @@ +{ + stdenv, + fetchFromGitHub, + buildPythonPackage, + django, + coreschema, + itypes, + uritemplate, + requests, + pytest, +}: + +buildPythonPackage rec { + pname = "coreapi"; + version = "2.3.3"; + + src = fetchFromGitHub { + repo = "python-client"; + owner = "core-api"; + rev = version; + sha256 = "1c6chm3q3hyn8fmjv23qgc79ai1kr3xvrrkp4clbqkssn10k7mcw"; + }; + + propagatedBuildInputs = [ + django + coreschema + itypes + uritemplate + requests + ]; + + checkInputs = [ pytest ]; + checkPhase = '' + mv coreapi coreapi.hidden + pytest tests + ''; + + meta = with stdenv.lib; { + description = "Python client library for Core API"; + homepage = https://github.com/core-api/python-client; + license = licenses.bsd3; + maintainers = with maintainers; [ ivegotasthma ]; + }; +} diff --git a/pkgs/top-level/python-packages.nix b/pkgs/top-level/python-packages.nix index 23d64541032a..bd1f503ddea2 100644 --- a/pkgs/top-level/python-packages.nix +++ b/pkgs/top-level/python-packages.nix @@ -1800,6 +1800,8 @@ in { cookies = callPackage ../development/python-modules/cookies { }; + coreapi = callPackage ../development/python-modules/coreapi { }; + coreschema = callPackage ../development/python-modules/coreschema { }; coveralls = callPackage ../development/python-modules/coveralls { }; From 413567990758333c3b6d90e455af629aba3593b4 Mon Sep 17 00:00:00 2001 From: ivegotasthma Date: Mon, 12 Aug 2019 06:24:12 +0200 Subject: [PATCH 3/4] pythonPackages.itypes: init at 1.1.0 --- .../python-modules/itypes/default.nix | 31 +++++++++++++++++++ pkgs/top-level/python-packages.nix | 2 ++ 2 files changed, 33 insertions(+) create mode 100644 pkgs/development/python-modules/itypes/default.nix diff --git a/pkgs/development/python-modules/itypes/default.nix b/pkgs/development/python-modules/itypes/default.nix new file mode 100644 index 000000000000..1386ba39a268 --- /dev/null +++ b/pkgs/development/python-modules/itypes/default.nix @@ -0,0 +1,31 @@ +{ + stdenv, + fetchFromGitHub, + buildPythonPackage, + pytest, +}: + +buildPythonPackage rec { + pname = "itypes"; + version = "1.1.0"; + + src = fetchFromGitHub { + repo = pname; + owner = "tomchristie"; + rev = version; + sha256 = "0zkhn16wpslkxkq77dqw5rxa28nrchcb6nd3vgnxv91p4skyfm62"; + }; + + checkInputs = [ pytest ]; + checkPhase = '' + mv itypes.py itypes.py.hidden + pytest tests.py + ''; + + meta = with stdenv.lib; { + description = "Simple immutable types for python"; + homepage = https://github.com/tomchristie/itypes; + license = licenses.bsd3; + maintainers = with maintainers; [ ivegotasthma ]; + }; +} diff --git a/pkgs/top-level/python-packages.nix b/pkgs/top-level/python-packages.nix index bd1f503ddea2..c6f073711c77 100644 --- a/pkgs/top-level/python-packages.nix +++ b/pkgs/top-level/python-packages.nix @@ -2404,6 +2404,8 @@ in { itsdangerous = callPackage ../development/python-modules/itsdangerous { }; + itypes = callPackage ../development/python-modules/itypes { }; + iniparse = callPackage ../development/python-modules/iniparse { }; i3-py = callPackage ../development/python-modules/i3-py { }; From cecfde44e6f68395abb2fef79cfb84d153f0296e Mon Sep 17 00:00:00 2001 From: ivegotasthma Date: Mon, 12 Aug 2019 21:53:25 +0200 Subject: [PATCH 4/4] 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 { };