depot/third_party/nixpkgs/pkgs/development/python-modules/django-debug-toolbar/default.nix
Default email 92b3d6365d Project import generated by Copybara.
GitOrigin-RevId: 412b9917cea092f3d39f9cd5dead4effd5bc4053
2022-10-30 16:09:59 +01:00

58 lines
1.2 KiB
Nix

{ lib
, fetchFromGitHub
, pythonOlder
, buildPythonPackage
, python
, django
, jinja2
, sqlparse
, html5lib
}:
buildPythonPackage rec {
pname = "django-debug-toolbar";
version = "3.7";
format = "setuptools";
disabled = pythonOlder "3.7";
src = fetchFromGitHub {
owner = "jazzband";
repo = pname;
rev = "refs/tags/${version}";
hash = "sha256-LGEx21m5TNotbwKHf5in+EDkYqqNOoF7mBstnfLYe9s=";
};
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
'';
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 ];
};
}