anchor.diff:              "LDAP_DIR=${openldap.dev}"
               "LDAP_INCDIR=${openldap.dev}/include"
               "LDAP_LIBDIR=${openldap.out}/lib"
  -            "--with-ldap-sasl=${cyrus_sasl.dev}"
  +            (lib.optional stdenv.isLinux "--with-ldap-sasl=${cyrus_sasl.dev}")
               ];
  -          buildInputs = [openldap cyrus_sasl openssl];
  +          buildInputs = [openldap openssl] ++ lib.optional stdenv.isLinux cyrus_sasl;
           };
   
           mhash = {
  
positive.code:       };
  
        cfg = {
          imapSupport = config.php.imap or true;
          ldapSupport = config.php.ldap or true;
          mhashSupport = config.php.mhash or true;
          mysqlSupport = (!php7) && (config.php.mysql or true);
          mysqliSupport = config.php.mysqli or true;
          pdo_mysqlSupport = config.php.pdo_mysql or true;
          libxml2Support = config.php.libxml2 or true;
          apxs2Support = config.php.apxs2 or true;
          bcmathSupport = config.php.bcmath or true;
          socketsSupport = config.php.sockets or true;
          curlSupport = config.php.curl or true;
  
negative.code: 
        patches = if !php7 then [ ./fix-paths.patch ] else [ ./fix-paths-php7.patch ];
  
        postPatch = lib.optional stdenv.isDarwin ''
          substituteInPlace configure --replace "-lstdc++" "-lc++"
        '';
  
      });
  
  in {
  