2023-07-15 17:15:38 +00:00
|
|
|
{ stdenv
|
|
|
|
, lib
|
2023-03-04 12:14:45 +00:00
|
|
|
, buildPythonPackage
|
2021-03-23 19:22:30 +00:00
|
|
|
, fetchPypi
|
2023-07-15 17:15:38 +00:00
|
|
|
, pythonRelaxDepsHook
|
2021-03-23 19:22:30 +00:00
|
|
|
, django
|
|
|
|
, funcy
|
|
|
|
, redis
|
2023-07-15 17:15:38 +00:00
|
|
|
, six
|
2022-09-09 14:08:57 +00:00
|
|
|
, pytestCheckHook
|
2023-07-15 17:15:38 +00:00
|
|
|
, pytest-django
|
|
|
|
, mock
|
|
|
|
, dill
|
|
|
|
, jinja2
|
|
|
|
, before-after
|
2023-03-04 12:14:45 +00:00
|
|
|
, pythonOlder
|
2023-07-15 17:15:38 +00:00
|
|
|
, nettools
|
|
|
|
, pkgs
|
2021-03-23 19:22:30 +00:00
|
|
|
}:
|
|
|
|
|
|
|
|
buildPythonPackage rec {
|
|
|
|
pname = "django-cacheops";
|
2023-07-15 17:15:38 +00:00
|
|
|
version = "7.0.1";
|
2023-03-04 12:14:45 +00:00
|
|
|
format = "setuptools";
|
|
|
|
|
|
|
|
disabled = pythonOlder "3.7";
|
2021-03-23 19:22:30 +00:00
|
|
|
|
|
|
|
src = fetchPypi {
|
|
|
|
inherit pname version;
|
2023-07-15 17:15:38 +00:00
|
|
|
hash = "sha256-Ed3qh90DlWiXikCD2JyJ37hm6lWnpI+2haaPwZiotlA=";
|
2021-03-23 19:22:30 +00:00
|
|
|
};
|
|
|
|
|
2023-07-15 17:15:38 +00:00
|
|
|
nativeBuildInputs = [
|
|
|
|
pythonRelaxDepsHook
|
|
|
|
];
|
|
|
|
pythonRelaxDeps = [ "funcy" ];
|
|
|
|
|
2021-03-23 19:22:30 +00:00
|
|
|
propagatedBuildInputs = [
|
|
|
|
django
|
|
|
|
funcy
|
|
|
|
redis
|
|
|
|
six
|
|
|
|
];
|
|
|
|
|
2023-02-02 18:25:31 +00:00
|
|
|
nativeCheckInputs = [
|
2022-09-09 14:08:57 +00:00
|
|
|
pytestCheckHook
|
|
|
|
pytest-django
|
2023-07-15 17:15:38 +00:00
|
|
|
mock
|
|
|
|
dill
|
|
|
|
jinja2
|
|
|
|
before-after
|
|
|
|
nettools
|
|
|
|
pkgs.redis
|
2022-09-09 14:08:57 +00:00
|
|
|
];
|
|
|
|
|
2023-07-15 17:15:38 +00:00
|
|
|
preCheck = ''
|
|
|
|
redis-server &
|
2023-08-04 22:07:22 +00:00
|
|
|
REDIS_PID=$!
|
2023-07-15 17:15:38 +00:00
|
|
|
while ! redis-cli --scan ; do
|
|
|
|
echo waiting for redis to be ready
|
|
|
|
sleep 1
|
|
|
|
done
|
|
|
|
'';
|
2022-09-09 14:08:57 +00:00
|
|
|
|
2023-08-04 22:07:22 +00:00
|
|
|
postCheck = ''
|
|
|
|
kill $REDIS_PID
|
|
|
|
'';
|
|
|
|
|
2022-09-09 14:08:57 +00:00
|
|
|
DJANGO_SETTINGS_MODULE = "tests.settings";
|
2021-03-23 19:22:30 +00:00
|
|
|
|
|
|
|
meta = with lib; {
|
|
|
|
description = "A slick ORM cache with automatic granular event-driven invalidation for Django";
|
|
|
|
homepage = "https://github.com/Suor/django-cacheops";
|
2023-03-04 12:14:45 +00:00
|
|
|
changelog = "https://github.com/Suor/django-cacheops/blob/${version}/CHANGELOG";
|
2021-03-23 19:22:30 +00:00
|
|
|
license = licenses.bsd3;
|
2022-09-09 14:08:57 +00:00
|
|
|
maintainers = with maintainers; [ onny ];
|
2021-03-23 19:22:30 +00:00
|
|
|
};
|
|
|
|
}
|