summary refs log tree commit diff
path: root/pkgs/servers/mail/mailman
diff options
context:
space:
mode:
authorPeter Simons <simons@cryp.to>2019-08-26 16:13:42 +0200
committerPeter Simons <simons@cryp.to>2019-08-26 16:20:20 +0200
commitda1ff985aef12591772074f8e80698f36225c616 (patch)
treeccf0490a87aed398f9f99c9664430f1e9dd5db1b /pkgs/servers/mail/mailman
parent95c021393f330c5024588b099b2d7324cc4527c6 (diff)
downloadnixpkgs-da1ff985aef12591772074f8e80698f36225c616.tar
nixpkgs-da1ff985aef12591772074f8e80698f36225c616.tar.gz
nixpkgs-da1ff985aef12591772074f8e80698f36225c616.tar.bz2
nixpkgs-da1ff985aef12591772074f8e80698f36225c616.tar.lz
nixpkgs-da1ff985aef12591772074f8e80698f36225c616.tar.xz
nixpkgs-da1ff985aef12591772074f8e80698f36225c616.tar.zst
nixpkgs-da1ff985aef12591772074f8e80698f36225c616.zip
mailman: drop hard-coded references to /usr/bin
Diffstat (limited to 'pkgs/servers/mail/mailman')
-rw-r--r--pkgs/servers/mail/mailman/0001-Find-external-tools-via-PATH-rather-than-hard-coding.patch51
-rw-r--r--pkgs/servers/mail/mailman/default.nix2
2 files changed, 53 insertions, 0 deletions
diff --git a/pkgs/servers/mail/mailman/0001-Find-external-tools-via-PATH-rather-than-hard-coding.patch b/pkgs/servers/mail/mailman/0001-Find-external-tools-via-PATH-rather-than-hard-coding.patch
new file mode 100644
index 00000000000..b8a5476c055
--- /dev/null
+++ b/pkgs/servers/mail/mailman/0001-Find-external-tools-via-PATH-rather-than-hard-coding.patch
@@ -0,0 +1,51 @@
+From 47469af384a6d4a0877c76d3c52013b40ab61f04 Mon Sep 17 00:00:00 2001
+From: Peter Simons <simons@cryp.to>
+Date: Mon, 26 Aug 2019 16:10:04 +0200
+Subject: [PATCH] Find external tools via $PATH rather than hard-coding
+ /usr/bin.
+
+---
+ src/mailman/config/mhonarc.cfg | 2 +-
+ src/mailman/config/postfix.cfg | 2 +-
+ src/mailman/config/schema.cfg  | 2 +-
+ 3 files changed, 3 insertions(+), 3 deletions(-)
+
+diff --git a/src/mailman/config/mhonarc.cfg b/src/mailman/config/mhonarc.cfg
+index b00f93aea..096e9521b 100644
+--- a/src/mailman/config/mhonarc.cfg
++++ b/src/mailman/config/mhonarc.cfg
+@@ -24,4 +24,4 @@ base_url: http://$hostname/archives/$fqdn_listname
+ 
+ # If the archiver works by calling a command on the local machine, this is the
+ # command to call.
+-command: /usr/bin/mhonarc -outdir /path/to/archive/$listname -add
++command: mhonarc -outdir /path/to/archive/$listname -add
+diff --git a/src/mailman/config/postfix.cfg b/src/mailman/config/postfix.cfg
+index cddda220a..934c9a977 100644
+--- a/src/mailman/config/postfix.cfg
++++ b/src/mailman/config/postfix.cfg
+@@ -5,7 +5,7 @@
+ # db file, from the associated plain text files.  The file being updated will
+ # be appended to this string (with a separating space), so it must be
+ # appropriate for os.system().
+-postmap_command: /usr/sbin/postmap
++postmap_command: postmap
+ 
+ # This variable describes the type of transport maps that will be generated by
+ # mailman to be used with postfix for LMTP transport. By default, it is set to
+diff --git a/src/mailman/config/schema.cfg b/src/mailman/config/schema.cfg
+index fa06ccced..406999e13 100644
+--- a/src/mailman/config/schema.cfg
++++ b/src/mailman/config/schema.cfg
+@@ -65,7 +65,7 @@ filtered_messages_are_preservable: no
+ # where the substitution variable $filename is filled in by Mailman, and
+ # contains the path to the temporary file that the command should read from.
+ # The command should print the converted text to stdout.
+-html_to_plain_text_command: /usr/bin/lynx -dump $filename
++html_to_plain_text_command: lynx -dump $filename
+ 
+ # Specify what characters are allowed in list names.  Characters outside of
+ # the class [-_.+=!$*{}~0-9a-z] matched case insensitively are never allowed,
+-- 
+2.22.0
+
diff --git a/pkgs/servers/mail/mailman/default.nix b/pkgs/servers/mail/mailman/default.nix
index e3cd393c3c3..fcd594270db 100644
--- a/pkgs/servers/mail/mailman/default.nix
+++ b/pkgs/servers/mail/mailman/default.nix
@@ -8,6 +8,8 @@ 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";