1{ 2 lib, 3 buildPythonPackage, 4 fetchFromGitHub, 5 pythonOlder, 6 unasync, 7 poetry-core, 8 python, 9 click, 10 hiredis, 11 more-itertools, 12 pydantic, 13 python-ulid, 14 redis, 15 redisTestHook, 16 types-redis, 17 typing-extensions, 18 pytest-asyncio, 19 pytestCheckHook, 20}: 21 22buildPythonPackage rec { 23 pname = "redis-om"; 24 version = "0.3.5"; 25 pyproject = true; 26 27 disabled = pythonOlder "3.8"; 28 29 src = fetchFromGitHub { 30 owner = "redis"; 31 repo = "redis-om-python"; 32 tag = "v${version}"; 33 hash = "sha256-TfwMYDZYDKCdI5i8izBVZaXN5GC/Skhkl905c/DHuXY="; 34 }; 35 36 build-system = [ 37 unasync 38 poetry-core 39 ]; 40 41 # it has not been maintained at all for a half year and some dependencies are outdated 42 # https://github.com/redis/redis-om-python/pull/554 43 # https://github.com/redis/redis-om-python/pull/577 44 pythonRelaxDeps = true; 45 46 dependencies = [ 47 click 48 hiredis 49 more-itertools 50 pydantic 51 python-ulid 52 redis 53 types-redis 54 typing-extensions 55 ]; 56 57 preBuild = '' 58 ${python.pythonOnBuildForHost.interpreter} make_sync.py 59 ''; 60 61 nativeCheckInputs = [ 62 pytestCheckHook 63 pytest-asyncio 64 redisTestHook 65 ]; 66 67 # probably require redisearch 68 # https://github.com/redis/redis-om-python/issues/532 69 doCheck = false; 70 71 pythonImportsCheck = [ 72 "aredis_om" 73 "redis_om" 74 ]; 75 76 meta = with lib; { 77 description = "Object mapping, and more, for Redis and Python"; 78 mainProgram = "migrate"; 79 homepage = "https://github.com/redis/redis-om-python"; 80 changelog = "https://github.com/redis/redis-om-python/releases/tag/${src.tag}"; 81 license = licenses.mit; 82 maintainers = with maintainers; [ natsukium ]; 83 }; 84}