nixpkgs mirror (for testing)
github.com/NixOS/nixpkgs
nix
1{
2 lib,
3 aiohttp,
4 aioitertools,
5 buildPythonPackage,
6 django,
7 falcon,
8 fastapi,
9 fetchFromGitHub,
10 flask,
11 httpx,
12 isodate,
13 jsonschema,
14 jsonschema-path,
15 more-itertools,
16 multidict,
17 openapi-schema-validator,
18 openapi-spec-validator,
19 parse,
20 poetry-core,
21 pytest-aiohttp,
22 pytest-cov-stub,
23 pytestCheckHook,
24 responses,
25 requests,
26 starlette,
27 webob,
28 werkzeug,
29}:
30
31buildPythonPackage rec {
32 pname = "openapi-core";
33 version = "0.22.0";
34 pyproject = true;
35
36 src = fetchFromGitHub {
37 owner = "p1c2u";
38 repo = "openapi-core";
39 tag = version;
40 hash = "sha256-fdONzFde9k2NAd5Rd8vTLt/lQX72JdNSFJhPVWryRQw=";
41 };
42
43 build-system = [ poetry-core ];
44
45 dependencies = [
46 isodate
47 more-itertools
48 parse
49 openapi-schema-validator
50 openapi-spec-validator
51 werkzeug
52 jsonschema-path
53 jsonschema
54 ];
55
56 optional-dependencies = {
57 aiohttp = [
58 aiohttp
59 multidict
60 ];
61 django = [ django ];
62 falcon = [ falcon ];
63 fastapi = [ fastapi ];
64 flask = [ flask ];
65 requests = [ requests ];
66 starlette = [
67 aioitertools
68 starlette
69 ];
70 };
71
72 __darwinAllowLocalNetworking = true;
73
74 nativeCheckInputs = [
75 httpx
76 pytest-aiohttp
77 pytest-cov-stub
78 pytestCheckHook
79 responses
80 webob
81 ]
82 ++ lib.concatAttrValues optional-dependencies;
83
84 disabledTestPaths = [
85 # Requires secrets and additional configuration
86 "tests/integration/contrib/django/"
87 ];
88
89 pythonImportsCheck = [
90 "openapi_core"
91 "openapi_core.validation.request.validators"
92 "openapi_core.validation.response.validators"
93 ];
94
95 meta = {
96 changelog = "https://github.com/python-openapi/openapi-core/releases/tag/${version}";
97 description = "Client-side and server-side support for the OpenAPI Specification v3";
98 homepage = "https://github.com/python-openapi/openapi-core";
99 license = lib.licenses.bsd3;
100 maintainers = with lib.maintainers; [ dotlambda ];
101 };
102}