1{ 2 lib, 3 buildPythonPackage, 4 fetchFromGitHub, 5 aiohttp, 6 jinja2, 7 markupsafe, 8 pytest-aiohttp, 9 pytestCheckHook, 10 pythonOlder, 11 pyyaml, 12}: 13 14buildPythonPackage rec { 15 pname = "aiohttp-swagger"; 16 version = "1.0.15"; 17 format = "setuptools"; 18 19 disabled = pythonOlder "3.6"; 20 21 src = fetchFromGitHub { 22 owner = "cr0hn"; 23 repo = pname; 24 rev = version; 25 hash = "sha256-M43sNpbXWXFRTd549cZhvhO35nBB6OH+ki36BzSk87Q="; 26 }; 27 28 propagatedBuildInputs = [ 29 aiohttp 30 jinja2 31 markupsafe 32 pyyaml 33 ]; 34 35 nativeCheckInputs = [ 36 pytestCheckHook 37 pytest-aiohttp 38 ]; 39 40 postPatch = '' 41 substituteInPlace requirements.txt \ 42 --replace "markupsafe~=1.1.1" "markupsafe>=1.1.1" \ 43 --replace "jinja2~=2.11.2" "jinja2>=2.11.2" 44 ''; 45 46 preCheck = '' 47 # The custom client is obsolete 48 rm tests/conftest.py 49 ''; 50 51 pythonImportsCheck = [ "aiohttp_swagger" ]; 52 53 meta = with lib; { 54 description = "Swagger API Documentation builder for aiohttp"; 55 homepage = "https://github.com/cr0hn/aiohttp-swagger"; 56 license = licenses.mit; 57 maintainers = with maintainers; [ elohmeier ]; 58 }; 59}