2024-02-01 16:06:07 +01:00
|
|
|
{
|
|
|
|
buildPythonPackage,
|
|
|
|
fetchFromGitHub,
|
|
|
|
lib,
|
|
|
|
click,
|
|
|
|
essentials,
|
|
|
|
flask,
|
|
|
|
hatchling,
|
|
|
|
httpx,
|
|
|
|
jinja2,
|
|
|
|
markupsafe,
|
|
|
|
pydantic,
|
|
|
|
pytestCheckHook,
|
|
|
|
pyyaml,
|
|
|
|
rich,
|
|
|
|
setuptools,
|
2025-05-03 10:36:51 +08:00
|
|
|
stdenv,
|
2024-02-01 16:06:07 +01:00
|
|
|
}:
|
|
|
|
buildPythonPackage rec {
|
|
|
|
pname = "essentials-openapi";
|
2025-04-30 11:36:17 +00:00
|
|
|
version = "1.2.0";
|
2024-02-01 16:06:07 +01:00
|
|
|
pyproject = true;
|
|
|
|
|
|
|
|
src = fetchFromGitHub {
|
|
|
|
owner = "Neoteroi";
|
|
|
|
repo = "essentials-openapi";
|
2025-01-03 21:24:13 +01:00
|
|
|
tag = "v${version}";
|
2025-04-30 11:36:17 +00:00
|
|
|
hash = "sha256-aag66YafLDSLBcXyRNcTyiqf3U4hx2gjimxhKVns/zc=";
|
2024-02-01 16:06:07 +01:00
|
|
|
};
|
|
|
|
|
|
|
|
nativeBuildInputs = [ hatchling ];
|
|
|
|
|
|
|
|
nativeCheckInputs = [
|
|
|
|
flask
|
|
|
|
httpx
|
|
|
|
pydantic
|
|
|
|
pytestCheckHook
|
|
|
|
rich
|
|
|
|
setuptools
|
|
|
|
];
|
|
|
|
|
|
|
|
propagatedBuildInputs = [
|
|
|
|
pyyaml
|
|
|
|
essentials
|
|
|
|
markupsafe
|
|
|
|
];
|
|
|
|
|
2024-09-28 22:35:45 -07:00
|
|
|
optional-dependencies = {
|
2024-02-01 16:06:07 +01:00
|
|
|
full = [
|
|
|
|
click
|
|
|
|
jinja2
|
|
|
|
rich
|
|
|
|
httpx
|
|
|
|
];
|
|
|
|
};
|
|
|
|
|
2024-11-14 11:47:45 +08:00
|
|
|
pythonRelaxDeps = [
|
|
|
|
"markupsafe"
|
|
|
|
];
|
|
|
|
|
2024-02-01 16:06:07 +01:00
|
|
|
pythonImportsCheck = [ "openapidocs" ];
|
|
|
|
|
2025-05-03 10:36:51 +08:00
|
|
|
disabledTestPaths = lib.optionals stdenv.hostPlatform.isDarwin [
|
|
|
|
# These tests start a server using a hardcoded port, and since
|
|
|
|
# multiple Python versions are always built simultaneously, this
|
|
|
|
# failure is quite likely to occur.
|
|
|
|
"tests/test_cli.py"
|
|
|
|
];
|
|
|
|
|
2024-11-14 11:47:45 +08:00
|
|
|
meta = {
|
2024-02-01 16:06:07 +01:00
|
|
|
homepage = "https://github.com/Neoteroi/essentials-openapi";
|
|
|
|
description = "Functions to handle OpenAPI Documentation";
|
2025-01-19 21:15:20 +01:00
|
|
|
changelog = "https://github.com/Neoteroi/essentials-openapi/releases/${src.tag}";
|
2024-11-14 11:47:45 +08:00
|
|
|
license = lib.licenses.mit;
|
|
|
|
maintainers = with lib.maintainers; [
|
2024-02-01 16:06:07 +01:00
|
|
|
aldoborrero
|
|
|
|
zimbatm
|
|
|
|
];
|
|
|
|
};
|
|
|
|
}
|