anchor.diff:  , withMySQL ? false, libmysqlclient
   , withPgSQL ? false, postgresql
   , withSQLite ? true, sqlite
  +, withLua ? false, lua5_3
   }:
   
   stdenv.mkDerivation rec {
  
positive.code:     ++ lib.optional (stdenv.isDarwin) "--enable-static"
      ++ lib.optional withMySQL "--with-mysql"
      ++ lib.optional withPgSQL "--with-pgsql"
      ++ lib.optional withSQLite "--with-sqlite";
  
    meta = {
      homepage = "https://dovecot.org/";
  
negative.code:     ++ lib.optionals (stdenv.isLinux) [ systemd pam libcap inotify-tools ]
      ++ lib.optional withMySQL libmysqlclient
      ++ lib.optional withPgSQL postgresql
      ++ lib.optional withSQLite sqlite
      ++ lib.optional withLua lua5_3;
  
    src = fetchurl {
      url = "https://dovecot.org/releases/${lib.versions.majorMinor version}/${pname}-${version}.tar.gz";
  