2021-11-01 10:38:51 -03:00
|
|
|
{
|
|
|
|
lib,
|
|
|
|
fetchFromGitHub,
|
|
|
|
pythonOlder,
|
|
|
|
buildPythonPackage,
|
2025-01-19 21:15:07 +01:00
|
|
|
|
|
|
|
# build-system
|
2022-12-30 20:13:06 +01:00
|
|
|
hatchling,
|
2025-01-19 21:15:07 +01:00
|
|
|
|
|
|
|
# dependencies
|
2021-11-01 10:38:51 -03:00
|
|
|
django,
|
|
|
|
sqlparse,
|
2025-01-19 21:15:07 +01:00
|
|
|
|
|
|
|
# tests
|
|
|
|
django-csp,
|
2021-11-01 10:38:51 -03:00
|
|
|
html5lib,
|
2025-01-19 21:15:07 +01:00
|
|
|
jinja2,
|
|
|
|
pygments,
|
|
|
|
pytest-django,
|
|
|
|
pytestCheckHook,
|
2021-11-01 10:38:51 -03:00
|
|
|
}:
|
|
|
|
|
|
|
|
buildPythonPackage rec {
|
|
|
|
pname = "django-debug-toolbar";
|
2025-01-19 21:15:07 +01:00
|
|
|
version = "5.0.1";
|
|
|
|
pyproject = true;
|
2022-06-19 17:22:01 +02:00
|
|
|
|
2025-01-19 21:15:07 +01:00
|
|
|
disabled = pythonOlder "3.9";
|
2021-11-01 10:38:51 -03:00
|
|
|
|
|
|
|
src = fetchFromGitHub {
|
|
|
|
owner = "jazzband";
|
2025-01-19 21:15:07 +01:00
|
|
|
repo = "django-debug-toolbar";
|
2025-01-03 21:24:13 +01:00
|
|
|
tag = version;
|
2025-01-19 21:15:07 +01:00
|
|
|
hash = "sha256-Q0joSIFXhoVmNQ+AfESdEWUGY1xmJzr4iR6Ak54YM7c=";
|
2021-11-01 10:38:51 -03:00
|
|
|
};
|
|
|
|
|
2025-01-19 21:15:07 +01:00
|
|
|
build-system = [ hatchling ];
|
2022-12-30 20:13:06 +01:00
|
|
|
|
2025-01-19 21:15:07 +01:00
|
|
|
dependencies = [
|
2021-11-01 10:38:51 -03:00
|
|
|
django
|
|
|
|
sqlparse
|
|
|
|
];
|
|
|
|
|
2025-01-19 21:15:07 +01:00
|
|
|
env = {
|
|
|
|
DB_BACKEND = "sqlite3";
|
|
|
|
DB_NAME = ":memory:";
|
|
|
|
DJANGO_SETTINGS_MODULE = "tests.settings";
|
|
|
|
};
|
2021-11-01 10:38:51 -03:00
|
|
|
|
2025-01-19 21:15:07 +01:00
|
|
|
nativeCheckInputs = [
|
|
|
|
django-csp
|
|
|
|
html5lib
|
|
|
|
jinja2
|
|
|
|
pygments
|
|
|
|
];
|
2021-11-01 10:38:51 -03:00
|
|
|
|
|
|
|
checkPhase = ''
|
|
|
|
runHook preCheck
|
2025-01-19 21:15:07 +01:00
|
|
|
python -m django test tests
|
2021-11-01 10:38:51 -03:00
|
|
|
runHook postCheck
|
|
|
|
'';
|
|
|
|
|
2022-06-19 21:13:43 +02:00
|
|
|
pythonImportsCheck = [ "debug_toolbar" ];
|
|
|
|
|
2022-06-19 17:22:01 +02:00
|
|
|
meta = with lib; {
|
2021-11-01 10:38:51 -03: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-19 17:22:01 +02:00
|
|
|
license = licenses.bsd3;
|
2022-06-19 21:13:43 +02:00
|
|
|
maintainers = with maintainers; [ yuu ];
|
2023-08-10 13:23:14 +02:00
|
|
|
};
|
2021-11-01 10:38:51 -03:00
|
|
|
}
|