nixpkgs mirror (for testing) github.com/NixOS/nixpkgs
nix
at python-updates 59 lines 1.1 kB view raw
1{ 2 lib, 3 buildPythonPackage, 4 fastapi, 5 fetchFromGitHub, 6 limits, 7 mock, 8 hiro, 9 httpx, 10 poetry-core, 11 pytestCheckHook, 12 redis, 13 starlette, 14}: 15 16buildPythonPackage rec { 17 pname = "slowapi"; 18 version = "0.1.9"; 19 pyproject = true; 20 21 src = fetchFromGitHub { 22 owner = "laurentS"; 23 repo = "slowapi"; 24 tag = "v${version}"; 25 hash = "sha256-R/Mr+Qv22AN7HCDGmAUVh4efU8z4gMIyhC0AuKmxgdE="; 26 }; 27 28 nativeBuildInputs = [ poetry-core ]; 29 30 propagatedBuildInputs = [ 31 limits 32 redis 33 ]; 34 35 nativeCheckInputs = [ 36 fastapi 37 hiro 38 httpx 39 mock 40 pytestCheckHook 41 starlette 42 ]; 43 44 disabledTests = [ 45 # AssertionError: assert '1740326049.9886339' == '1740326049' 46 "test_headers_no_breach" 47 "test_headers_breach" 48 ]; 49 50 pythonImportsCheck = [ "slowapi" ]; 51 52 meta = { 53 description = "Python library for API rate limiting"; 54 homepage = "https://github.com/laurentS/slowapi"; 55 changelog = "https://github.com/laurentS/slowapi/blob/v${version}/CHANGELOG.md"; 56 license = with lib.licenses; [ mit ]; 57 maintainers = with lib.maintainers; [ fab ]; 58 }; 59}