Skip to content
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
84 changes: 54 additions & 30 deletions pkgs/development/python-modules/connexion/default.nix
Original file line number Diff line number Diff line change
@@ -1,70 +1,94 @@
{ 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.1";
pyproject = true;

disabled = pythonOlder "3.6";
disabled = pythonOlder "3.8";

src = fetchFromGitHub {
owner = "spec-first";
repo = pname;
rev = "refs/tags/${version}";
hash = "sha256-1v1xCHY3ZnZG/Vu9wN/it7rLKC/StoDefoMNs+hMjIs=";
hash = "sha256-9h2eDwRnHeXgccrTgFJEyMymsJH8f9aABb+M/yFvpr4=";
};

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"
];

disabledTests = [
# AssertionError
"test_headers"
# ValueError: 'name' may not be empty.
"test_api_base_path_slash"
];

meta = with lib; {
Expand Down
52 changes: 52 additions & 0 deletions pkgs/development/python-modules/py-swagger-ui/default.nix
Original file line number Diff line number Diff line change
@@ -0,0 +1,52 @@
{ lib
, buildPythonPackage
, fetchFromGitHub

# build-system
, poetry-core

# dependencies
, importlib-resources
, jinja2

# tests
, pytestCheckHook
}:

buildPythonPackage rec {
pname = "py-swagger-ui";
version = "1.1.0";
pyproject = true;

src = fetchFromGitHub {
owner = "spec-first";
repo = "py-swagger-ui";
rev = version;
hash = "sha256-XU+zrpefNW3+UA45P3wN5jNo8HWduG6T5krhqio92No=";
};

nativeBuildInputs = [
poetry-core
];

propagatedBuildInputs = [
importlib-resources
jinja2
];

pythonImportsCheck = [
"py_swagger_ui"
];

nativeCheckInputs = [
pytestCheckHook
];

meta = with lib; {
changelog = "https://github.com/spec-first/py-swagger-ui/releases/tag/${version}";
description = "Swagger UI bundled for usage with Python";
homepage = "https://github.com/spec-first/py-swagger-ui";
license = licenses.asl20;
maintainers = with maintainers; [ ];
};
}
2 changes: 2 additions & 0 deletions pkgs/top-level/python-packages.nix
Original file line number Diff line number Diff line change
Expand Up @@ -9662,6 +9662,8 @@ self: super: with self; {

py-ubjson = callPackage ../development/python-modules/py-ubjson { };

py-swagger-ui = callPackage ../development/python-modules/py-swagger-ui { };

py-zabbix = callPackage ../development/python-modules/py-zabbix { };

py17track = callPackage ../development/python-modules/py17track { };
Expand Down