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-08-22 20:05:09 +00:00
|
|
|
version = "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}";
|
2023-08-22 20:05:09 +00:00
|
|
|
hash = "sha256-hPO2q3V69kpyahav4cgUHz/3WLxXnZYCyWGetyNS+2Q=";
|
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";
|
|
|
|
|
2023-02-02 18:25:31 +00:00
|
|
|
nativeCheckInputs = [
|
2021-12-06 16:07:01 +00:00
|
|
|
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 ];
|
2023-08-22 20:05:09 +00:00
|
|
|
};
|
2021-12-06 16:07:01 +00:00
|
|
|
}
|