about summary refs log tree commit diff
path: root/nixpkgs/pkgs/development/python-modules/connexion/default.nix
diff options
context:
space:
mode:
Diffstat (limited to 'nixpkgs/pkgs/development/python-modules/connexion/default.nix')
-rw-r--r--nixpkgs/pkgs/development/python-modules/connexion/default.nix78
1 files changed, 51 insertions, 27 deletions
diff --git a/nixpkgs/pkgs/development/python-modules/connexion/default.nix b/nixpkgs/pkgs/development/python-modules/connexion/default.nix
index d4eb668d73ed..40a166c14be4 100644
--- a/nixpkgs/pkgs/development/python-modules/connexion/default.nix
+++ b/nixpkgs/pkgs/development/python-modules/connexion/default.nix
@@ -1,30 +1,40 @@
 { lib
-, aiohttp
-, aiohttp-jinja2
-, aiohttp-remotes
-, aiohttp-swagger
-, buildPythonPackage
-, clickclick
-, decorator
 , fetchFromGitHub
-, flask
+, buildPythonPackage
+, pythonOlder
+
+# build-system
+, poetry-core
+
+# dependencies
+, asgiref
+, httpx
 , inflection
 , jsonschema
-, openapi-spec-validator
-, packaging
-, pytest-aiohttp
-, pytestCheckHook
-, pythonOlder
+, jinja2
+, python-multipart
 , pyyaml
 , requests
+, starlette
+, typing-extensions
+, werkzeug
+
+# optional-dependencies
+, a2wsgi
+, flask
 , swagger-ui-bundle
+, uvicorn
+
+# tests
+, pytest-aiohttp
+, pytestCheckHook
 , testfixtures
 }:
 
 buildPythonPackage rec {
   pname = "connexion";
-  version = "2.14.2";
-  format = "setuptools";
+  version = "3.0.5";
+  pyproject = true;
 
   disabled = pythonOlder "3.6";
 
@@ -32,31 +42,45 @@ buildPythonPackage rec {
     owner = "spec-first";
     repo = pname;
     rev = "refs/tags/${version}";
-    hash = "sha256-1v1xCHY3ZnZG/Vu9wN/it7rLKC/StoDefoMNs+hMjIs=";
+    hash = "sha256-VaHdUxZ72JCm9zFMSEg3EW1uwfn+IIYy3yrtW9qC6rA=";
   };
 
+  nativeBuildInputs = [
+    poetry-core
+  ];
+
   propagatedBuildInputs = [
-    aiohttp
-    aiohttp-jinja2
-    aiohttp-swagger
-    clickclick
-    flask
+    asgiref
+    httpx
     inflection
     jsonschema
-    openapi-spec-validator
-    packaging
+    jinja2
+    python-multipart
     pyyaml
     requests
-    swagger-ui-bundle
+    starlette
+    typing-extensions
+    werkzeug
   ];
 
+  passthru.optional-dependencies = {
+    flask = [
+      a2wsgi
+      flask
+    ];
+    swagger-ui = [
+      swagger-ui-bundle
+    ];
+    uvicorn = [
+      uvicorn
+    ];
+  };
+
   nativeCheckInputs = [
-    aiohttp-remotes
-    decorator
     pytest-aiohttp
     pytestCheckHook
     testfixtures
-  ];
+  ] ++ lib.flatten (builtins.attrValues passthru.optional-dependencies);
 
   pythonImportsCheck = [
     "connexion"