summary refs log tree commit diff
path: root/pkgs/servers/mail/mailman/core.nix
diff options
context:
space:
mode:
Diffstat (limited to 'pkgs/servers/mail/mailman/core.nix')
-rw-r--r--pkgs/servers/mail/mailman/core.nix11
1 files changed, 8 insertions, 3 deletions
diff --git a/pkgs/servers/mail/mailman/core.nix b/pkgs/servers/mail/mailman/core.nix
index fcd594270db..1ba220039ea 100644
--- a/pkgs/servers/mail/mailman/core.nix
+++ b/pkgs/servers/mail/mailman/core.nix
@@ -1,15 +1,13 @@
 { stdenv, buildPythonPackage, fetchPypi, alembic, aiosmtpd, dnspython
 , flufl_bounce, flufl_i18n, flufl_lock, lazr_config, lazr_delegates, passlib
 , requests, zope_configuration, click, falcon, importlib-resources
-, zope_component
+, zope_component, lynx, postfix
 }:
 
 buildPythonPackage rec {
   pname = "mailman";
   version = "3.2.2";
 
-  patches = [ ./0001-Find-external-tools-via-PATH-rather-than-hard-coding.patch ];
-
   src = fetchPypi {
     inherit pname version;
     sha256 = "09s9p5pb8gff6zblwidyq830yfgcvv50p5drdaxj1qpy8w46lvc6";
@@ -21,6 +19,13 @@ buildPythonPackage rec {
     zope_component
   ];
 
+  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: