12 gobject-introspection,
22 postgresSupport ? false,
26 stdenv.mkDerivation rec {
31 url = "mirror://gnome/sources/${pname}/${lib.versions.majorMinor version}/${pname}-${version}.tar.xz";
32 sha256 = "1j1l4dwjgw6w4d1v4bl5a4kwyj7bcih8mj700ywm7xakh1xxyv3g";
36 # fix compile error with mysql
38 url = "https://gitlab.gnome.org/GNOME/libgda/-/commit/9859479884fad5f39e6c37e8995e57c28b11b1b9.diff";
39 sha256 = "158sncc5bg9lkri1wb0i1ri1nhx4c34rzi47gbfkwphlp7qd4qqv";
42 name = "CVE-2021-39359.patch";
43 url = "https://src.fedoraproject.org/rpms/libgda5/raw/72bb769f12e861e27e883dac5fab34f1ba4bd97e/f/bebdffb4de586fb43fd07ac549121f4b22f6812d.patch";
44 sha256 = "sha256-hIKuY5NEqOzntdlLb541bA4xZU5ypTRmV1u765K6KbM=";
66 ++ lib.optionals mysqlSupport [
69 ++ lib.optionals postgresSupport [
73 propagatedBuildInputs = [
78 "--with-mysql=${if mysqlSupport then "yes" else "no"}"
79 "--with-postgres=${if postgresSupport then "yes" else "no"}"
81 # macOS builds use the sqlite source code that comes with libgda,
82 # as opposed to using the system or brewed sqlite3, which is not supported on macOS,
83 # as mentioned in https://github.com/GNOME/libgda/blob/95eeca4b0470f347c645a27f714c62aa6e59f820/libgda/sqlite/README#L31,
84 # which references the paper https://web.archive.org/web/20100610151539/http://lattice.umiacs.umd.edu/files/functions_tr.pdf
85 # See also https://github.com/Homebrew/homebrew-core/blob/104f9ecd02854a82372b64d63d41356555378a52/Formula/libgda.rb
86 "--enable-system-sqlite=${if stdenv.hostPlatform.isDarwin then "no" else "yes"}"
89 env.NIX_CFLAGS_COMPILE = "-Wno-error=incompatible-pointer-types";
91 enableParallelBuilding = true;
93 hardeningDisable = [ "format" ];
96 updateScript = gnome.updateScript {
98 versionPolicy = "odd-unstable";
104 description = "Database access library";
105 homepage = "https://www.gnome-db.org/";
106 license = with licenses; [
112 maintainers = teams.gnome.members;
113 platforms = platforms.unix;