1{ lib
2, buildPythonPackage
3, fetchFromGitHub
4, django
5, django-debug-toolbar
6, psycopg2
7, beautifulsoup4
8, python
9, pytz
10}:
11
12buildPythonPackage rec {
13 pname = "django-cachalot";
14 version = "2.6.1";
15 format = "setuptools";
16
17 src = fetchFromGitHub {
18 owner = "noripyt";
19 repo = "django-cachalot";
20 rev = "v${version}";
21 hash = "sha256-bCiIZkh02+7xL6aSWE9by+4dFDsanr0iXuO9QKpLOjw=";
22 };
23
24 patches = [
25 # Disable tests for unsupported caching and database types which would
26 # require additional running backends
27 ./disable-unsupported-tests.patch
28 ];
29
30 propagatedBuildInputs = [
31 django
32 ];
33
34 checkInputs = [
35 beautifulsoup4
36 django-debug-toolbar
37 psycopg2
38 pytz
39 ];
40
41 pythonImportsCheck = [ "cachalot" ];
42
43 checkPhase = ''
44 runHook preCheck
45 ${python.interpreter} runtests.py
46 runHook postCheck
47 '';
48
49 meta = with lib; {
50 description = "No effort, no worry, maximum performance";
51 homepage = "https://github.com/noripyt/django-cachalot";
52 changelog = "https://github.com/noripyt/django-cachalot/blob/${src.rev}/CHANGELOG.rst";
53 license = licenses.bsd3;
54 maintainers = with maintainers; [ onny ];
55 };
56}