1{ lib 2, buildPythonPackage 3, fetchFromGitHub 4, pytestCheckHook 5}: 6 7buildPythonPackage rec { 8 pname = "ratelimit"; 9 version = "2.2.1"; 10 11 src = fetchFromGitHub { 12 owner = "tomasbasham"; 13 repo = pname; 14 rev = "v${version}"; 15 sha256 = "04hy3hhh5xdqcsz0lx8j18zbj88kh5ik4wyi5d3a5sfy2hx70in2"; 16 }; 17 18 postPatch = '' 19 sed -i "/--cov/d" pytest.ini 20 ''; 21 22 nativeCheckInputs = [ pytestCheckHook ]; 23 24 pytestFlagsArray = [ "tests" ]; 25 26 pythonImportsCheck = [ "ratelimit" ]; 27 28 meta = with lib; { 29 description = "Python API Rate Limit Decorator"; 30 homepage = "https://github.com/tomasbasham/ratelimit"; 31 license = with licenses; [ mit ]; 32 maintainers = with maintainers; [ fab ]; 33 }; 34}