1{ 2 lib, 3 aiohttp, 4 buildPythonPackage, 5 fetchFromGitHub, 6 isal, 7 poetry-core, 8 pytestCheckHook, 9 zlib-ng, 10}: 11 12buildPythonPackage rec { 13 pname = "aiohttp-fast-zlib"; 14 version = "0.3.0"; 15 pyproject = true; 16 17 src = fetchFromGitHub { 18 owner = "bdraco"; 19 repo = "aiohttp-fast-zlib"; 20 tag = "v${version}"; 21 hash = "sha256-N38eMxxovpBM3n0cb7glKyBQ9GD79uyFxq5L4pKv248="; 22 }; 23 24 postPatch = '' 25 sed -i "/addopts =/d" pyproject.toml 26 ''; 27 28 build-system = [ poetry-core ]; 29 30 dependencies = [ aiohttp ]; 31 32 optional-dependencies = { 33 isal = [ isal ]; 34 zlib_ng = [ zlib-ng ]; 35 }; 36 37 nativeCheckInputs = [ pytestCheckHook ] ++ lib.flatten (lib.attrValues optional-dependencies); 38 39 pythonImportsCheck = [ "aiohttp_fast_zlib" ]; 40 41 meta = with lib; { 42 description = "Use the fastest installed zlib compatible library with aiohttp"; 43 homepage = "https://github.com/bdraco/aiohttp-fast-zlib"; 44 changelog = "https://github.com/bdraco/aiohttp-fast-zlib/blob/${src.rev}/CHANGELOG.md"; 45 license = licenses.asl20; 46 maintainers = [ ]; 47 }; 48}