2019-02-13 21:47:50 +00:00
|
|
|
{ stdenv, fetchurl, pkgconfig, intltool, itstool, libxml2, gtk3, openssl, gnome3, gobject-introspection, vala, libgee
|
2018-08-25 08:36:52 +00:00
|
|
|
, overrideCC, gcc6
|
2019-09-22 07:38:09 +00:00
|
|
|
, mysqlSupport ? false, libmysqlclient ? null
|
2018-02-24 11:23:08 +00:00
|
|
|
, postgresSupport ? false, postgresql ? null
|
|
|
|
}:
|
|
|
|
|
2019-09-22 07:38:09 +00:00
|
|
|
assert mysqlSupport -> libmysqlclient != null;
|
2018-02-24 11:23:08 +00:00
|
|
|
assert postgresSupport -> postgresql != null;
|
2016-09-18 19:35:23 +00:00
|
|
|
|
2018-08-25 08:36:52 +00:00
|
|
|
(if stdenv.isAarch64 then overrideCC stdenv gcc6 else stdenv).mkDerivation rec {
|
2018-12-11 22:42:28 +00:00
|
|
|
pname = "libgda";
|
2019-05-12 01:31:20 +00:00
|
|
|
version = "5.2.9";
|
2018-02-25 20:07:20 +00:00
|
|
|
|
|
|
|
src = fetchurl {
|
2018-12-11 22:42:28 +00:00
|
|
|
url = "mirror://gnome/sources/${pname}/${stdenv.lib.versions.majorMinor version}/${pname}-${version}.tar.xz";
|
2019-05-12 01:31:20 +00:00
|
|
|
sha256 = "16vxv2qvysh22s8h9h6irx96sacagxkz0i4qgi1wc6ibly6fvjjr";
|
2018-02-25 20:07:20 +00:00
|
|
|
};
|
2019-10-15 17:58:08 +00:00
|
|
|
configureFlags = with stdenv.lib; [
|
|
|
|
"--enable-gi-system-install=no"
|
|
|
|
"--with-mysql=${if mysqlSupport then "yes" else "no"}"
|
|
|
|
"--with-postgres=${if postgresSupport then "yes" else "no"}"
|
2019-10-15 18:00:17 +00:00
|
|
|
|
|
|
|
# macOS builds use the sqlite source code that comes with libgda,
|
|
|
|
# as opposed to using the system or brewed sqlite3, which is not supported on macOS,
|
|
|
|
# as mentioned in https://github.com/GNOME/libgda/blob/95eeca4b0470f347c645a27f714c62aa6e59f820/libgda/sqlite/README#L31,
|
|
|
|
# which references the paper https://web.archive.org/web/20100610151539/http://lattice.umiacs.umd.edu/files/functions_tr.pdf
|
|
|
|
# See also https://github.com/Homebrew/homebrew-core/blob/104f9ecd02854a82372b64d63d41356555378a52/Formula/libgda.rb
|
|
|
|
"--enable-system-sqlite=${if stdenv.isDarwin then "no" else "yes"}"
|
2019-10-15 17:58:08 +00:00
|
|
|
];
|
2016-09-18 19:35:23 +00:00
|
|
|
|
|
|
|
enableParallelBuilding = true;
|
|
|
|
|
|
|
|
hardeningDisable = [ "format" ];
|
|
|
|
|
2018-12-23 17:58:16 +00:00
|
|
|
nativeBuildInputs = [ pkgconfig intltool itstool libxml2 gobject-introspection vala ];
|
2019-02-13 21:47:50 +00:00
|
|
|
buildInputs = with stdenv.lib; [ gtk3 openssl libgee ]
|
2019-09-22 07:38:09 +00:00
|
|
|
++ optional (mysqlSupport) libmysqlclient
|
2018-02-24 11:23:08 +00:00
|
|
|
++ optional (postgresSupport) postgresql;
|
2016-09-18 19:35:23 +00:00
|
|
|
|
2018-12-11 22:42:28 +00:00
|
|
|
passthru = {
|
|
|
|
updateScript = gnome3.updateScript {
|
|
|
|
packageName = pname;
|
|
|
|
};
|
|
|
|
};
|
|
|
|
|
2016-09-18 19:35:23 +00:00
|
|
|
meta = with stdenv.lib; {
|
|
|
|
description = "Database access library";
|
2020-04-01 01:11:51 +00:00
|
|
|
homepage = "https://www.gnome-db.org/";
|
2016-09-18 19:35:23 +00:00
|
|
|
license = [ licenses.lgpl2 licenses.gpl2 ];
|
2020-04-01 12:40:51 +00:00
|
|
|
maintainers = teams.gnome.members;
|
2019-10-15 17:57:38 +00:00
|
|
|
platforms = platforms.linux ++ platforms.darwin;
|
2016-09-18 19:35:23 +00:00
|
|
|
};
|
|
|
|
}
|