2021-05-28 09:39:13 +00:00
|
|
|
{ lib
|
2022-11-21 17:40:18 +00:00
|
|
|
, stdenv
|
2021-05-28 09:39:13 +00:00
|
|
|
, buildPythonPackage
|
|
|
|
, fetchFromGitHub
|
2021-07-24 12:14:16 +00:00
|
|
|
, pytest-runner
|
2021-05-28 09:39:13 +00:00
|
|
|
, pytestCheckHook
|
|
|
|
}:
|
|
|
|
|
|
|
|
buildPythonPackage rec {
|
|
|
|
pname = "token-bucket";
|
2021-07-04 02:40:35 +00:00
|
|
|
version = "0.3.0";
|
2021-05-28 09:39:13 +00:00
|
|
|
format = "setuptools";
|
|
|
|
|
|
|
|
src = fetchFromGitHub {
|
|
|
|
owner = "falconry";
|
|
|
|
repo = pname;
|
|
|
|
rev = version;
|
2021-07-04 02:40:35 +00:00
|
|
|
sha256 = "0a703y2d09kvv2l9vq7vc97l4pi2wwq1f2hq783mbw2238jymb3m";
|
2021-05-28 09:39:13 +00:00
|
|
|
};
|
|
|
|
|
|
|
|
nativeBuildInputs = [
|
2021-07-24 12:14:16 +00:00
|
|
|
pytest-runner
|
2021-05-28 09:39:13 +00:00
|
|
|
];
|
|
|
|
|
2023-02-02 18:25:31 +00:00
|
|
|
nativeCheckInputs = [
|
2021-05-28 09:39:13 +00:00
|
|
|
pytestCheckHook
|
|
|
|
];
|
|
|
|
|
2022-11-21 17:40:18 +00:00
|
|
|
doCheck = !stdenv.isDarwin;
|
|
|
|
|
2021-05-28 09:39:13 +00:00
|
|
|
meta = with lib; {
|
|
|
|
description = "Token Bucket Implementation for Python Web Apps";
|
|
|
|
homepage = "https://github.com/falconry/token-bucket";
|
|
|
|
license = licenses.asl20;
|
|
|
|
maintainers = with maintainers; [ hexa ];
|
|
|
|
};
|
|
|
|
}
|