1{ lib
2, stdenv
3, buildPythonPackage
4, fetchFromGitHub
5, pytest-runner
6, pytestCheckHook
7}:
8
9buildPythonPackage rec {
10 pname = "token-bucket";
11 version = "0.3.0";
12 format = "setuptools";
13
14 src = fetchFromGitHub {
15 owner = "falconry";
16 repo = pname;
17 rev = version;
18 sha256 = "0a703y2d09kvv2l9vq7vc97l4pi2wwq1f2hq783mbw2238jymb3m";
19 };
20
21 nativeBuildInputs = [
22 pytest-runner
23 ];
24
25 checkInputs = [
26 pytestCheckHook
27 ];
28
29 doCheck = !stdenv.isDarwin;
30
31 meta = with lib; {
32 description = "Token Bucket Implementation for Python Web Apps";
33 homepage = "https://github.com/falconry/token-bucket";
34 license = licenses.asl20;
35 maintainers = with maintainers; [ hexa ];
36 };
37}