1{
2 lib,
3 buildPythonPackage,
4 fetchPypi,
5
6 # build-system
7 setuptools,
8
9 # dependencies
10 anyascii,
11 beautifulsoup4,
12 django,
13 django-filter,
14 django-modelcluster,
15 django-taggit,
16 django-tasks,
17 django-treebeard,
18 djangorestframework,
19 draftjs-exporter,
20 laces,
21 openpyxl,
22 permissionedforms,
23 pillow,
24 requests,
25 telepath,
26 willow,
27
28 # tests
29 callPackage,
30}:
31
32buildPythonPackage rec {
33 pname = "wagtail";
34 version = "6.4.1";
35 pyproject = true;
36
37 # The GitHub source requires some assets to be compiled, which in turn
38 # requires fixing the upstream package lock. We need to use the PyPI release
39 # until https://github.com/wagtail/wagtail/pull/13136 gets merged.
40 src = fetchPypi {
41 inherit pname version;
42 hash = "sha256-zsPm1JIKbRePoetvSvgLNw/dVXDtkkuXkQThV/EMoJc=";
43 };
44
45 build-system = [
46 setuptools
47 ];
48
49 dependencies = [
50 anyascii
51 beautifulsoup4
52 django
53 django-filter
54 django-modelcluster
55 django-taggit
56 django-tasks
57 django-treebeard
58 djangorestframework
59 draftjs-exporter
60 laces
61 openpyxl
62 permissionedforms
63 pillow
64 requests
65 telepath
66 willow
67 ] ++ willow.optional-dependencies.heif;
68
69 # Tests are in separate derivation because they require a package that depends
70 # on wagtail (wagtail-factories)
71 doCheck = false;
72
73 passthru.tests.wagtail = callPackage ./tests.nix { };
74
75 pythonImportsCheck = [ "wagtail" ];
76
77 meta = {
78 description = "Django content management system focused on flexibility and user experience";
79 mainProgram = "wagtail";
80 homepage = "https://github.com/wagtail/wagtail";
81 changelog = "https://github.com/wagtail/wagtail/blob/v${version}/CHANGELOG.txt";
82 license = lib.licenses.bsd3;
83 maintainers = with lib.maintainers; [ sephi ];
84 };
85}