From 1d79f89ff75cf2f2e94403725c1129819aea0c2b Mon Sep 17 00:00:00 2001 From: Weijia Wang <9713184+wegank@users.noreply.github.com> Date: Sat, 2 Mar 2024 13:41:04 +0100 Subject: [PATCH] unixODBCDrivers.mariadb: fix build on darwin --- pkgs/development/libraries/unixODBCDrivers/default.nix | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) diff --git a/pkgs/development/libraries/unixODBCDrivers/default.nix b/pkgs/development/libraries/unixODBCDrivers/default.nix index ad6db095b753..4d4d837e2e92 100644 --- a/pkgs/development/libraries/unixODBCDrivers/default.nix +++ b/pkgs/development/libraries/unixODBCDrivers/default.nix @@ -64,12 +64,13 @@ buildInputs = [ unixODBC openssl libiconv zlib ] ++ lib.optionals stdenv.isDarwin [ libkrb5 ]; - preConfigure = '' + # TODO: remove preConfigure on staging + preConfigure = if !stdenv.isDarwin then '' # we don't want to build a .pkg substituteInPlace CMakeLists.txt \ --replace "IF(APPLE)" "IF(0)" \ --replace "CMAKE_SYSTEM_NAME MATCHES AIX" "APPLE" - ''; + '' else null; cmakeFlags = [ "-DWITH_EXTERNAL_ZLIB=ON" @@ -80,6 +81,10 @@ "-DWITH_IODBC=OFF" ]; + buildFlags = if stdenv.isDarwin then [ "maodbc" ] else null; + + installTargets = if stdenv.isDarwin then [ "install/fast" ] else null; + # see the top of the file for an explanation passthru = { fancyName = "MariaDB";