summary refs log tree commit diff
path: root/pkgs/servers
diff options
context:
space:
mode:
authorNikolay Amiantov <ab@fmap.me>2016-01-09 19:25:48 +0300
committerNikolay Amiantov <ab@fmap.me>2016-01-21 12:50:03 +0300
commit57234b97df21accb693e0ac1049772b776c8d454 (patch)
treeffffc366ca2c190ca4c3cb0a90dfe1fab498533e /pkgs/servers
parentcc0e255ab975b50adb895d8d9bec5a9a66665e4a (diff)
downloadnixlib-57234b97df21accb693e0ac1049772b776c8d454.tar
nixlib-57234b97df21accb693e0ac1049772b776c8d454.tar.gz
nixlib-57234b97df21accb693e0ac1049772b776c8d454.tar.bz2
nixlib-57234b97df21accb693e0ac1049772b776c8d454.tar.lz
nixlib-57234b97df21accb693e0ac1049772b776c8d454.tar.xz
nixlib-57234b97df21accb693e0ac1049772b776c8d454.tar.zst
nixlib-57234b97df21accb693e0ac1049772b776c8d454.zip
dovecot22: specify sysconfdir to use system-wide config
Diffstat (limited to 'pkgs/servers')
-rw-r--r--pkgs/servers/mail/dovecot/2.2.x.nix10
1 files changed, 9 insertions, 1 deletions
diff --git a/pkgs/servers/mail/dovecot/2.2.x.nix b/pkgs/servers/mail/dovecot/2.2.x.nix
index 2237a09a6a68..ec4c5c935af0 100644
--- a/pkgs/servers/mail/dovecot/2.2.x.nix
+++ b/pkgs/servers/mail/dovecot/2.2.x.nix
@@ -26,7 +26,13 @@ stdenv.mkDerivation rec {
     patchShebangs src/config/settings-get.pl
   '';
 
-  postInstall = lib.optionalString stdenv.isDarwin ''
+  # We need this for sysconfdir, see remark below.
+  installFlags = [ "DESTDIR=$(out)" ];
+
+  postInstall = ''
+    cp -r $out/$out/* $out
+    rm -rf $out/$(echo "$out" | cut -d "/" -f2)
+  '' + lib.optionalString stdenv.isDarwin ''
     install_name_tool -change libclucene-shared.1.dylib \
         ${clucene_core_2}/lib/libclucene-shared.1.dylib \
         $out/lib/dovecot/lib21_fts_lucene_plugin.so
@@ -46,6 +52,8 @@ stdenv.mkDerivation rec {
     # It will hardcode this for /var/lib/dovecot.
     # http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=626211
     "--localstatedir=/var"
+    # We need this so utilities default to reading /etc/dovecot/dovecot.conf file.
+    "--sysconfdir=/etc"
     "--with-ldap"
     "--with-ssl=openssl"
     "--with-zlib"