2020-01-10 20:19:14 +00:00
|
|
|
{ stdenv, buildPythonPackage, fetchPypi, isPy3k, alembic, aiosmtpd, dnspython
|
2019-08-23 20:19:45 +00:00
|
|
|
, 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
|
2019-08-23 20:19:45 +00:00
|
|
|
}:
|
|
|
|
|
|
|
|
buildPythonPackage rec {
|
|
|
|
pname = "mailman";
|
2019-12-16 18:15:32 +00:00
|
|
|
version = "3.3.0";
|
2020-01-10 20:19:14 +00:00
|
|
|
disabled = !isPy3k;
|
2019-08-23 20:19:45 +00:00
|
|
|
|
|
|
|
src = fetchPypi {
|
|
|
|
inherit pname version;
|
2019-12-16 18:15:32 +00:00
|
|
|
sha256 = "1qph9i93ndahfxi3bb2sd0kjm2c0pkh844ai6zacfmvihl1k3pvy";
|
2013-10-21 13:02:35 +00:00
|
|
|
};
|
|
|
|
|
2019-08-23 20:19:45 +00: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 21:44:21 +00:00
|
|
|
];
|
2013-10-21 13:02:35 +00:00
|
|
|
|
2019-08-29 16:37:20 +00:00
|
|
|
patchPhase = ''
|
|
|
|
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
|
|
|
|
2013-10-21 13:02:35 +00:00
|
|
|
meta = {
|
2018-12-01 18:22:13 +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";
|
|
|
|
license = stdenv.lib.licenses.gpl3Plus;
|
|
|
|
maintainers = with stdenv.lib.maintainers; [ peti ];
|
2013-10-21 13:02:35 +00:00
|
|
|
};
|
|
|
|
}
|