35 lines
774 B
Nix
35 lines
774 B
Nix
|
{ lib
|
||
|
, buildPythonPackage
|
||
|
, fetchFromGitHub
|
||
|
, poetry-core
|
||
|
}:
|
||
|
|
||
|
buildPythonPackage rec {
|
||
|
pname = "pyrate-limiter";
|
||
|
version = "2.10.0";
|
||
|
format = "pyproject";
|
||
|
|
||
|
src = fetchFromGitHub {
|
||
|
owner = "vutran1710";
|
||
|
repo = "PyrateLimiter";
|
||
|
rev = "v${version}";
|
||
|
hash = "sha256-CPusPeyTS+QyWiMHsU0ii9ZxPuizsqv0wQy3uicrDw0=";
|
||
|
};
|
||
|
|
||
|
nativeBuildInputs = [
|
||
|
poetry-core
|
||
|
];
|
||
|
|
||
|
pythonImportsCheck = [
|
||
|
"pyrate_limiter"
|
||
|
];
|
||
|
|
||
|
meta = with lib; {
|
||
|
description = "Python Rate-Limiter using Leaky-Bucket Algorimth Family";
|
||
|
homepage = "https://github.com/vutran1710/PyrateLimiter";
|
||
|
changelog = "https://github.com/vutran1710/PyrateLimiter/blob/${src.rev}/CHANGELOG.md";
|
||
|
license = licenses.mit;
|
||
|
maintainers = with maintainers; [ kranzes ];
|
||
|
};
|
||
|
}
|