2021-10-09 23:15:47 +00:00
|
|
|
{ lib, python3, fetchPypi, fetchpatch, pythonOlder, postfix, lynx
|
2019-08-23 20:19:45 +00:00
|
|
|
}:
|
|
|
|
|
2021-10-09 23:15:47 +00:00
|
|
|
let
|
|
|
|
py = python3.override {
|
|
|
|
packageOverrides = self: super: {
|
|
|
|
# https://gitlab.com/mailman/mailman/-/issues/845
|
|
|
|
sqlalchemy = super.sqlalchemy.overridePythonAttrs (oldAttrs: rec {
|
|
|
|
version = "1.3.24";
|
|
|
|
src = oldAttrs.src.override {
|
|
|
|
inherit version;
|
|
|
|
sha256 = "06bmxzssc66cblk1hamskyv5q3xf1nh1py3vi6dka4lkpxy7gfzb";
|
|
|
|
};
|
|
|
|
});
|
|
|
|
};
|
|
|
|
};
|
|
|
|
|
|
|
|
in
|
|
|
|
|
|
|
|
with py.pkgs;
|
|
|
|
|
2019-08-23 20:19:45 +00:00
|
|
|
buildPythonPackage rec {
|
|
|
|
pname = "mailman";
|
2021-10-09 23:15:47 +00:00
|
|
|
version = "3.3.5";
|
|
|
|
disabled = pythonOlder "3.6";
|
2019-08-23 20:19:45 +00:00
|
|
|
|
|
|
|
src = fetchPypi {
|
|
|
|
inherit pname version;
|
2021-10-09 23:15:47 +00:00
|
|
|
sha256 = "12mgxs1ndhdjjkydx48b95na9k9h0disfqgrr6wxx7vda6dqvcwz";
|
2013-10-21 13:02:35 +00:00
|
|
|
};
|
|
|
|
|
2019-08-23 20:19:45 +00:00
|
|
|
propagatedBuildInputs = [
|
2021-10-09 23:15:47 +00:00
|
|
|
aiosmtpd
|
|
|
|
alembic
|
|
|
|
authheaders
|
|
|
|
click
|
|
|
|
dnspython
|
|
|
|
falcon
|
|
|
|
flufl_bounce
|
|
|
|
flufl_i18n
|
|
|
|
flufl_lock
|
|
|
|
gunicorn
|
|
|
|
importlib-resources
|
|
|
|
lazr_config
|
|
|
|
passlib
|
|
|
|
requests
|
|
|
|
sqlalchemy
|
|
|
|
zope_component
|
|
|
|
zope_configuration
|
2018-07-25 21:44:21 +00:00
|
|
|
];
|
2013-10-21 13:02:35 +00:00
|
|
|
|
2020-05-22 12:12:43 +00:00
|
|
|
patches = [
|
|
|
|
(fetchpatch {
|
2021-06-20 14:26:23 +00:00
|
|
|
url = "https://gitlab.com/mailman/mailman/-/commit/4b206e2a5267a0e17f345fd7b2d957122ba57566.patch";
|
2020-05-22 12:12:43 +00:00
|
|
|
sha256 = "06axmrn74p81wvcki36c7gfj5fp5q15zxz2yl3lrvijic7hbs4n2";
|
|
|
|
})
|
|
|
|
(fetchpatch {
|
2021-06-20 14:26:23 +00:00
|
|
|
url = "https://gitlab.com/mailman/mailman/-/commit/9613154f3c04fa2383fbf017031ef263c291418d.patch";
|
2020-05-22 12:12:43 +00:00
|
|
|
sha256 = "0vyw87s857vfxbf7kihwb6w094xyxmxbi1bpdqi3ybjamjycp55r";
|
|
|
|
})
|
|
|
|
./log-stderr.patch
|
|
|
|
];
|
|
|
|
|
|
|
|
postPatch = ''
|
2021-10-09 23:15:47 +00:00
|
|
|
substituteInPlace setup.py \
|
|
|
|
--replace "alembic>=1.6.2,<1.7" "alembic>=1.6.2"
|
|
|
|
|
2019-08-29 16:37:20 +00:00
|
|
|
substituteInPlace src/mailman/config/postfix.cfg \
|
|
|
|
--replace /usr/sbin/postmap ${postfix}/bin/postmap
|
|
|
|
substituteInPlace src/mailman/config/schema.cfg \
|
|
|
|
--replace /usr/bin/lynx ${lynx}/bin/lynx
|
|
|
|
'';
|
|
|
|
|
2019-08-23 20:19:45 +00:00
|
|
|
# Mailman assumes that those scripts in $out/bin are Python scripts. Wrapping
|
2020-01-09 21:12:59 +00:00
|
|
|
# them in shell code breaks this assumption. Use the wrapped version (see
|
|
|
|
# wrapped.nix) if you need the CLI (rather than the Python library).
|
2019-08-23 20:19:45 +00:00
|
|
|
#
|
|
|
|
# This gives a properly wrapped 'mailman' command plus an interpreter that
|
|
|
|
# has all the necessary search paths to execute unwrapped 'master' and
|
2020-01-09 21:12:59 +00:00
|
|
|
# 'runner' scripts.
|
2019-08-23 20:19:45 +00:00
|
|
|
dontWrapPythonPrograms = true;
|
2017-06-28 18:34:21 +00:00
|
|
|
|
2021-10-09 23:15:47 +00:00
|
|
|
# requires flufl.testing, which the upstream has archived
|
2020-12-07 10:02:01 +00:00
|
|
|
doCheck = false;
|
|
|
|
|
2013-10-21 13:02:35 +00:00
|
|
|
meta = {
|
2020-04-01 01:11:51 +00:00
|
|
|
homepage = "https://www.gnu.org/software/mailman/";
|
2019-08-23 20:19:45 +00:00
|
|
|
description = "Free software for managing electronic mail discussion and newsletter lists";
|
2021-01-15 07:07:56 +00:00
|
|
|
license = lib.licenses.gpl3Plus;
|
2021-10-14 08:59:33 +00:00
|
|
|
maintainers = with lib.maintainers; [ qyliss ];
|
2013-10-21 13:02:35 +00:00
|
|
|
};
|
|
|
|
}
|