11 , gobject-introspection
19 , mysqlSupport ? false
21 , postgresSupport ? false
25 stdenv.mkDerivation rec {
30 url = "mirror://gnome/sources/${pname}/${lib.versions.majorMinor version}/${pname}-${version}.tar.xz";
31 sha256 = "1j1l4dwjgw6w4d1v4bl5a4kwyj7bcih8mj700ywm7xakh1xxyv3g";
35 # fix compile error with mysql
37 url = "https://gitlab.gnome.org/GNOME/libgda/-/commit/9859479884fad5f39e6c37e8995e57c28b11b1b9.diff";
38 sha256 = "158sncc5bg9lkri1wb0i1ri1nhx4c34rzi47gbfkwphlp7qd4qqv";
58 ] ++ lib.optionals mysqlSupport [
60 ] ++ lib.optionals postgresSupport [
64 propagatedBuildInputs = [
69 "--with-mysql=${if mysqlSupport then "yes" else "no"}"
70 "--with-postgres=${if postgresSupport then "yes" else "no"}"
72 # macOS builds use the sqlite source code that comes with libgda,
73 # as opposed to using the system or brewed sqlite3, which is not supported on macOS,
74 # as mentioned in https://github.com/GNOME/libgda/blob/95eeca4b0470f347c645a27f714c62aa6e59f820/libgda/sqlite/README#L31,
75 # which references the paper https://web.archive.org/web/20100610151539/http://lattice.umiacs.umd.edu/files/functions_tr.pdf
76 # See also https://github.com/Homebrew/homebrew-core/blob/104f9ecd02854a82372b64d63d41356555378a52/Formula/libgda.rb
77 "--enable-system-sqlite=${if stdenv.isDarwin then "no" else "yes"}"
80 enableParallelBuilding = true;
82 hardeningDisable = [ "format" ];
85 updateScript = gnome.updateScript {
87 versionPolicy = "odd-unstable";
93 description = "Database access library";
94 homepage = "https://www.gnome-db.org/";
95 license = with licenses; [
101 maintainers = teams.gnome.members;
102 platforms = platforms.unix;