2023-07-25 15:50:42 +02:00
|
|
|
{
|
|
|
|
lib,
|
2025-01-15 10:03:29 +01:00
|
|
|
beautifulsoup4,
|
2023-07-25 15:50:42 +02:00
|
|
|
buildPythonPackage,
|
2024-04-20 20:14:52 +02:00
|
|
|
django,
|
2025-01-15 10:03:29 +01:00
|
|
|
fetchFromGitHub,
|
2025-03-03 03:23:11 +01:00
|
|
|
hatchling,
|
2025-01-15 10:03:29 +01:00
|
|
|
jinja2,
|
2023-07-25 15:50:42 +02:00
|
|
|
pillow,
|
2024-04-20 20:14:52 +02:00
|
|
|
pytest-django,
|
|
|
|
pytestCheckHook,
|
2025-01-15 10:03:29 +01:00
|
|
|
pythonOlder,
|
2023-07-25 15:50:42 +02:00
|
|
|
}:
|
|
|
|
|
|
|
|
buildPythonPackage rec {
|
|
|
|
pname = "django-bootstrap5";
|
2025-03-03 03:23:11 +01:00
|
|
|
version = "25.1";
|
2024-04-20 20:14:52 +02:00
|
|
|
pyproject = true;
|
|
|
|
|
2023-07-25 15:50:42 +02:00
|
|
|
disabled = pythonOlder "3.7";
|
|
|
|
|
|
|
|
src = fetchFromGitHub {
|
|
|
|
owner = "zostera";
|
|
|
|
repo = "django-bootstrap5";
|
2025-04-08 02:51:45 -04:00
|
|
|
rev = "v${version}";
|
2025-03-03 03:23:11 +01:00
|
|
|
hash = "sha256-5VYw9Kq33/YFW9mFzkFzhrxavfx6r/CtC1SJhZbanhg=";
|
2023-07-25 15:50:42 +02:00
|
|
|
};
|
|
|
|
|
2025-03-03 03:23:11 +01:00
|
|
|
build-system = [ hatchling ];
|
2023-07-25 15:50:42 +02:00
|
|
|
|
2025-01-15 10:03:29 +01:00
|
|
|
dependencies = [ django ];
|
|
|
|
|
|
|
|
optional-dependencies = {
|
|
|
|
jinja = [ jinja2 ];
|
|
|
|
};
|
|
|
|
|
2024-04-20 20:14:52 +02:00
|
|
|
nativeCheckInputs = [
|
2023-07-25 15:50:42 +02:00
|
|
|
beautifulsoup4
|
2024-04-20 20:14:52 +02:00
|
|
|
(django.override { withGdal = true; })
|
2023-07-25 15:50:42 +02:00
|
|
|
pillow
|
2024-04-20 20:14:52 +02:00
|
|
|
pytest-django
|
|
|
|
pytestCheckHook
|
2025-03-03 03:23:11 +01:00
|
|
|
] ++ lib.flatten (lib.attrValues optional-dependencies);
|
2024-04-20 20:14:52 +02:00
|
|
|
|
|
|
|
preCheck = ''
|
|
|
|
export DJANGO_SETTINGS_MODULE=tests.app.settings
|
|
|
|
'';
|
|
|
|
|
|
|
|
disabledTests = [
|
|
|
|
# urllib.error.URLError: <urlopen error [Errno -3] Temporary failure in name resolution>
|
|
|
|
"test_get_bootstrap_setting"
|
2023-07-25 15:50:42 +02:00
|
|
|
];
|
|
|
|
|
|
|
|
pythonImportsCheck = [ "django_bootstrap5" ];
|
|
|
|
|
|
|
|
meta = with lib; {
|
|
|
|
description = "Bootstrap 5 integration with Django";
|
|
|
|
homepage = "https://github.com/zostera/django-bootstrap5";
|
|
|
|
changelog = "https://github.com/zostera/django-bootstrap5/blob/${src.rev}/CHANGELOG.md";
|
|
|
|
license = licenses.bsd3;
|
|
|
|
maintainers = with maintainers; [ netali ];
|
|
|
|
};
|
|
|
|
}
|