1{ 2 lib, 3 buildPythonPackage, 4 fetchFromGitHub, 5 poetry-core, 6}: 7 8buildPythonPackage rec { 9 pname = "pyrate-limiter"; 10 version = "2.10.0"; 11 format = "pyproject"; 12 13 src = fetchFromGitHub { 14 owner = "vutran1710"; 15 repo = "PyrateLimiter"; 16 rev = "v${version}"; 17 hash = "sha256-CPusPeyTS+QyWiMHsU0ii9ZxPuizsqv0wQy3uicrDw0="; 18 }; 19 20 nativeBuildInputs = [ poetry-core ]; 21 22 pythonImportsCheck = [ "pyrate_limiter" ]; 23 24 # The only consumer of this is Lutris (via python-moddb), and it requires 2.x, 25 # so don't auto-update it and break Lutris every python-updates. 26 # FIXME: remove when python-moddb updates. 27 passthru.skipBulkUpdate = true; 28 29 meta = with lib; { 30 description = "Python Rate-Limiter using Leaky-Bucket Algorimth Family"; 31 homepage = "https://github.com/vutran1710/PyrateLimiter"; 32 changelog = "https://github.com/vutran1710/PyrateLimiter/blob/${src.rev}/CHANGELOG.md"; 33 license = licenses.mit; 34 maintainers = with maintainers; [ kranzes ]; 35 }; 36}