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.2.2";
15 disabled = pythonOlder "3.6";
16
17 src = fetchFromGitHub {
18 owner = "jazzband";
19 repo = pname;
20 rev = version;
21 sha256 = "1dgb3s449nasbnqd5xfikxrfhwwilwlgrw9nv4bfkapvkzpdszjk";
22 };
23
24 propagatedBuildInputs = [
25 django
26 jinja2
27 sqlparse
28 ];
29
30 DB_BACKEND = "sqlite3";
31 DB_NAME = ":memory:";
32 TEST_ARGS = "tests";
33 DJANGO_SETTINGS_MODULE = "tests.settings";
34
35 checkInputs = [
36 html5lib
37 ];
38
39 checkPhase = ''
40 runHook preCheck
41 ${python.interpreter} -m django test ${TEST_ARGS}
42 runHook postCheck
43 '';
44
45 meta = {
46 description = "Configurable set of panels that display debug information about the current request/response";
47 homepage = "https://github.com/jazzband/django-debug-toolbar";
48 changelog = "https://django-debug-toolbar.readthedocs.io/en/latest/changes.html";
49 maintainers = with lib.maintainers; [ yuu ];
50 license = lib.licenses.bsd3;
51 };
52}