Files
nixpkgs/pkgs/development/python-modules/connexion/default.nix
Dark Steveneq 646b892680
Some checks failed
Periodic Merges (6h) / master → staging-nixos (push) Failing after 12m50s
Periodic Merges (6h) / master → staging-next (push) Failing after 12m54s
Periodic Merges (24h) / merge-base(master,staging) → haskell-updates (push) Failing after 11m54s
Periodic Merges (6h) / staging-next → staging (push) Failing after 12m13s
Periodic Merges (24h) / staging-next-25.05 → staging-25.05 (push) Failing after 13m24s
Periodic Merges (24h) / release-25.05 → staging-next-25.05 (push) Failing after 14m28s
push sheeet
2025-10-09 14:15:47 +02:00

106 lines
2.0 KiB
Nix

{
lib,
stdenv,
fetchFromGitHub,
buildPythonPackage,
pythonOlder,
# build-system
poetry-core,
# dependencies
asgiref,
httpx,
inflection,
jsonschema,
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 = "3.2.0";
pyproject = true;
disabled = pythonOlder "3.8";
src = fetchFromGitHub {
owner = "spec-first";
repo = "connexion";
tag = version;
hash = "sha256-ruwpA2yd7FRME1FvYrZh0EOnhmQ26YVouXzpVD9ph6g=";
};
build-system = [ poetry-core ];
dependencies = [
asgiref
httpx
inflection
jsonschema
jinja2
python-multipart
pyyaml
requests
starlette
typing-extensions
werkzeug
];
optional-dependencies = {
flask = [
a2wsgi
flask
];
swagger-ui = [ swagger-ui-bundle ];
uvicorn = [ uvicorn ];
};
nativeCheckInputs = [
pytest-aiohttp
pytestCheckHook
testfixtures
]
++ lib.flatten (builtins.attrValues optional-dependencies);
pythonImportsCheck = [ "connexion" ];
disabledTests = [
"test_build_example"
"test_mock_resolver_no_example"
"test_sort_apis_by_basepath"
"test_sort_routes"
# Tests require network access
"test_remote_api"
]
++ lib.optionals stdenv.hostPlatform.isDarwin [
# ImportError: Error while finding loader for '/private/tmp/nix-build-python3.12-connexion-3.1.0.drv-0/source' (<class 'ModuleNotFoundError'>: No module named '/private/tmp/nix-build-python3')
"test_lifespan"
];
meta = {
description = "Swagger/OpenAPI First framework on top of Flask";
homepage = "https://github.com/spec-first/connexion";
changelog = "https://github.com/spec-first/connexion/releases/tag/${version}";
license = lib.licenses.asl20;
maintainers = with lib.maintainers; [ bot-wxt1221 ];
mainProgram = "connexion";
};
}