From 562d9d472c32128a0d7decdb787aea660100efbe Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?J=C3=B6rg=20Thalheim?= Date: Mon, 10 Dec 2018 22:48:42 +0000 Subject: [PATCH] dovecot: fix cross-build --- pkgs/servers/mail/dovecot/default.nix | 17 +++++++++++++++++ 1 file changed, 17 insertions(+) diff --git a/pkgs/servers/mail/dovecot/default.nix b/pkgs/servers/mail/dovecot/default.nix index 6c6ddf651e62..6007d15a3a15 100644 --- a/pkgs/servers/mail/dovecot/default.nix +++ b/pkgs/servers/mail/dovecot/default.nix @@ -24,6 +24,8 @@ stdenv.mkDerivation rec { sha256 = "01ggzf7b3jpl89mjiqr7xbpbs181g2gjf6wzg70qaqfzz3ppc6yr"; }; + enableParallelBuilding = true; + preConfigure = '' patchShebangs src/config/settings-get.pl ''; @@ -57,6 +59,21 @@ stdenv.mkDerivation rec { "--with-ldap" "--with-lucene" "--with-icu" + ] ++ lib.optionals (stdenv.hostPlatform != stdenv.buildPlatform) [ + "i_cv_epoll_works=${if stdenv.isLinux then "yes" else "no"}" + "i_cv_posix_fallocate_works=${if stdenv.isDarwin then "no" else "yes"}" + "i_cv_inotify_works=${if stdenv.isLinux then "yes" else "no"}" + "i_cv_signed_size_t=no" + "i_cv_signed_time_t=yes" + "i_cv_c99_vsnprintf=yes" + "lib_cv_va_copy=yes" + "i_cv_mmap_plays_with_write=yes" + "i_cv_gmtime_max_time_t=${toString stdenv.hostPlatform.parsed.cpu.bits}" + "i_cv_signed_time_t=yes" + "i_cv_fd_passing=yes" + "lib_cv_va_copy=yes" + "lib_cv___va_copy=yes" + "lib_cv_va_val_copy=yes" ] ++ lib.optional (stdenv.isLinux) "--with-systemdsystemunitdir=$(out)/etc/systemd/system" ++ lib.optional (stdenv.isDarwin) "--enable-static" ++ lib.optional withMySQL "--with-mysql"