about summary refs log tree commit diff
path: root/pkgs/development/python-modules/wagtail/default.nix
blob: 220e9000f42c8a8717b2a3a37a00cdff86166dad (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
{
  lib,
  anyascii,
  beautifulsoup4,
  buildPythonPackage,
  callPackage,
  django,
  django-filter,
  django-modelcluster,
  django-taggit,
  django-treebeard,
  djangorestframework,
  draftjs-exporter,
  fetchPypi,
  html5lib,
  l18n,
  laces,
  openpyxl,
  permissionedforms,
  pillow,
  pythonOlder,
  requests,
  telepath,
  willow,
}:

buildPythonPackage rec {
  pname = "wagtail";
  version = "6.0.2";
  format = "setuptools";

  disabled = pythonOlder "3.8";

  src = fetchPypi {
    inherit pname version;
    hash = "sha256-58/DwPU/swLxeY8OAqesYHirAusOhwPA9xzL0/GOOG8=";
  };

  postPatch = ''
    substituteInPlace setup.py \
      --replace "django-filter>=23.3,<24" "django-filter>=23.3,<24.3"
  '';

  propagatedBuildInputs = [
    anyascii
    beautifulsoup4
    django
    django-treebeard
    django-filter
    django-modelcluster
    django-taggit
    djangorestframework
    draftjs-exporter
    html5lib
    l18n
    laces
    openpyxl
    permissionedforms
    pillow
    requests
    telepath
    willow
  ] ++ willow.optional-dependencies.heif;

  # Tests are in separate derivation because they require a package that depends
  # on wagtail (wagtail-factories)
  doCheck = false;

  passthru.tests.wagtail = callPackage ./tests.nix { };

  pythonImportsCheck = [ "wagtail" ];

  meta = with lib; {
    description = "A Django content management system focused on flexibility and user experience";
    mainProgram = "wagtail";
    homepage = "https://github.com/wagtail/wagtail";
    changelog = "https://github.com/wagtail/wagtail/blob/v${version}/CHANGELOG.txt";
    license = licenses.bsd3;
    maintainers = with maintainers; [ sephi ];
  };
}