2021-12-06 16:07:01 +00:00
|
|
|
{ lib
|
|
|
|
, fetchFromGitHub
|
|
|
|
, pythonOlder
|
|
|
|
, buildPythonPackage
|
|
|
|
, python
|
2023-01-20 10:41:00 +00:00
|
|
|
, hatchling
|
2021-12-06 16:07:01 +00:00
|
|
|
, django
|
|
|
|
, jinja2
|
|
|
|
, sqlparse
|
|
|
|
, html5lib
|
|
|
|
}:
|
|
|
|
|
|
|
|
buildPythonPackage rec {
|
|
|
|
pname = "django-debug-toolbar";
|
2023-01-20 10:41:00 +00:00
|
|
|
version = "3.8.1";
|
|
|
|
format = "pyproject";
|
2022-06-26 10:26:21 +00:00
|
|
|
|
|
|
|
disabled = pythonOlder "3.7";
|
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}";
|
2023-01-20 10:41:00 +00:00
|
|
|
hash = "sha256-GlEw25wem8iwwm3rYLk6TFEAIzC1pYjpSHdAkHwtFcE=";
|
2021-12-06 16:07:01 +00:00
|
|
|
};
|
|
|
|
|
2023-01-20 10:41:00 +00:00
|
|
|
nativeBuildInputs = [
|
|
|
|
hatchling
|
|
|
|
];
|
|
|
|
|
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";
|
|
|
|
|
|
|
|
checkInputs = [
|
|
|
|
html5lib
|
|
|
|
];
|
|
|
|
|
|
|
|
checkPhase = ''
|
|
|
|
runHook preCheck
|
|
|
|
${python.interpreter} -m django test ${TEST_ARGS}
|
|
|
|
runHook postCheck
|
|
|
|
'';
|
|
|
|
|
2022-06-26 10:26:21 +00:00
|
|
|
pythonImportsCheck = [
|
|
|
|
"debug_toolbar"
|
|
|
|
];
|
|
|
|
|
|
|
|
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 ];
|
|
|
|
};
|
2021-12-06 16:07:01 +00:00
|
|
|
}
|