2019-01-30 12:36:19 +00:00
|
|
|
{ lib
|
|
|
|
, buildPythonPackage
|
|
|
|
, fetchFromGitHub
|
|
|
|
, aiohttp
|
|
|
|
, jinja2
|
2021-09-10 23:19:08 +00:00
|
|
|
, markupsafe
|
2019-01-30 12:36:19 +00:00
|
|
|
, pytest-aiohttp
|
2021-09-10 23:19:08 +00:00
|
|
|
, pytestCheckHook
|
|
|
|
, pythonOlder
|
2019-01-30 12:36:19 +00:00
|
|
|
, pyyaml
|
|
|
|
}:
|
|
|
|
|
|
|
|
buildPythonPackage rec {
|
|
|
|
pname = "aiohttp-swagger";
|
2021-09-10 23:19:08 +00:00
|
|
|
version = "1.0.15";
|
|
|
|
|
|
|
|
disabled = pythonOlder "3.6";
|
2019-01-30 12:36:19 +00:00
|
|
|
|
|
|
|
src = fetchFromGitHub {
|
|
|
|
owner = "cr0hn";
|
|
|
|
repo = pname;
|
2021-09-10 23:19:08 +00:00
|
|
|
rev = version;
|
|
|
|
sha256 = "sha256-M43sNpbXWXFRTd549cZhvhO35nBB6OH+ki36BzSk87Q=";
|
2019-01-30 12:36:19 +00:00
|
|
|
};
|
|
|
|
|
2021-09-10 23:19:08 +00:00
|
|
|
propagatedBuildInputs = [
|
|
|
|
aiohttp
|
|
|
|
jinja2
|
|
|
|
markupsafe
|
|
|
|
pyyaml
|
|
|
|
];
|
|
|
|
|
|
|
|
checkInputs = [
|
|
|
|
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"
|
|
|
|
'';
|
2019-01-30 12:36:19 +00:00
|
|
|
|
2021-09-10 23:19:08 +00:00
|
|
|
pythonImportsCheck = [ "aiohttp_swagger" ];
|
2019-01-30 12:36:19 +00:00
|
|
|
|
|
|
|
meta = with lib; {
|
|
|
|
description = "Swagger API Documentation builder for aiohttp";
|
2020-04-01 01:11:51 +00:00
|
|
|
homepage = "https://github.com/cr0hn/aiohttp-swagger";
|
2019-01-30 12:36:19 +00:00
|
|
|
license = licenses.mit;
|
|
|
|
maintainers = with maintainers; [ elohmeier ];
|
|
|
|
};
|
|
|
|
}
|