Clone of https://github.com/NixOS/nixpkgs.git (to stress-test knotserver)
1{ 2 lib, 3 buildPythonPackage, 4 fetchFromGitHub, 5 hypothesis, 6 jsonpath-ng, 7 lupa, 8 poetry-core, 9 pyprobables, 10 pytest-asyncio, 11 pytest-mock, 12 pytestCheckHook, 13 pythonOlder, 14 redis, 15 redisTestHook, 16 sortedcontainers, 17}: 18 19buildPythonPackage rec { 20 pname = "fakeredis"; 21 version = "2.29.0"; 22 pyproject = true; 23 24 disabled = pythonOlder "3.9"; 25 26 src = fetchFromGitHub { 27 owner = "dsoftwareinc"; 28 repo = "fakeredis-py"; 29 tag = "v${version}"; 30 hash = "sha256-wBUsoPmTIE3VFvmMnW4B9Unw/V63dIvsBTYCloElamA="; 31 }; 32 33 build-system = [ poetry-core ]; 34 35 dependencies = [ 36 redis 37 sortedcontainers 38 ]; 39 40 optional-dependencies = { 41 lua = [ lupa ]; 42 json = [ jsonpath-ng ]; 43 bf = [ pyprobables ]; 44 cf = [ pyprobables ]; 45 probabilistic = [ pyprobables ]; 46 }; 47 48 nativeCheckInputs = [ 49 hypothesis 50 pytest-asyncio 51 pytest-mock 52 pytestCheckHook 53 redisTestHook 54 ]; 55 56 pythonImportsCheck = [ "fakeredis" ]; 57 58 disabledTestMarks = [ "slow" ]; 59 60 preCheck = '' 61 redisTestPort=6390 62 ''; 63 64 meta = with lib; { 65 description = "Fake implementation of Redis API"; 66 homepage = "https://github.com/dsoftwareinc/fakeredis-py"; 67 changelog = "https://github.com/cunla/fakeredis-py/releases/tag/v${version}"; 68 license = with licenses; [ bsd3 ]; 69 maintainers = with maintainers; [ fab ]; 70 }; 71}