nixpkgs/pkgs/servers/mail/mailman/default.nix

60 lines
2.1 KiB
Nix
Raw Normal View History

2021-01-15 07:07:56 +00:00
{ lib, stdenv, buildPythonPackage, fetchPypi, fetchpatch, isPy3k, alembic, aiosmtpd, dnspython
, flufl_bounce, flufl_i18n, flufl_lock, lazr_config, lazr_delegates, passlib
, requests, zope_configuration, click, falcon, importlib-resources
2019-12-16 18:15:32 +00:00
, zope_component, lynx, postfix, authheaders, gunicorn
}:
buildPythonPackage rec {
pname = "mailman";
2020-06-04 04:53:41 +01:00
version = "3.3.1";
disabled = !isPy3k;
src = fetchPypi {
inherit pname version;
2020-06-04 04:53:41 +01:00
sha256 = "0idfiv48jjgc0jq4731094ddhraqq8bxnwmjk6sg5ask0jss9kxq";
2013-10-21 14:02:35 +01:00
};
propagatedBuildInputs = [
alembic aiosmtpd click dnspython falcon flufl_bounce flufl_i18n flufl_lock
importlib-resources lazr_config passlib requests zope_configuration
2019-12-16 18:15:32 +00:00
zope_component authheaders gunicorn
2018-07-25 22:44:21 +01:00
];
2013-10-21 14:02:35 +01:00
2020-05-22 13:12:43 +01:00
patches = [
(fetchpatch {
url = https://gitlab.com/mailman/mailman/-/commit/4b206e2a5267a0e17f345fd7b2d957122ba57566.patch;
sha256 = "06axmrn74p81wvcki36c7gfj5fp5q15zxz2yl3lrvijic7hbs4n2";
})
(fetchpatch {
url = https://gitlab.com/mailman/mailman/-/commit/9613154f3c04fa2383fbf017031ef263c291418d.patch;
sha256 = "0vyw87s857vfxbf7kihwb6w094xyxmxbi1bpdqi3ybjamjycp55r";
})
./log-stderr.patch
];
postPatch = ''
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
'';
# Mailman assumes that those scripts in $out/bin are Python scripts. Wrapping
# them in shell code breaks this assumption. Use the wrapped version (see
# wrapped.nix) if you need the CLI (rather than the Python library).
#
# This gives a properly wrapped 'mailman' command plus an interpreter that
# has all the necessary search paths to execute unwrapped 'master' and
# 'runner' scripts.
dontWrapPythonPrograms = true;
2020-12-07 10:02:01 +00:00
doCheck = false;
2013-10-21 14:02:35 +01:00
meta = {
homepage = "https://www.gnu.org/software/mailman/";
description = "Free software for managing electronic mail discussion and newsletter lists";
2021-01-15 07:07:56 +00:00
license = lib.licenses.gpl3Plus;
maintainers = with lib.maintainers; [ peti ];
2013-10-21 14:02:35 +01:00
};
}