2021-02-01 18:54:28 +01:00
|
|
|
{ lib
|
|
|
|
, stdenv
|
|
|
|
, fetchurl
|
2022-02-27 14:14:38 +01:00
|
|
|
, fetchpatch
|
2021-02-01 18:54:28 +01:00
|
|
|
, pkg-config
|
|
|
|
, intltool
|
|
|
|
, meson
|
|
|
|
, ninja
|
|
|
|
, itstool
|
|
|
|
, libxml2
|
|
|
|
, python3
|
|
|
|
, gtk3
|
|
|
|
, json-glib
|
|
|
|
, isocodes
|
|
|
|
, openssl
|
2021-05-07 23:18:14 +02:00
|
|
|
, gnome
|
2021-02-01 18:54:28 +01:00
|
|
|
, gobject-introspection
|
|
|
|
, vala
|
|
|
|
, libgee
|
|
|
|
, sqlite
|
|
|
|
, gtk-doc
|
|
|
|
, yelp-tools
|
|
|
|
, mysqlSupport ? false
|
|
|
|
, libmysqlclient ? null
|
|
|
|
, postgresSupport ? false
|
|
|
|
, postgresql ? null
|
|
|
|
}:
|
|
|
|
|
|
|
|
assert mysqlSupport -> libmysqlclient != null;
|
|
|
|
assert postgresSupport -> postgresql != null;
|
|
|
|
|
|
|
|
stdenv.mkDerivation rec {
|
|
|
|
pname = "libgda";
|
|
|
|
version = "6.0.0";
|
|
|
|
|
|
|
|
src = fetchurl {
|
|
|
|
url = "mirror://gnome/sources/${pname}/${lib.versions.majorMinor version}/${pname}-${version}.tar.xz";
|
|
|
|
sha256 = "0w564z7krgjk19r39mi5qn4kggpdg9ggbyn9pb4aavb61r14npwr";
|
|
|
|
};
|
|
|
|
|
2022-02-27 14:14:38 +01:00
|
|
|
patches = [
|
|
|
|
# Fix undefined behavior
|
|
|
|
(fetchpatch {
|
|
|
|
url = "https://gitlab.gnome.org/GNOME/libgda/-/commit/657b2f8497da907559a6769c5b1d2d7b5bd40688.patch";
|
|
|
|
sha256 = "Qx4S9KQsTAr4M0QJi0Xr5kKuHSp4NwZJHoRPYyxIyTk=";
|
|
|
|
})
|
|
|
|
|
|
|
|
# Fix building vapi
|
|
|
|
(fetchpatch {
|
|
|
|
url = "https://gitlab.gnome.org/GNOME/libgda/-/commit/57f618a3b2a3758ee3dcbf9bbdc566122dd8566d.patch";
|
|
|
|
sha256 = "pyfymUd61m1kHaGyMbUQMma+szB8mlqGWwcFBBQawf8=";
|
|
|
|
})
|
|
|
|
];
|
|
|
|
|
2021-02-01 18:54:28 +01:00
|
|
|
nativeBuildInputs = [
|
|
|
|
pkg-config
|
|
|
|
intltool
|
|
|
|
meson
|
|
|
|
ninja
|
|
|
|
itstool
|
|
|
|
libxml2
|
|
|
|
python3
|
|
|
|
gobject-introspection
|
|
|
|
vala
|
|
|
|
gtk-doc
|
|
|
|
yelp-tools
|
|
|
|
];
|
|
|
|
|
|
|
|
buildInputs = [
|
|
|
|
gtk3
|
|
|
|
json-glib
|
|
|
|
isocodes
|
|
|
|
openssl
|
|
|
|
libgee
|
|
|
|
sqlite
|
|
|
|
] ++ lib.optionals mysqlSupport [
|
|
|
|
libmysqlclient
|
|
|
|
] ++ lib.optionals postgresSupport [
|
|
|
|
postgresql
|
|
|
|
];
|
|
|
|
|
|
|
|
postPatch = ''
|
|
|
|
patchShebangs \
|
|
|
|
providers/raw_spec.py \
|
|
|
|
providers/mysql/gen_bin.py
|
|
|
|
'';
|
|
|
|
|
|
|
|
passthru = {
|
2021-05-07 23:18:14 +02:00
|
|
|
updateScript = gnome.updateScript {
|
2021-02-01 18:54:28 +01:00
|
|
|
packageName = pname;
|
|
|
|
attrPath = "libgda6";
|
2021-03-21 00:57:24 +01:00
|
|
|
versionPolicy = "odd-unstable";
|
2021-02-01 18:54:28 +01:00
|
|
|
};
|
|
|
|
};
|
|
|
|
|
|
|
|
meta = with lib; {
|
|
|
|
description = "Database access library";
|
|
|
|
homepage = "https://www.gnome-db.org/";
|
|
|
|
license = with licenses; [
|
|
|
|
# library
|
|
|
|
lgpl2Plus
|
|
|
|
# CLI tools
|
|
|
|
gpl2Plus
|
|
|
|
];
|
|
|
|
maintainers = teams.gnome.members;
|
|
|
|
platforms = platforms.unix;
|
|
|
|
};
|
|
|
|
}
|