diff options
Diffstat (limited to 'infra/libkookie/nixpkgs/pkgs/development/python-modules/ratelimit/default.nix')
-rw-r--r-- | infra/libkookie/nixpkgs/pkgs/development/python-modules/ratelimit/default.nix | 34 |
1 files changed, 34 insertions, 0 deletions
diff --git a/infra/libkookie/nixpkgs/pkgs/development/python-modules/ratelimit/default.nix b/infra/libkookie/nixpkgs/pkgs/development/python-modules/ratelimit/default.nix new file mode 100644 index 000000000000..f706d043bf86 --- /dev/null +++ b/infra/libkookie/nixpkgs/pkgs/development/python-modules/ratelimit/default.nix @@ -0,0 +1,34 @@ +{ lib +, buildPythonPackage +, fetchFromGitHub +, pytestCheckHook +}: + +buildPythonPackage rec { + pname = "ratelimit"; + version = "2.2.1"; + + src = fetchFromGitHub { + owner = "tomasbasham"; + repo = pname; + rev = "v${version}"; + sha256 = "04hy3hhh5xdqcsz0lx8j18zbj88kh5ik4wyi5d3a5sfy2hx70in2"; + }; + + postPatch = '' + sed -i "/--cov/d" pytest.ini + ''; + + checkInputs = [ pytestCheckHook ]; + + pytestFlagsArray = [ "tests" ]; + + pythonImportsCheck = [ "ratelimit" ]; + + meta = with lib; { + description = "Python API Rate Limit Decorator"; + homepage = "https://github.com/tomasbasham/ratelimit"; + license = with licenses; [ mit ]; + maintainers = with maintainers; [ fab ]; + }; +} |