anchor.diff:  { stdenv, fetchurl, pkg-config, intltool, itstool, libxml2, gtk3, openssl, gnome3, gobject-introspection, vala, libgee
  -, overrideCC, gcc6
  +, overrideCC, gcc6, fetchpatch, autoreconfHook, gtk-doc, autoconf-archive, yelp-tools
   , mysqlSupport ? false, libmysqlclient ? null
   , postgresSupport ? false, postgresql ? null
   }:
  
positive.code: 
    hardeningDisable = [ "format" ];
  
    nativeBuildInputs = [ pkg-config intltool itstool libxml2 gobject-introspection vala ];
    buildInputs = with stdenv.lib; [ gtk3 openssl libgee ]
      ++ optional (mysqlSupport) libmysqlclient
      ++ optional (postgresSupport) postgresql;
  
negative.code:     url = "mirror://gnome/sources/${pname}/${stdenv.lib.versions.majorMinor version}/${pname}-${version}.tar.xz";
      sha256 = "1j1l4dwjgw6w4d1v4bl5a4kwyj7bcih8mj700ywm7xakh1xxyv3g";
    };
  
    patches = [
      # fix compile error with mysql
      (fetchpatch {
        url = "https://gitlab.gnome.org/GNOME/libgda/-/commit/9859479884fad5f39e6c37e8995e57c28b11b1b9.diff";
        sha256 = "158sncc5bg9lkri1wb0i1ri1nhx4c34rzi47gbfkwphlp7qd4qqv";
      })
    ];
  
    configureFlags = with stdenv.lib; [
      "--with-mysql=${if mysqlSupport then "yes" else "no"}"
      "--with-postgres=${if postgresSupport then "yes" else "no"}"
  