2021-05-20 23:08:51 +00:00
|
|
|
{ lib
|
|
|
|
, fetchFromGitHub
|
2024-01-13 08:15:51 +00:00
|
|
|
, buildPythonPackage
|
|
|
|
, pythonOlder
|
|
|
|
|
|
|
|
# build-system
|
|
|
|
, poetry-core
|
|
|
|
|
|
|
|
# dependencies
|
|
|
|
, asgiref
|
|
|
|
, httpx
|
2020-04-24 23:36:52 +00:00
|
|
|
, inflection
|
|
|
|
, jsonschema
|
2024-01-13 08:15:51 +00:00
|
|
|
, jinja2
|
|
|
|
, python-multipart
|
2020-04-24 23:36:52 +00:00
|
|
|
, pyyaml
|
|
|
|
, requests
|
2024-01-13 08:15:51 +00:00
|
|
|
, starlette
|
|
|
|
, typing-extensions
|
|
|
|
, werkzeug
|
|
|
|
|
|
|
|
# optional-dependencies
|
|
|
|
, a2wsgi
|
|
|
|
, flask
|
2020-04-24 23:36:52 +00:00
|
|
|
, swagger-ui-bundle
|
2024-01-13 08:15:51 +00:00
|
|
|
, uvicorn
|
|
|
|
|
|
|
|
# tests
|
|
|
|
, pytest-aiohttp
|
|
|
|
, pytestCheckHook
|
2020-04-24 23:36:52 +00:00
|
|
|
, testfixtures
|
|
|
|
}:
|
|
|
|
|
|
|
|
buildPythonPackage rec {
|
|
|
|
pname = "connexion";
|
2024-02-29 20:09:43 +00:00
|
|
|
version = "3.0.6";
|
2024-01-13 08:15:51 +00:00
|
|
|
pyproject = true;
|
2022-01-19 23:45:15 +00:00
|
|
|
|
2021-05-20 23:08:51 +00:00
|
|
|
disabled = pythonOlder "3.6";
|
2020-04-24 23:36:52 +00:00
|
|
|
|
|
|
|
src = fetchFromGitHub {
|
2022-04-27 09:35:20 +00:00
|
|
|
owner = "spec-first";
|
2020-04-24 23:36:52 +00:00
|
|
|
repo = pname;
|
2022-04-27 09:35:20 +00:00
|
|
|
rev = "refs/tags/${version}";
|
2024-02-29 20:09:43 +00:00
|
|
|
hash = "sha256-0EaJwxT80qLqlrxYk4H7Pf/UKq2pA/8HGL8OiqNA/2s=";
|
2020-04-24 23:36:52 +00:00
|
|
|
};
|
|
|
|
|
2024-01-13 08:15:51 +00:00
|
|
|
nativeBuildInputs = [
|
|
|
|
poetry-core
|
|
|
|
];
|
|
|
|
|
2020-04-24 23:36:52 +00:00
|
|
|
propagatedBuildInputs = [
|
2024-01-13 08:15:51 +00:00
|
|
|
asgiref
|
|
|
|
httpx
|
2021-05-20 23:08:51 +00:00
|
|
|
inflection
|
2020-04-24 23:36:52 +00:00
|
|
|
jsonschema
|
2024-01-13 08:15:51 +00:00
|
|
|
jinja2
|
|
|
|
python-multipart
|
2020-04-24 23:36:52 +00:00
|
|
|
pyyaml
|
|
|
|
requests
|
2024-01-13 08:15:51 +00:00
|
|
|
starlette
|
|
|
|
typing-extensions
|
|
|
|
werkzeug
|
2021-05-20 23:08:51 +00:00
|
|
|
];
|
2020-04-24 23:36:52 +00:00
|
|
|
|
2024-01-13 08:15:51 +00:00
|
|
|
passthru.optional-dependencies = {
|
|
|
|
flask = [
|
|
|
|
a2wsgi
|
|
|
|
flask
|
|
|
|
];
|
|
|
|
swagger-ui = [
|
|
|
|
swagger-ui-bundle
|
|
|
|
];
|
|
|
|
uvicorn = [
|
|
|
|
uvicorn
|
|
|
|
];
|
|
|
|
};
|
|
|
|
|
2023-02-02 18:25:31 +00:00
|
|
|
nativeCheckInputs = [
|
2021-05-20 23:08:51 +00:00
|
|
|
pytest-aiohttp
|
|
|
|
pytestCheckHook
|
|
|
|
testfixtures
|
2024-01-13 08:15:51 +00:00
|
|
|
] ++ lib.flatten (builtins.attrValues passthru.optional-dependencies);
|
2020-04-24 23:36:52 +00:00
|
|
|
|
2022-01-19 23:45:15 +00:00
|
|
|
pythonImportsCheck = [
|
|
|
|
"connexion"
|
|
|
|
];
|
2020-04-24 23:36:52 +00:00
|
|
|
|
2022-04-27 09:35:20 +00:00
|
|
|
disabledTests = [
|
|
|
|
# AssertionError
|
|
|
|
"test_headers"
|
|
|
|
];
|
|
|
|
|
2020-04-24 23:36:52 +00:00
|
|
|
meta = with lib; {
|
|
|
|
description = "Swagger/OpenAPI First framework on top of Flask";
|
2022-04-27 09:35:20 +00:00
|
|
|
homepage = "https://github.com/spec-first/connexion";
|
2023-02-02 18:25:31 +00:00
|
|
|
changelog = "https://github.com/spec-first/connexion/releases/tag/${version}";
|
2020-04-24 23:36:52 +00:00
|
|
|
license = licenses.asl20;
|
|
|
|
maintainers = with maintainers; [ elohmeier ];
|
|
|
|
};
|
|
|
|
}
|