1
0
Fork 1
mirror of https://github.com/NixOS/nixpkgs.git synced 2024-11-30 01:20:40 +00:00
nixpkgs/pkgs/servers/mail/mailman/default.nix

49 lines
1.8 KiB
Nix
Raw Normal View History

{ stdenv, buildPythonPackage, fetchPypi, 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";
2019-12-16 18:15:32 +00:00
version = "3.3.0";
disabled = !isPy3k;
src = fetchPypi {
inherit pname version;
2019-12-16 18:15:32 +00:00
sha256 = "1qph9i93ndahfxi3bb2sd0kjm2c0pkh844ai6zacfmvihl1k3pvy";
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
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
'';
# Mailman assumes that those scripts in $out/bin are Python scripts. Wrapping
# them in shell code breaks this assumption. The proper way to use mailman is
# to create a specialized python interpreter:
#
# python37.withPackages (ps: [ps.mailman])
#
# This gives a properly wrapped 'mailman' command plus an interpreter that
# has all the necessary search paths to execute unwrapped 'master' and
# 'runner' scripts. The setup is a little tricky, but fortunately NixOS is
# about to get a OS module that takes care of those details.
dontWrapPythonPrograms = true;
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";
license = stdenv.lib.licenses.gpl3Plus;
maintainers = with stdenv.lib.maintainers; [ peti ];
2013-10-21 14:02:35 +01:00
};
}