1{ lib
2, buildPythonPackage
3, fetchFromGitHub
4
5# build-system
6, hatchling
7
8# non-propagates
9, django
10
11# dependencies
12, beautifulsoup4
13
14# tests
15, python
16}:
17
18buildPythonPackage rec {
19 pname = "django-bootstrap4";
20 version = "23.2";
21 format = "pyproject";
22
23 src = fetchFromGitHub {
24 owner = "zostera";
25 repo = "django-bootstrap4";
26 rev = "refs/tags/v${version}";
27 hash = "sha256-RYGwi+hRfTqPAikrv33w27v1/WLwRvXexSusJKdr2o8=";
28 };
29
30 nativeBuildInputs = [
31 hatchling
32 ];
33
34 propagatedBuildInputs = [
35 beautifulsoup4
36 ];
37
38 pythonImportsCheck = [
39 "bootstrap4"
40 ];
41
42 nativeCheckInputs = [
43 (django.override { withGdal = true; })
44 ];
45
46 checkPhase = ''
47 runHook preCheck
48 ${python.interpreter} manage.py test -v1 --noinput
49 runHook postCheck
50 '';
51
52 meta = with lib; {
53 description = "Bootstrap 4 integration with Django";
54 homepage = "https://github.com/zostera/django-bootstrap4";
55 changelog = "https://github.com/zostera/django-bootstrap4/blob/${src.rev}/CHANGELOG.md";
56 license = licenses.bsd3;
57 maintainers = with maintainers; [ hexa ];
58 };
59}