anchor.diff:    postInstall =  common.postInstall + ''
       rm -r "$out"/share/doc
       rm "$out"/bin/{mysqltest,mytop,wsrep_sst_rsync_wan}
  -    rm "$out"/lib/mysql/plugin/daemon_example.ini
       libmysqlclient_path=$(readlink -f $out/lib/mysql/libmysqlclient${libExt})
       rm "$out"/lib/mysql/{libmariadb${libExt},libmysqlclient${libExt},libmysqlclient_r${libExt}}
       mv "$libmysqlclient_path" "$out"/lib/mysql/libmysqlclient${libExt}
       ln -sv libmysqlclient${libExt} "$out"/lib/mysql/libmysqlclient_r${libExt}
   
     '';
  -
  -  enableParallelBuilding = true; # the client should be OK
   });
   
   server = stdenv.mkDerivation (common // {
  
positive.code:     chmod +x "$out"/bin/wsrep_sst_common
      rm "$out"/bin/mysql_client_test
      rm -r "$out"/data # Don't need testing data
      rm "$out"/lib/mysql/plugin/daemon_example.ini
      rm "$out"/lib/mysql/{libmysqlclient${libExt},libmysqlclient_r${libExt}}
      mv "$out"/share/{groonga,groonga-normalizer-mysql} "$out"/share/doc/mysql
    '' + optionalString withoutClient ''
      ${ # We don't build with GSSAPI on Darwin
        optionalString (! stdenv.isDarwin) ''
          rm "$out"/lib/mysql/plugin/auth_gssapi_client.so
        ''
      }
      rm "$out"/lib/mysql/plugin/client_ed25519.so
    '' + optionalString (! stdenv.isDarwin) ''
      sed -i 's/-mariadb/-mysql/' "$out"/bin/galera_new_cluster
    '';
  
  
negative.code: 
    buildInputs = [
      ncurses openssl zlib pcre jemalloc libiconv
    ] ++ optionals stdenv.isLinux [ libaio systemd libkrb5 ]
      ++ optionals stdenv.isDarwin [ perl fixDarwinDylibNames cctools CoreServices ];
  
    prePatch = ''
      sed -i 's,[^"]*/var/log,/var/log,g' storage/mroonga/vendor/groonga/CMakeLists.txt
  