2024-06-05 15:53:02 +00:00
|
|
|
{
|
|
|
|
lib,
|
|
|
|
fetchFromGitHub,
|
|
|
|
pythonOlder,
|
|
|
|
buildPythonPackage,
|
|
|
|
python,
|
|
|
|
hatchling,
|
|
|
|
django,
|
|
|
|
jinja2,
|
|
|
|
sqlparse,
|
|
|
|
html5lib,
|
2021-12-06 16:07:01 +00:00
|
|
|
}:
|
|
|
|
|
|
|
|
buildPythonPackage rec {
|
|
|
|
pname = "django-debug-toolbar";
|
2024-07-27 06:49:29 +00:00
|
|
|
version = "4.4.2";
|
2023-01-20 10:41:00 +00:00
|
|
|
format = "pyproject";
|
2022-06-26 10:26:21 +00:00
|
|
|
|
2023-08-22 20:05:09 +00:00
|
|
|
disabled = pythonOlder "3.8";
|
2021-12-06 16:07:01 +00:00
|
|
|
|
|
|
|
src = fetchFromGitHub {
|
|
|
|
owner = "jazzband";
|
|
|
|
repo = pname;
|
2022-06-26 10:26:21 +00:00
|
|
|
rev = "refs/tags/${version}";
|
2024-07-27 06:49:29 +00:00
|
|
|
hash = "sha256-ZfGDXyrHwlFpeGK1QTD4nlGWdbEK7+hurOVkAAp/LyA=";
|
2021-12-06 16:07:01 +00:00
|
|
|
};
|
|
|
|
|
2024-06-05 15:53:02 +00:00
|
|
|
nativeBuildInputs = [ hatchling ];
|
2023-01-20 10:41:00 +00:00
|
|
|
|
2021-12-06 16:07:01 +00:00
|
|
|
propagatedBuildInputs = [
|
|
|
|
django
|
|
|
|
jinja2
|
|
|
|
sqlparse
|
|
|
|
];
|
|
|
|
|
|
|
|
DB_BACKEND = "sqlite3";
|
|
|
|
DB_NAME = ":memory:";
|
|
|
|
TEST_ARGS = "tests";
|
|
|
|
DJANGO_SETTINGS_MODULE = "tests.settings";
|
|
|
|
|
2024-06-05 15:53:02 +00:00
|
|
|
nativeCheckInputs = [ html5lib ];
|
2021-12-06 16:07:01 +00:00
|
|
|
|
|
|
|
checkPhase = ''
|
|
|
|
runHook preCheck
|
|
|
|
${python.interpreter} -m django test ${TEST_ARGS}
|
|
|
|
runHook postCheck
|
|
|
|
'';
|
|
|
|
|
2024-06-05 15:53:02 +00:00
|
|
|
pythonImportsCheck = [ "debug_toolbar" ];
|
2022-06-26 10:26:21 +00:00
|
|
|
|
|
|
|
meta = with lib; {
|
2021-12-06 16:07:01 +00:00
|
|
|
description = "Configurable set of panels that display debug information about the current request/response";
|
|
|
|
homepage = "https://github.com/jazzband/django-debug-toolbar";
|
|
|
|
changelog = "https://django-debug-toolbar.readthedocs.io/en/latest/changes.html";
|
2022-06-26 10:26:21 +00:00
|
|
|
license = licenses.bsd3;
|
|
|
|
maintainers = with maintainers; [ yuu ];
|
2023-08-22 20:05:09 +00:00
|
|
|
};
|
2021-12-06 16:07:01 +00:00
|
|
|
}
|