diff options
Diffstat (limited to 'pkgs/servers/mail/postfix/3.0.nix')
-rw-r--r-- | pkgs/servers/mail/postfix/3.0.nix | 8 |
1 files changed, 6 insertions, 2 deletions
diff --git a/pkgs/servers/mail/postfix/3.0.nix b/pkgs/servers/mail/postfix/3.0.nix index 73ab8c8116f..9ea151e597b 100644 --- a/pkgs/servers/mail/postfix/3.0.nix +++ b/pkgs/servers/mail/postfix/3.0.nix @@ -35,10 +35,14 @@ in stdenv.mkDerivation rec { ++ lib.optional withMySQL libmysql ++ lib.optional withSQLite sqlite; - patches = [ ./postfix-script-shell.patch ./postfix-3.0-no-warnings.patch ]; + patches = [ ./postfix-script-shell.patch ./postfix-3.0-no-warnings.patch ./post-install-script.patch ]; preBuild = '' sed -e '/^PATH=/d' -i postfix-install + sed -e "s|@PACKAGE@|$out|" -i conf/post-install + + # post-install need skip permissions check/set on all symlinks following to /nix/store + sed -e "s|@NIX_STORE@|$NIX_STORE|" -i conf/post-install export command_directory=$out/sbin export config_directory=/etc/postfix @@ -63,7 +67,7 @@ in stdenv.mkDerivation rec { postInstall = '' mkdir -p $out mv -v installdir/$out/* $out/ - mv -v installdir/etc $out/etc + cp -rv installdir/etc $out sed -e '/^PATH=/d' -i $out/libexec/postfix/post-install wrapProgram $out/libexec/postfix/post-install \ --prefix PATH ":" ${coreutils}/bin:${findutils}/bin:${gnugrep}/bin |