1{ lib
2, buildPythonPackage
3, fetchPypi
4, fetchpatch
5
6# propagates
7, django-gravatar2
8, django-allauth
9, mailmanclient
10, pytz
11
12# tests
13, django
14, pytest-django
15, pytestCheckHook
16}:
17
18buildPythonPackage rec {
19 pname = "django-mailman3";
20 version = "1.3.9";
21 format = "setuptools";
22
23 src = fetchPypi {
24 inherit pname version;
25 hash = "sha256-GpI1W0O9aJpLF/mcS23ktJDZsP69S2zQy7drOiWBnTM=";
26 };
27
28 patches = [
29 (fetchpatch {
30 url = "https://gitlab.com/mailman/django-mailman3/-/commit/840d0d531a0813de9a30e72427e202aea21b40fe.patch";
31 hash = "sha256-vltvsIP/SWpQZeXDUB+GWlTu+ghFMUqIT8i6CrYcmGo=";
32 })
33 (fetchpatch {
34 url = "https://gitlab.com/mailman/django-mailman3/-/commit/25c55e31d28f2fa8eb23f0e83c12f9b0a05bfbf0.patch";
35 hash = "sha256-ug5tBmnVfJTn5ufDDVg/cEtsZM59jQYJpQZV51T3qIc=";
36 })
37 ];
38
39 postPatch = ''
40 substituteInPlace setup.py \
41 --replace 'django>=3.2,<4.2' 'django>=3.2,<4.3'
42 '';
43
44 propagatedBuildInputs = [
45 django-allauth
46 django-gravatar2
47 mailmanclient
48 pytz
49 ];
50
51 nativeCheckInputs = [
52 django
53 pytest-django
54 pytestCheckHook
55 ];
56
57 pythonImportsCheck = [
58 "django_mailman3"
59 ];
60
61 meta = with lib; {
62 description = "Django library for Mailman UIs";
63 homepage = "https://gitlab.com/mailman/django-mailman3";
64 license = licenses.gpl3Plus;
65 maintainers = with maintainers; [ qyliss ];
66 };
67}