diff options
author | Alyssa Ross <hi@alyssa.is> | 2020-01-11 23:37:02 +0000 |
---|---|---|
committer | Alyssa Ross <hi@alyssa.is> | 2020-01-11 23:41:30 +0000 |
commit | 6c557e3f1c28cf87e9fba232811d6875dd1399c1 (patch) | |
tree | 035a071d5d8980df6de0fa42e2ef8fc0cce7055e /nixpkgs/pkgs/development/libraries/libgda | |
parent | da7500bc026e937ac7fce7b50f67a0e1765737a7 (diff) | |
parent | e4134747f5666bcab8680aff67fa3b63384f9a0f (diff) | |
download | nixlib-6c557e3f1c28cf87e9fba232811d6875dd1399c1.tar nixlib-6c557e3f1c28cf87e9fba232811d6875dd1399c1.tar.gz nixlib-6c557e3f1c28cf87e9fba232811d6875dd1399c1.tar.bz2 nixlib-6c557e3f1c28cf87e9fba232811d6875dd1399c1.tar.lz nixlib-6c557e3f1c28cf87e9fba232811d6875dd1399c1.tar.xz nixlib-6c557e3f1c28cf87e9fba232811d6875dd1399c1.tar.zst nixlib-6c557e3f1c28cf87e9fba232811d6875dd1399c1.zip |
Merge commit 'e4134747f5666bcab8680aff67fa3b63384f9a0f'
Diffstat (limited to 'nixpkgs/pkgs/development/libraries/libgda')
-rw-r--r-- | nixpkgs/pkgs/development/libraries/libgda/default.nix | 23 |
1 files changed, 16 insertions, 7 deletions
diff --git a/nixpkgs/pkgs/development/libraries/libgda/default.nix b/nixpkgs/pkgs/development/libraries/libgda/default.nix index bb6402dc4287..a1871f6b2e65 100644 --- a/nixpkgs/pkgs/development/libraries/libgda/default.nix +++ b/nixpkgs/pkgs/development/libraries/libgda/default.nix @@ -1,10 +1,10 @@ { stdenv, fetchurl, pkgconfig, intltool, itstool, libxml2, gtk3, openssl, gnome3, gobject-introspection, vala, libgee , overrideCC, gcc6 -, mysqlSupport ? false, mysql ? null +, mysqlSupport ? false, libmysqlclient ? null , postgresSupport ? false, postgresql ? null }: -assert mysqlSupport -> mysql != null; +assert mysqlSupport -> libmysqlclient != null; assert postgresSupport -> postgresql != null; (if stdenv.isAarch64 then overrideCC stdenv gcc6 else stdenv).mkDerivation rec { @@ -15,9 +15,18 @@ 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"}" + + # 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; @@ -25,7 +34,7 @@ assert postgresSupport -> postgresql != null; nativeBuildInputs = [ pkgconfig intltool itstool libxml2 gobject-introspection vala ]; buildInputs = with stdenv.lib; [ gtk3 openssl libgee ] - ++ optional (mysqlSupport) mysql.connector-c + ++ optional (mysqlSupport) libmysqlclient ++ optional (postgresSupport) postgresql; passthru = { @@ -39,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; }; } |