summaryrefslogtreecommitdiff
path: root/pkgs/development/python-modules/django-mailman3/default.nix
blob: 6d47d5a9ed89f75d861167a9a58b9756a75249a9 (plain)
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
{
  lib,
  buildPythonPackage,
  fetchPypi,

  # build-system
  pdm-backend,

  # dependencies
  django-gravatar2,
  django-allauth,
  mailmanclient,
  pytz,

  # tests
  django,
  pytest-django,
  pytestCheckHook,
  nixosTests,
}:

buildPythonPackage rec {
  pname = "django-mailman3";
  version = "1.3.15";
  pyproject = true;

  src = fetchPypi {
    pname = "django_mailman3";
    inherit version;
    hash = "sha256-+ZFrJpy5xdW6Yde/XEvxoAN8+TSQdiI0PfjZ7bHG0Rs=";
  };

  pythonRelaxDeps = [ "django-allauth" ];

  build-system = [ pdm-backend ];

  dependencies = [
    django-allauth
    django-gravatar2
    mailmanclient
    pytz
  ]
  ++ django-allauth.optional-dependencies.openid
  ++ django-allauth.optional-dependencies.socialaccount;

  nativeCheckInputs = [
    django
    pytest-django
    pytestCheckHook
  ];

  preCheck = ''
    export DJANGO_SETTINGS_MODULE=django_mailman3.tests.settings_test
  '';

  pythonImportsCheck = [ "django_mailman3" ];

  passthru.tests = {
    inherit (nixosTests) mailman;
  };

  meta = {
    description = "Django library for Mailman UIs";
    homepage = "https://gitlab.com/mailman/django-mailman3";
    license = lib.licenses.gpl3Plus;
    maintainers = with lib.maintainers; [ qyliss ];
    broken =
      lib.versionAtLeast django-allauth.version "65.0.0" || lib.versionAtLeast django.version "5.1";
  };
}