61 lines
1.2 KiB
Nix
61 lines
1.2 KiB
Nix
{
|
|
lib,
|
|
buildPythonPackage,
|
|
fetchFromGitHub,
|
|
|
|
# build-system
|
|
uv-build,
|
|
|
|
# non-propagates
|
|
django,
|
|
|
|
# dependencies
|
|
beautifulsoup4,
|
|
|
|
# tests
|
|
pytest-django,
|
|
pytestCheckHook,
|
|
}:
|
|
|
|
buildPythonPackage rec {
|
|
pname = "django-bootstrap4";
|
|
version = "26.1";
|
|
pyproject = true;
|
|
|
|
src = fetchFromGitHub {
|
|
owner = "zostera";
|
|
repo = "django-bootstrap4";
|
|
tag = "v${version}";
|
|
hash = "sha256-g66JJVPB+YQjN5IHSu/jqKVu5gS8Llb+mALJ9f5H2ds=";
|
|
};
|
|
|
|
postPatch = ''
|
|
substituteInPlace pyproject.toml \
|
|
--replace-fail "uv_build>=0.9.6,<0.10.0" uv_build
|
|
'';
|
|
|
|
build-system = [ uv-build ];
|
|
|
|
dependencies = [ beautifulsoup4 ];
|
|
|
|
pythonImportsCheck = [ "bootstrap4" ];
|
|
|
|
nativeCheckInputs = [
|
|
(django.override { withGdal = true; })
|
|
pytest-django
|
|
pytestCheckHook
|
|
];
|
|
|
|
preCheck = ''
|
|
export DJANGO_SETTINGS_MODULE=tests.app.settings
|
|
'';
|
|
|
|
meta = {
|
|
description = "Bootstrap 4 integration with Django";
|
|
homepage = "https://github.com/zostera/django-bootstrap4";
|
|
changelog = "https://github.com/zostera/django-bootstrap4/blob/${src.tag}/CHANGELOG.md";
|
|
license = lib.licenses.bsd3;
|
|
maintainers = with lib.maintainers; [ hexa ];
|
|
};
|
|
}
|