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