1{ stdenv 2, lib 3, buildPythonPackage 4, fetchPypi 5, pythonRelaxDepsHook 6, django 7, funcy 8, redis 9, six 10, pytestCheckHook 11, pytest-django 12, mock 13, dill 14, jinja2 15, before-after 16, pythonOlder 17, nettools 18, pkgs 19}: 20 21buildPythonPackage rec { 22 pname = "django-cacheops"; 23 version = "7.0.2"; 24 format = "setuptools"; 25 26 disabled = pythonOlder "3.7"; 27 28 src = fetchPypi { 29 inherit pname version; 30 hash = "sha256-d6N8c9f6z8cpk2XtZqEr56SH3XRd2GwdM8ouv9OzKHg="; 31 }; 32 33 nativeBuildInputs = [ 34 pythonRelaxDepsHook 35 ]; 36 pythonRelaxDeps = [ "funcy" ]; 37 38 propagatedBuildInputs = [ 39 django 40 funcy 41 redis 42 six 43 ]; 44 45 __darwinAllowLocalNetworking = true; 46 47 nativeCheckInputs = [ 48 pytestCheckHook 49 pytest-django 50 mock 51 dill 52 jinja2 53 before-after 54 nettools 55 pkgs.redis 56 ]; 57 58 preCheck = '' 59 redis-server & 60 REDIS_PID=$! 61 while ! redis-cli --scan ; do 62 echo waiting for redis to be ready 63 sleep 1 64 done 65 ''; 66 67 postCheck = '' 68 kill $REDIS_PID 69 ''; 70 71 DJANGO_SETTINGS_MODULE = "tests.settings"; 72 73 meta = with lib; { 74 description = "A slick ORM cache with automatic granular event-driven invalidation for Django"; 75 homepage = "https://github.com/Suor/django-cacheops"; 76 changelog = "https://github.com/Suor/django-cacheops/blob/${version}/CHANGELOG"; 77 license = licenses.bsd3; 78 maintainers = with maintainers; [ onny ]; 79 }; 80}