1{ 2 lib, 3 buildPythonPackage, 4 fetchFromGitHub, 5 poetry-core, 6 importlib-metadata, 7 pytest-asyncio, 8 pytestCheckHook, 9 pythonOlder, 10 toml, 11}: 12 13buildPythonPackage rec { 14 pname = "aiolimiter"; 15 version = "1.1.0"; 16 format = "pyproject"; 17 18 disabled = pythonOlder "3.7"; 19 20 src = fetchFromGitHub { 21 owner = "mjpieters"; 22 repo = pname; 23 rev = "v${version}"; 24 hash = "sha256-BpLh9utf2oJe+83rsIZeV5+MjbJ3aO5slMNVbUywQIo="; 25 }; 26 27 nativeBuildInputs = [ poetry-core ]; 28 29 propagatedBuildInputs = lib.optionals (pythonOlder "3.8") [ importlib-metadata ]; 30 31 nativeCheckInputs = [ 32 pytest-asyncio 33 pytestCheckHook 34 toml 35 ]; 36 37 postPatch = '' 38 substituteInPlace tox.ini \ 39 --replace " --cov=aiolimiter --cov-config=tox.ini --cov-report term-missing" "" 40 ''; 41 42 pythonImportsCheck = [ "aiolimiter" ]; 43 44 meta = with lib; { 45 description = "Implementation of a rate limiter for asyncio"; 46 homepage = "https://github.com/mjpieters/aiolimiter"; 47 changelog = "https://github.com/mjpieters/aiolimiter/blob/v${version}/CHANGELOG.md"; 48 license = with licenses; [ mit ]; 49 maintainers = with maintainers; [ fab ]; 50 }; 51}