Something went wrong. Try again.
lol
Something went wrong. Try again.
1.8 kB · 84 lines
Nix
at master
12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182838485{ lib, buildPythonPackage, fetchFromGitHub, django, django-debug-toolbar, psycopg2, jinja2, beautifulsoup4, pytest-django, pytestCheckHook, python, pytz, redis, redisTestHook, setuptools, stdenv,}:
buildPythonPackage rec { pname = "django-cachalot"; version = "2.9.0"; format = "setuptools";
src = fetchFromGitHub { owner = "noripyt"; repo = "django-cachalot"; tag = "v${version}"; hash = "sha256-oCeMta6Bm+3BUu81huirGV9tMhSAYFjbV2vedghznyM="; };
patches = [ # Disable tests for unsupported caching and database types which would # require additional running backends ./disable-unsupported-tests.patch ];
build-system = [ setuptools ];
dependencies = [ django ];
nativeCheckInputs = [ beautifulsoup4 django-debug-toolbar psycopg2 jinja2 pytest-django pytestCheckHook pytz redis redisTestHook ];
pythonImportsCheck = [ "cachalot" ];
# redisTestHook does not work on darwin doCheck = !stdenv.hostPlatform.isDarwin;
preCheck = '' export DJANGO_SETTINGS_MODULE=settings '';
pytestFlags = [ "-o python_files=*.py" "-o collect_imported_tests=false" "cachalot/tests" "cachalot/admin_tests" ];
disabledTests = [ # relies on specific EXPLAIN output format from sqlite, which is not stable "test_explain" # broken on django-debug-toolbar 6.0 "test_rendering" ];
meta = { description = "No effort, no worry, maximum performance"; homepage = "https://github.com/noripyt/django-cachalot"; changelog = "https://github.com/noripyt/django-cachalot/blob/${src.tag}/CHANGELOG.rst"; license = lib.licenses.bsd3; maintainers = with lib.maintainers; [ onny ]; };}