1{ 2 lib, 3 fetchFromGitHub, 4 pythonOlder, 5 buildPythonPackage, 6 7 # build-system 8 hatchling, 9 10 # dependencies 11 django, 12 sqlparse, 13 14 # tests 15 django-csp, 16 html5lib, 17 jinja2, 18 pygments, 19 pytest-django, 20 pytestCheckHook, 21}: 22 23buildPythonPackage rec { 24 pname = "django-debug-toolbar"; 25 version = "5.0.1"; 26 pyproject = true; 27 28 disabled = pythonOlder "3.9"; 29 30 src = fetchFromGitHub { 31 owner = "jazzband"; 32 repo = "django-debug-toolbar"; 33 tag = version; 34 hash = "sha256-Q0joSIFXhoVmNQ+AfESdEWUGY1xmJzr4iR6Ak54YM7c="; 35 }; 36 37 build-system = [ hatchling ]; 38 39 dependencies = [ 40 django 41 sqlparse 42 ]; 43 44 env = { 45 DB_BACKEND = "sqlite3"; 46 DB_NAME = ":memory:"; 47 DJANGO_SETTINGS_MODULE = "tests.settings"; 48 }; 49 50 nativeCheckInputs = [ 51 django-csp 52 html5lib 53 jinja2 54 pygments 55 ]; 56 57 checkPhase = '' 58 runHook preCheck 59 python -m django test tests 60 runHook postCheck 61 ''; 62 63 pythonImportsCheck = [ "debug_toolbar" ]; 64 65 meta = with lib; { 66 description = "Configurable set of panels that display debug information about the current request/response"; 67 homepage = "https://github.com/jazzband/django-debug-toolbar"; 68 changelog = "https://django-debug-toolbar.readthedocs.io/en/latest/changes.html"; 69 license = licenses.bsd3; 70 maintainers = with maintainers; [ yuu ]; 71 }; 72}