1{ 2 lib, 3 fetchFromGitHub, 4 pythonOlder, 5 buildPythonPackage, 6 python, 7 hatchling, 8 django, 9 jinja2, 10 sqlparse, 11 html5lib, 12}: 13 14buildPythonPackage rec { 15 pname = "django-debug-toolbar"; 16 version = "4.3"; 17 format = "pyproject"; 18 19 disabled = pythonOlder "3.8"; 20 21 src = fetchFromGitHub { 22 owner = "jazzband"; 23 repo = pname; 24 rev = "refs/tags/${version}"; 25 hash = "sha256-8rwEM+YSO9TtkC1UWS4JrzFH+TlGOHzL+WmxNwMJIWQ="; 26 }; 27 28 nativeBuildInputs = [ hatchling ]; 29 30 propagatedBuildInputs = [ 31 django 32 jinja2 33 sqlparse 34 ]; 35 36 DB_BACKEND = "sqlite3"; 37 DB_NAME = ":memory:"; 38 TEST_ARGS = "tests"; 39 DJANGO_SETTINGS_MODULE = "tests.settings"; 40 41 nativeCheckInputs = [ html5lib ]; 42 43 checkPhase = '' 44 runHook preCheck 45 ${python.interpreter} -m django test ${TEST_ARGS} 46 runHook postCheck 47 ''; 48 49 pythonImportsCheck = [ "debug_toolbar" ]; 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}