From 445d1ee7862409dae404ce350af6a1272172b35f Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Sandro=20J=C3=A4ckel?= Date: Thu, 7 Jan 2021 20:12:01 +0100 Subject: [PATCH] libgda: Fix compiling with mysql --- pkgs/development/libraries/libgda/default.nix | 13 +++++++++++-- 1 file changed, 11 insertions(+), 2 deletions(-) diff --git a/pkgs/development/libraries/libgda/default.nix b/pkgs/development/libraries/libgda/default.nix index e518a07cc2b2..3f8e6f01b34b 100644 --- a/pkgs/development/libraries/libgda/default.nix +++ b/pkgs/development/libraries/libgda/default.nix @@ -1,5 +1,5 @@ { 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 }: @@ -15,6 +15,15 @@ assert postgresSupport -> postgresql != null; 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"}" @@ -31,7 +40,7 @@ assert postgresSupport -> postgresql != null; hardeningDisable = [ "format" ]; - nativeBuildInputs = [ pkg-config intltool itstool libxml2 gobject-introspection vala ]; + nativeBuildInputs = [ pkg-config intltool itstool libxml2 gobject-introspection vala autoreconfHook gtk-doc autoconf-archive yelp-tools ]; buildInputs = with stdenv.lib; [ gtk3 openssl libgee ] ++ optional (mysqlSupport) libmysqlclient ++ optional (postgresSupport) postgresql;