2024-06-05 15:53:02 +00:00
|
|
|
{
|
|
|
|
lib,
|
|
|
|
fetchFromGitHub,
|
|
|
|
buildPythonPackage,
|
|
|
|
pythonOlder,
|
2024-01-13 08:15:51 +00:00
|
|
|
|
2024-06-05 15:53:02 +00:00
|
|
|
# build-system
|
|
|
|
poetry-core,
|
2024-01-13 08:15:51 +00:00
|
|
|
|
2024-06-05 15:53:02 +00:00
|
|
|
# dependencies
|
|
|
|
asgiref,
|
|
|
|
httpx,
|
|
|
|
inflection,
|
|
|
|
jsonschema,
|
|
|
|
jinja2,
|
|
|
|
python-multipart,
|
|
|
|
pyyaml,
|
|
|
|
requests,
|
|
|
|
starlette,
|
|
|
|
typing-extensions,
|
|
|
|
werkzeug,
|
2024-01-13 08:15:51 +00:00
|
|
|
|
2024-06-05 15:53:02 +00:00
|
|
|
# optional-dependencies
|
|
|
|
a2wsgi,
|
|
|
|
flask,
|
|
|
|
swagger-ui-bundle,
|
|
|
|
uvicorn,
|
2024-01-13 08:15:51 +00:00
|
|
|
|
2024-06-05 15:53:02 +00:00
|
|
|
# tests
|
|
|
|
pytest-aiohttp,
|
|
|
|
pytestCheckHook,
|
|
|
|
testfixtures,
|
2020-04-24 23:36:52 +00:00
|
|
|
}:
|
|
|
|
|
|
|
|
buildPythonPackage rec {
|
|
|
|
pname = "connexion";
|
2024-07-27 06:49:29 +00:00
|
|
|
version = "3.1.0";
|
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-07-27 06:49:29 +00:00
|
|
|
hash = "sha256-rngQDU9kXw/Z+Al0SCVnWN8xnphueTtZ0+xPBR5MbEM=";
|
2020-04-24 23:36:52 +00:00
|
|
|
};
|
|
|
|
|
2024-06-05 15:53:02 +00:00
|
|
|
nativeBuildInputs = [ poetry-core ];
|
2024-01-13 08:15:51 +00:00
|
|
|
|
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-10-04 16:56:33 +00:00
|
|
|
optional-dependencies = {
|
2024-01-13 08:15:51 +00:00
|
|
|
flask = [
|
|
|
|
a2wsgi
|
|
|
|
flask
|
|
|
|
];
|
2024-06-05 15:53:02 +00:00
|
|
|
swagger-ui = [ swagger-ui-bundle ];
|
|
|
|
uvicorn = [ uvicorn ];
|
2024-01-13 08:15:51 +00:00
|
|
|
};
|
|
|
|
|
2023-02-02 18:25:31 +00:00
|
|
|
nativeCheckInputs = [
|
2021-05-20 23:08:51 +00:00
|
|
|
pytest-aiohttp
|
|
|
|
pytestCheckHook
|
|
|
|
testfixtures
|
2024-10-04 16:56:33 +00:00
|
|
|
] ++ lib.flatten (builtins.attrValues optional-dependencies);
|
2020-04-24 23:36:52 +00:00
|
|
|
|
2024-06-05 15:53:02 +00:00
|
|
|
pythonImportsCheck = [ "connexion" ];
|
2020-04-24 23:36:52 +00:00
|
|
|
|
2022-04-27 09:35:20 +00:00
|
|
|
disabledTests = [
|
|
|
|
# AssertionError
|
|
|
|
"test_headers"
|
2024-04-21 15:54:59 +00:00
|
|
|
# waiter.acquire() deadlock
|
|
|
|
"test_cors_server_error"
|
|
|
|
"test_get_bad_default_response"
|
|
|
|
"test_schema_response"
|
|
|
|
"test_writeonly"
|
2022-04-27 09:35:20 +00:00
|
|
|
];
|
|
|
|
|
2020-04-24 23:36:52 +00:00
|
|
|
meta = with lib; {
|
|
|
|
description = "Swagger/OpenAPI First framework on top of Flask";
|
2024-04-21 15:54:59 +00:00
|
|
|
mainProgram = "connexion";
|
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;
|
|
|
|
};
|
|
|
|
}
|