1a04744f74
There is no need to disable Python packages for Python versions that are
no longer in Nixpkgs.
This change was generated using the following script:
pattern='^\s*disabled\s*=\s*pythonOlder\s*"3\.\([0-9]\|10\)"\s*;\s*$'
for f in $(find -name '*.nix'); do
grep -q "$pattern" "$f" || continue
sed -i "/$pattern/d" "$f"
if [ $(grep -c pythonOlder "$f") == 1 ]; then
sed -i '/^\s*pythonOlder,\s*$/d' "$f"
fi
nixfmt "$f"
done
73 lines
1.3 KiB
Nix
73 lines
1.3 KiB
Nix
{
|
|
lib,
|
|
fetchFromGitHub,
|
|
buildPythonPackage,
|
|
|
|
# build-system
|
|
hatchling,
|
|
|
|
# dependencies
|
|
django,
|
|
sqlparse,
|
|
|
|
# tests
|
|
django-csp,
|
|
html5lib,
|
|
jinja2,
|
|
pygments,
|
|
}:
|
|
|
|
buildPythonPackage rec {
|
|
pname = "django-debug-toolbar";
|
|
version = "6.1.0";
|
|
pyproject = true;
|
|
|
|
src = fetchFromGitHub {
|
|
owner = "jazzband";
|
|
repo = "django-debug-toolbar";
|
|
tag = version;
|
|
hash = "sha256-gDBir6xf4BBo3KwfVGEUo+Ve5vsmuB12cQqy9sdXSUg=";
|
|
};
|
|
|
|
postPatch = ''
|
|
# not actually used and we don't have django-template-partials packaged
|
|
sed -i "/template_partials/d" tests/settings.py
|
|
'';
|
|
|
|
build-system = [ hatchling ];
|
|
|
|
dependencies = [
|
|
django
|
|
sqlparse
|
|
];
|
|
|
|
env = {
|
|
DB_BACKEND = "sqlite3";
|
|
DB_NAME = ":memory:";
|
|
DJANGO_SETTINGS_MODULE = "tests.settings";
|
|
};
|
|
|
|
nativeCheckInputs = [
|
|
django-csp
|
|
html5lib
|
|
jinja2
|
|
pygments
|
|
];
|
|
|
|
checkPhase = ''
|
|
runHook preCheck
|
|
python -m django test tests
|
|
runHook postCheck
|
|
'';
|
|
|
|
pythonImportsCheck = [ "debug_toolbar" ];
|
|
|
|
meta = {
|
|
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 = lib.licenses.bsd3;
|
|
maintainers = [ ];
|
|
};
|
|
}
|