anchor.diff:    NIX_LDFLAGS = stdenv.lib.optionalString stdenv.isLinux "-lgcc_s";
   
     prePatch = ''
  -    sed -i -e "s|/usr/bin/libtool|libtool|" cmake/libutils.cmake
  +    sed -i -e "s|/usr/bin/libtool|libtool|" cmake/merge_archives.cmake.in
     '';
     postInstall = ''
  -    sed -i -e "s|basedir=\"\"|basedir=\"$out\"|" $out/bin/mysql_install_db
  -    install -vD $out/lib/*.a -t $static/lib
  -    rm -r $out/mysql-test
  -    rm $out/share/man/man1/mysql-test-run.pl.1 $out/lib/*.a
  +    moveToOutput "lib/*.a" $static
       ln -s libmysqlclient${stdenv.hostPlatform.extensions.sharedLibrary} $out/lib/libmysqlclient_r${stdenv.hostPlatform.extensions.sharedLibrary}
     '';
   
  
positive.code: let
  self = stdenv.mkDerivation rec {
    name = "mysql-${version}";
    version = "5.7.20";
  
    src = fetchurl {
      url = "mirror://mysql/MySQL-5.7/${name}.tar.gz";
      sha256 = "11v4g3igigv3zvknv67qml8in6fjrbs2vnr3q6bg6f62nydm95sk";
    };
  
    preConfigure = stdenv.lib.optional stdenv.isDarwin ''
  
negative.code:     "-DINSTALL_DOCREADMEDIR=share/mysql"
      "-DINSTALL_SUPPORTFILESDIR=share/mysql"
      "-DINSTALL_MYSQLSHAREDIR=share/mysql"
      "-DINSTALL_MYSQLTESTDIR="
      "-DINSTALL_DOCDIR=share/mysql/docs"
      "-DINSTALL_SHAREDIR=share/mysql"
    ];
  