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