Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Mailman fixes for staging-next #260527

Merged
merged 11 commits into from
Oct 20, 2023
2 changes: 1 addition & 1 deletion nixos/modules/services/mail/mailman.nix
Original file line number Diff line number Diff line change
Expand Up @@ -592,7 +592,7 @@ in {
# Since the mailman-web settings.py obstinately creates a logs
# dir in the cwd, change to the (writable) runtime directory before
# starting uwsgi.
ExecStart = "${pkgs.coreutils}/bin/env -C $RUNTIME_DIRECTORY ${pkgs.uwsgi.override { plugins = ["python3"]; }}/bin/uwsgi --json ${uwsgiConfigFile}";
ExecStart = "${pkgs.coreutils}/bin/env -C $RUNTIME_DIRECTORY ${pkgs.uwsgi.override { plugins = ["python3"]; python3 = webEnv.python; }}/bin/uwsgi --json ${uwsgiConfigFile}";
User = cfg.webUser;
Group = "mailman";
RuntimeDirectory = "mailman-uwsgi";
Expand Down
11 changes: 3 additions & 8 deletions pkgs/development/python-modules/django-allauth/default.nix
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@

buildPythonPackage rec {
pname = "django-allauth";
version = "0.55.2";
version = "0.57.0";
format = "pyproject";

disabled = pythonOlder "3.7";
Expand All @@ -37,7 +37,7 @@ buildPythonPackage rec {
owner = "pennersr";
repo = pname;
rev = version;
hash = "sha256-i0thQymrEDkx2Yt9kM10j4LxL7yChHkG9vsS0508EQA=";
hash = "sha256-zhKqvm43rw28UKNFdfJ2C1dIeZfPqmchb1rJykm1lx4=";
};

nativeBuildInputs = [
Expand Down Expand Up @@ -73,19 +73,14 @@ buildPythonPackage rec {
]
++ lib.flatten (builtins.attrValues passthru.optional-dependencies);

disabledTestPaths = [
# tests are out of date
"allauth/socialaccount/providers/cern/tests.py"
];

passthru.tests = {
inherit dj-rest-auth;
};

meta = with lib; {
changelog = "https://github.com/pennersr/django-allauth/blob/${version}/ChangeLog.rst";
description = "Integrated set of Django applications addressing authentication, registration, account management as well as 3rd party (social) account authentication";
downloadPage = " https://github.com/pennersr/django-allauth";
downloadPage = "https://github.com/pennersr/django-allauth";
homepage = "https://www.intenct.nl/projects/django-allauth";
license = licenses.mit;
maintainers = with maintainers; [ derdennisop ];
Expand Down
12 changes: 12 additions & 0 deletions pkgs/development/python-modules/django-mailman3/default.nix
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
{ lib
, buildPythonPackage
, fetchPypi
, fetchpatch

# propagates
, django-gravatar2
Expand All @@ -24,6 +25,17 @@ buildPythonPackage rec {
hash = "sha256-GpI1W0O9aJpLF/mcS23ktJDZsP69S2zQy7drOiWBnTM=";
};

patches = [
(fetchpatch {
url = "https://gitlab.com/mailman/django-mailman3/-/commit/840d0d531a0813de9a30e72427e202aea21b40fe.patch";
hash = "sha256-vltvsIP/SWpQZeXDUB+GWlTu+ghFMUqIT8i6CrYcmGo=";
})
(fetchpatch {
url = "https://gitlab.com/mailman/django-mailman3/-/commit/25c55e31d28f2fa8eb23f0e83c12f9b0a05bfbf0.patch";
hash = "sha256-ug5tBmnVfJTn5ufDDVg/cEtsZM59jQYJpQZV51T3qIc=";
})
];

postPatch = ''
substituteInPlace setup.py \
--replace 'django>=3.2,<4.2' 'django>=3.2,<4.3'
Expand Down
15 changes: 12 additions & 3 deletions pkgs/development/python-modules/python3-saml/default.nix
Original file line number Diff line number Diff line change
Expand Up @@ -24,14 +24,23 @@ buildPythonPackage rec {
};

patches = [
# skip tests with expired test data
# upstream issue: https://github.com/SAML-Toolkits/python3-saml/issues/373
(fetchpatch {
name = "test-expired.patch";
url = "https://github.com/SAML-Toolkits/python3-saml/commit/bd65578e5a21494c89320094c61c1c77250bea33.diff";
hash = "sha256-9Trew6R5JDjtc0NRGoklqMVDEI4IEqFOdK3ezyBU6gI=";
})
# skip tests with expired test data
# upstream issue: https://github.com/SAML-Toolkits/python3-saml/issues/373
./skip-broken-tests.patch
(fetchpatch {
name = "test-expired.patch";
url = "https://github.com/SAML-Toolkits/python3-saml/commit/ea3a6d4ee6ea0c5cfb0f698d8c0ed25638150f47.patch";
hash = "sha256-Q9+GM+mCEZK0QVp7ulH2hORVig2411OvkC4+o36DeXg=";
})
(fetchpatch {
name = "test-expired.patch";
url = "https://github.com/SAML-Toolkits/python3-saml/commit/feb0d1d954ee4d0ad1ad1d7d536bf9e83fa9431b.patch";
hash = "sha256-NURGI4FUnFlWRZfkioU9IYmZ+Zk9FKfZchjdn7N9abU=";
})
];

propagatedBuildInputs = [
Expand Down

This file was deleted.

5 changes: 5 additions & 0 deletions pkgs/servers/mail/mailman/hyperkitty.nix
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
{ lib
, python3
, fetchPypi
, fetchpatch
}:

with python3.pkgs;
Expand All @@ -17,6 +18,10 @@ buildPythonPackage rec {

patches = [
./0001-Disable-broken-test_help_output-testcase.patch
(fetchpatch {
url = "https://gitlab.com/mailman/hyperkitty/-/commit/5bb394662882bfc73c3e877458da44343aa06922.patch";
hash = "sha256-9vcY6nu3txDftH6aYpdh9qSrLzZceGjVFxuD1Ux18gw=";
})
];

postPatch = ''
Expand Down
7 changes: 5 additions & 2 deletions pkgs/servers/mail/mailman/package.nix
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,6 @@
, fetchpatch
, python3
, fetchPypi
, sphinx
, postfix
, lynx
}:
Expand Down Expand Up @@ -30,7 +29,6 @@ buildPythonPackage rec {
flufl_i18n
flufl_lock
gunicorn
importlib-resources
lazr_config
passlib
requests
Expand All @@ -52,6 +50,11 @@ buildPythonPackage rec {
url = "https://gitlab.com/mailman/mailman/-/commit/9613154f3c04fa2383fbf017031ef263c291418d.patch";
sha256 = "0vyw87s857vfxbf7kihwb6w094xyxmxbi1bpdqi3ybjamjycp55r";
})
(fetchpatch {
url = "https://gitlab.com/mailman/mailman/-/commit/5e4431af6bb7d672a7ed7e3329f8fac7812d47f8.patch";
excludes = [ ".gitlab-ci.yml" ];
hash = "sha256-y2AE9hU4Z1BpBlJywxMWiuRvltWkk+R9YgMkpemvlIo=";
})
./log-stderr.patch
];

Expand Down
17 changes: 17 additions & 0 deletions pkgs/servers/mail/mailman/python.nix
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,14 @@ python3.override {
*/
django = super.django_3;

elasticsearch = super.elasticsearch.overridePythonAttrs ({ pname, ... }: rec {
version = "7.17.9";
src = fetchPypi {
inherit pname version;
hash = "sha256-ZsTs4q3+fMEg4rameYof1cd3rs+C7sObuVzvfPx+orM=";
};
});

# https://gitlab.com/mailman/hyperkitty/-/merge_requests/541
mistune = super.mistune.overridePythonAttrs (old: rec {
version = "2.0.5";
Expand All @@ -29,6 +37,15 @@ python3.override {
hash = "sha256-AkYRPLJJLbh1xr5Wl0p8iTMzvybNkokchfYxUc7gnTQ=";
};
});

# django-q tests fail with redis 5.0.0.
redis = super.redis.overridePythonAttrs ({ pname, ... }: rec {
version = "4.5.4";
src = fetchPypi {
inherit pname version;
hash = "sha256-c+w12k2iZ9aEfkf2hzD91fYuLKaePvWIXGp4qTdMOJM=";
};
});
})

overlay;
Expand Down
9 changes: 8 additions & 1 deletion pkgs/servers/mail/mailman/web.nix
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
{ lib, python3, fetchPypi
{ lib, python3, fetchPypi, fetchpatch
, sassc, hyperkitty, postorius
}:

Expand All @@ -14,6 +14,13 @@ buildPythonPackage rec {
sha256 = "sha256-UWdqrcx529r6kwgf0YEHiDrpZlGoUBR6OdYtHMTPMGY=";
};

patches = [
(fetchpatch {
url = "https://gitlab.com/mailman/mailman-web/-/commit/448bba249d39c09c0cef5e059415cc07a3ce569c.patch";
hash = "sha256-rs1vaV4YyLyJ0+EGY70CirvjArpGQr29DOTvgj68wgs=";
})
];

postPatch = ''
# Django is depended on transitively by hyperkitty and postorius,
# and mailman_web has overly restrictive version bounds on it, so
Expand Down
4 changes: 3 additions & 1 deletion pkgs/top-level/all-packages.nix
Original file line number Diff line number Diff line change
Expand Up @@ -26600,7 +26600,9 @@ with pkgs;

mackerel-agent = callPackage ../servers/monitoring/mackerel-agent { };

mailmanPackages = callPackage ../servers/mail/mailman { };
mailmanPackages = callPackage ../servers/mail/mailman {
python3 = python310;
};
inherit (mailmanPackages) mailman mailman-hyperkitty;
mailman-web = mailmanPackages.web;

Expand Down