f34ce41345
GitOrigin-RevId: b73c2221a46c13557b1b3be9c2070cc42cf01eb3
58 lines
1.2 KiB
Nix
58 lines
1.2 KiB
Nix
{
|
|
lib,
|
|
fetchFromGitHub,
|
|
pythonOlder,
|
|
buildPythonPackage,
|
|
python,
|
|
hatchling,
|
|
django,
|
|
jinja2,
|
|
sqlparse,
|
|
html5lib,
|
|
}:
|
|
|
|
buildPythonPackage rec {
|
|
pname = "django-debug-toolbar";
|
|
version = "4.4.2";
|
|
format = "pyproject";
|
|
|
|
disabled = pythonOlder "3.8";
|
|
|
|
src = fetchFromGitHub {
|
|
owner = "jazzband";
|
|
repo = pname;
|
|
rev = "refs/tags/${version}";
|
|
hash = "sha256-ZfGDXyrHwlFpeGK1QTD4nlGWdbEK7+hurOVkAAp/LyA=";
|
|
};
|
|
|
|
nativeBuildInputs = [ hatchling ];
|
|
|
|
propagatedBuildInputs = [
|
|
django
|
|
jinja2
|
|
sqlparse
|
|
];
|
|
|
|
DB_BACKEND = "sqlite3";
|
|
DB_NAME = ":memory:";
|
|
TEST_ARGS = "tests";
|
|
DJANGO_SETTINGS_MODULE = "tests.settings";
|
|
|
|
nativeCheckInputs = [ html5lib ];
|
|
|
|
checkPhase = ''
|
|
runHook preCheck
|
|
${python.interpreter} -m django test ${TEST_ARGS}
|
|
runHook postCheck
|
|
'';
|
|
|
|
pythonImportsCheck = [ "debug_toolbar" ];
|
|
|
|
meta = with lib; {
|
|
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";
|
|
license = licenses.bsd3;
|
|
maintainers = with maintainers; [ yuu ];
|
|
};
|
|
}
|