1{ 2 buildPythonPackage, 3 fetchFromGitHub, 4 lib, 5 click, 6 essentials, 7 flask, 8 hatchling, 9 httpx, 10 jinja2, 11 markupsafe, 12 pydantic, 13 pytestCheckHook, 14 pyyaml, 15 rich, 16 setuptools, 17 stdenv, 18}: 19buildPythonPackage rec { 20 pname = "essentials-openapi"; 21 version = "1.2.1"; 22 pyproject = true; 23 24 src = fetchFromGitHub { 25 owner = "Neoteroi"; 26 repo = "essentials-openapi"; 27 tag = "v${version}"; 28 hash = "sha256-HckCdDQ7wNg+uHLwAaoBIxg2cfubkcFC1mhviOeFdDg="; 29 }; 30 31 nativeBuildInputs = [ hatchling ]; 32 33 nativeCheckInputs = [ 34 flask 35 httpx 36 pydantic 37 pytestCheckHook 38 rich 39 setuptools 40 ]; 41 42 propagatedBuildInputs = [ 43 pyyaml 44 essentials 45 markupsafe 46 ]; 47 48 optional-dependencies = { 49 full = [ 50 click 51 jinja2 52 rich 53 httpx 54 ]; 55 }; 56 57 pythonRelaxDeps = [ 58 "markupsafe" 59 ]; 60 61 pythonImportsCheck = [ "openapidocs" ]; 62 63 disabledTestPaths = lib.optionals stdenv.hostPlatform.isDarwin [ 64 # These tests start a server using a hardcoded port, and since 65 # multiple Python versions are always built simultaneously, this 66 # failure is quite likely to occur. 67 "tests/test_cli.py" 68 ]; 69 70 meta = { 71 homepage = "https://github.com/Neoteroi/essentials-openapi"; 72 description = "Functions to handle OpenAPI Documentation"; 73 changelog = "https://github.com/Neoteroi/essentials-openapi/releases/${src.tag}"; 74 license = lib.licenses.mit; 75 maintainers = with lib.maintainers; [ 76 aldoborrero 77 zimbatm 78 ]; 79 }; 80}