nixpkgs mirror (for testing) github.com/NixOS/nixpkgs
nix
at r-updates 50 lines 1.3 kB view raw
1{ 2 lib, 3 buildPythonPackage, 4 fetchFromGitHub, 5 poetry-core, 6 pytest-asyncio, 7 pytest-cov-stub, 8 pytestCheckHook, 9 toml, 10}: 11 12buildPythonPackage rec { 13 pname = "aiolimiter"; 14 version = "1.2.1"; 15 pyproject = true; 16 17 src = fetchFromGitHub { 18 owner = "mjpieters"; 19 repo = "aiolimiter"; 20 tag = "v${version}"; 21 hash = "sha256-wgHR0GzaPXlhL4ErklFqmWNFO49dvd5X5MgyYHVH4Eo="; 22 }; 23 24 # ERROR: '"session"' is not a valid asyncio_default_fixture_loop_scope. Valid scopes are: function, class, module, package, session. 25 # Post 1.2.1, the project switched from tox and is no longer affected, hence fixed in nixpkgs only. 26 postPatch = '' 27 substituteInPlace tox.ini --replace-fail \ 28 'asyncio_default_fixture_loop_scope = "session"' \ 29 'asyncio_default_fixture_loop_scope = session' 30 ''; 31 32 build-system = [ poetry-core ]; 33 34 nativeCheckInputs = [ 35 pytest-asyncio 36 pytest-cov-stub 37 pytestCheckHook 38 toml 39 ]; 40 41 pythonImportsCheck = [ "aiolimiter" ]; 42 43 meta = { 44 description = "Implementation of a rate limiter for asyncio"; 45 homepage = "https://github.com/mjpieters/aiolimiter"; 46 changelog = "https://github.com/mjpieters/aiolimiter/blob/v${version}/CHANGELOG.md"; 47 license = with lib.licenses; [ mit ]; 48 maintainers = with lib.maintainers; [ fab ]; 49 }; 50}