12 buildPythonPackage rec {
13 pname = "token-bucket";
17 disabled = pythonOlder "3.7";
19 src = fetchFromGitHub {
23 hash = "sha256-dazqJRpC8FUHOhgKFzDnIl5CT2L74J2o2Hsm0IQf4Cg=";
27 # Replace imp with importlib, https://github.com/falconry/token-bucket/pull/24
29 name = "remove-imp.patch";
30 url = "https://github.com/falconry/token-bucket/commit/10a3c9f4de00f4933349f66b4c72b6c96db6e766.patch";
31 hash = "sha256-Hk5+i3xzeA3F1kXRaRarWT9mff2lT2WNmTfTZvYzGYI=";
36 substituteInPlace setup.py \
37 --replace "'pytest-runner'" ""
40 nativeBuildInputs = [ setuptools ];
42 nativeCheckInputs = [ pytestCheckHook ];
44 doCheck = !stdenv.hostPlatform.isDarwin;
47 description = "Token Bucket Implementation for Python Web Apps";
48 homepage = "https://github.com/falconry/token-bucket";
49 changelog = "https://github.com/falconry/token-bucket/releases/tag/${version}";
50 license = licenses.asl20;
51 maintainers = with maintainers; [ hexa ];