1{ lib
2, fetchFromGitHub
3, pythonOlder
4, buildPythonPackage
5, python
6, django
7, jinja2
8, sqlparse
9, html5lib
10}:
11
12buildPythonPackage rec {
13 pname = "django-debug-toolbar";
14 version = "3.7";
15 format = "setuptools";
16
17 disabled = pythonOlder "3.7";
18
19 src = fetchFromGitHub {
20 owner = "jazzband";
21 repo = pname;
22 rev = "refs/tags/${version}";
23 hash = "sha256-LGEx21m5TNotbwKHf5in+EDkYqqNOoF7mBstnfLYe9s=";
24 };
25
26 propagatedBuildInputs = [
27 django
28 jinja2
29 sqlparse
30 ];
31
32 DB_BACKEND = "sqlite3";
33 DB_NAME = ":memory:";
34 TEST_ARGS = "tests";
35 DJANGO_SETTINGS_MODULE = "tests.settings";
36
37 checkInputs = [
38 html5lib
39 ];
40
41 checkPhase = ''
42 runHook preCheck
43 ${python.interpreter} -m django test ${TEST_ARGS}
44 runHook postCheck
45 '';
46
47 pythonImportsCheck = [
48 "debug_toolbar"
49 ];
50
51 meta = with lib; {
52 description = "Configurable set of panels that display debug information about the current request/response";
53 homepage = "https://github.com/jazzband/django-debug-toolbar";
54 changelog = "https://django-debug-toolbar.readthedocs.io/en/latest/changes.html";
55 license = licenses.bsd3;
56 maintainers = with maintainers; [ yuu ];
57};
58}