2020-04-24 23:36:52 +00:00
|
|
|
{ lib
|
|
|
|
, buildPythonPackage
|
|
|
|
, fetchFromGitHub
|
|
|
|
, aiohttp
|
|
|
|
, jinja2
|
2021-09-18 10:52:07 +00:00
|
|
|
, markupsafe
|
2020-04-24 23:36:52 +00:00
|
|
|
, pytest-aiohttp
|
2021-09-18 10:52:07 +00:00
|
|
|
, pytestCheckHook
|
|
|
|
, pythonOlder
|
2020-04-24 23:36:52 +00:00
|
|
|
, pyyaml
|
|
|
|
}:
|
|
|
|
|
|
|
|
buildPythonPackage rec {
|
|
|
|
pname = "aiohttp-swagger";
|
2021-09-18 10:52:07 +00:00
|
|
|
version = "1.0.15";
|
2022-04-27 09:35:20 +00:00
|
|
|
format = "setuptools";
|
2021-09-18 10:52:07 +00:00
|
|
|
|
|
|
|
disabled = pythonOlder "3.6";
|
2020-04-24 23:36:52 +00:00
|
|
|
|
|
|
|
src = fetchFromGitHub {
|
|
|
|
owner = "cr0hn";
|
|
|
|
repo = pname;
|
2021-09-18 10:52:07 +00:00
|
|
|
rev = version;
|
2022-04-27 09:35:20 +00:00
|
|
|
hash = "sha256-M43sNpbXWXFRTd549cZhvhO35nBB6OH+ki36BzSk87Q=";
|
2020-04-24 23:36:52 +00:00
|
|
|
};
|
|
|
|
|
2021-09-18 10:52:07 +00:00
|
|
|
propagatedBuildInputs = [
|
|
|
|
aiohttp
|
|
|
|
jinja2
|
|
|
|
markupsafe
|
|
|
|
pyyaml
|
|
|
|
];
|
|
|
|
|
2023-02-02 18:25:31 +00:00
|
|
|
nativeCheckInputs = [
|
2021-09-18 10:52:07 +00:00
|
|
|
pytestCheckHook
|
|
|
|
pytest-aiohttp
|
|
|
|
];
|
|
|
|
|
|
|
|
postPatch = ''
|
|
|
|
substituteInPlace requirements.txt \
|
|
|
|
--replace "markupsafe~=1.1.1" "markupsafe>=1.1.1" \
|
|
|
|
--replace "jinja2~=2.11.2" "jinja2>=2.11.2"
|
|
|
|
'';
|
2020-04-24 23:36:52 +00:00
|
|
|
|
2022-04-27 09:35:20 +00:00
|
|
|
preCheck = ''
|
|
|
|
# The custom client is obsolete
|
|
|
|
rm tests/conftest.py
|
|
|
|
'';
|
|
|
|
|
|
|
|
pythonImportsCheck = [
|
|
|
|
"aiohttp_swagger"
|
|
|
|
];
|
2020-04-24 23:36:52 +00:00
|
|
|
|
|
|
|
meta = with lib; {
|
|
|
|
description = "Swagger API Documentation builder for aiohttp";
|
|
|
|
homepage = "https://github.com/cr0hn/aiohttp-swagger";
|
|
|
|
license = licenses.mit;
|
|
|
|
maintainers = with maintainers; [ elohmeier ];
|
|
|
|
};
|
|
|
|
}
|