about summary refs log tree commit diff
path: root/pkgs/servers/sql
diff options
context:
space:
mode:
authorDan Callahan <dan.callahan@gmail.com>2019-10-09 09:22:50 +0100
committerDan Callahan <dan.callahan@gmail.com>2019-10-09 21:56:59 +0100
commitb0b0bb7e0b2b12278de114683d34cdea1bfa4ceb (patch)
tree3a0ab63282333c7f19128bad9fc5979c34cd73c5 /pkgs/servers/sql
parent6dc7f20f85b584410d171b71cd074b60ac65307e (diff)
downloadnixlib-b0b0bb7e0b2b12278de114683d34cdea1bfa4ceb.tar
nixlib-b0b0bb7e0b2b12278de114683d34cdea1bfa4ceb.tar.gz
nixlib-b0b0bb7e0b2b12278de114683d34cdea1bfa4ceb.tar.bz2
nixlib-b0b0bb7e0b2b12278de114683d34cdea1bfa4ceb.tar.lz
nixlib-b0b0bb7e0b2b12278de114683d34cdea1bfa4ceb.tar.xz
nixlib-b0b0bb7e0b2b12278de114683d34cdea1bfa4ceb.tar.zst
nixlib-b0b0bb7e0b2b12278de114683d34cdea1bfa4ceb.zip
mariadb: fix darwin build
We want to disable `PLUGIN_AUTH_PAM` when building:

1. `mariadb` on macOS.
2. `mariadb-client` on any platform

Unfortunately, the interaction of these two commits
  6c97b0486c97481dfdb82036de5382921269a771
  7e43b4d0aee408c3742b84e89749c2c494f16cfe
created a situation where we disable it *twice* when building on macOS.
Once in a darwin-specific `prePatch` script, and again in the `patches`
section for client builds.

This removes the redundant `prePatch` script and conditionally applies
the patch to `mariadb` server builds on darwin.

Fixes #70835
Diffstat (limited to 'pkgs/servers/sql')
-rw-r--r--pkgs/servers/sql/mariadb/default.nix5
1 files changed, 2 insertions, 3 deletions
diff --git a/pkgs/servers/sql/mariadb/default.nix b/pkgs/servers/sql/mariadb/default.nix
index ebd9938f12f4..63ad6ce3b25a 100644
--- a/pkgs/servers/sql/mariadb/default.nix
+++ b/pkgs/servers/sql/mariadb/default.nix
@@ -41,9 +41,6 @@ common = rec { # attributes common to both builds
 
   prePatch = ''
     sed -i 's,[^"]*/var/log,/var/log,g' storage/mroonga/vendor/groonga/CMakeLists.txt
-  '' + optionalString stdenv.hostPlatform.isDarwin ''
-    substituteInPlace cmake/build_configurations/mysql_release.cmake \
-      --replace "SET(PLUGIN_AUTH_PAM YES)" ""
   '';
 
   patches = [
@@ -163,6 +160,8 @@ server = stdenv.mkDerivation (common // {
 
   patches = common.patches ++ [
     ./cmake-without-client.patch
+  ] ++ optionals stdenv.isDarwin [
+    ./cmake-without-plugin-auth-pam.patch
   ];
 
   cmakeFlags = common.cmakeFlags ++ [