From ce5616f178349fd9ad764803be3d529502d34bb1 Mon Sep 17 00:00:00 2001 From: Sebastien Lavoie Date: Tue, 15 Oct 2019 13:58:08 -0400 Subject: [PATCH 1/3] gnome3.libgda: explicitly enable or disable mysql and postgres This prevents an issue where mysql and postgres support can be auto-detected by the configure scripts, resulting in a broken build or a build that cannot be ran on a different computer. --- pkgs/development/libraries/libgda/default.nix | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/pkgs/development/libraries/libgda/default.nix b/pkgs/development/libraries/libgda/default.nix index 27032607996..cc37c50af3e 100644 --- a/pkgs/development/libraries/libgda/default.nix +++ b/pkgs/development/libraries/libgda/default.nix @@ -15,9 +15,11 @@ assert postgresSupport -> postgresql != null; url = "mirror://gnome/sources/${pname}/${stdenv.lib.versions.majorMinor version}/${pname}-${version}.tar.xz"; sha256 = "16vxv2qvysh22s8h9h6irx96sacagxkz0i4qgi1wc6ibly6fvjjr"; }; - configureFlags = with stdenv.lib; [ "--enable-gi-system-install=no" ] - ++ (optional (mysqlSupport) "--with-mysql=yes") - ++ (optional (postgresSupport) "--with-postgres=yes"); + 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"}" + ]; enableParallelBuilding = true; From 9b83a23542f92d0bd82f2bb443139ec8f08fa90d Mon Sep 17 00:00:00 2001 From: Sebastien Lavoie Date: Tue, 15 Oct 2019 14:00:17 -0400 Subject: [PATCH 2/3] gnome3.libgda: use embedded sqlite support on macOS Taken from the Homebrew Formula --- pkgs/development/libraries/libgda/default.nix | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/pkgs/development/libraries/libgda/default.nix b/pkgs/development/libraries/libgda/default.nix index cc37c50af3e..3cf5b05ee25 100644 --- a/pkgs/development/libraries/libgda/default.nix +++ b/pkgs/development/libraries/libgda/default.nix @@ -19,6 +19,13 @@ assert postgresSupport -> postgresql != null; "--enable-gi-system-install=no" "--with-mysql=${if mysqlSupport then "yes" else "no"}" "--with-postgres=${if postgresSupport then "yes" else "no"}" + + # 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"}" ]; enableParallelBuilding = true; From adc635f74e2dbba129ce82a866ec6d5fdefbb3aa Mon Sep 17 00:00:00 2001 From: Sebastien Lavoie Date: Tue, 15 Oct 2019 13:57:38 -0400 Subject: [PATCH 3/3] gnome3.libgda: enable darwin builds --- pkgs/development/libraries/libgda/default.nix | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pkgs/development/libraries/libgda/default.nix b/pkgs/development/libraries/libgda/default.nix index 3cf5b05ee25..a1871f6b2e6 100644 --- a/pkgs/development/libraries/libgda/default.nix +++ b/pkgs/development/libraries/libgda/default.nix @@ -48,6 +48,6 @@ assert postgresSupport -> postgresql != null; homepage = https://www.gnome-db.org/; license = [ licenses.lgpl2 licenses.gpl2 ]; maintainers = gnome3.maintainers; - platforms = platforms.linux; + platforms = platforms.linux ++ platforms.darwin; }; }