From b0b0bb7e0b2b12278de114683d34cdea1bfa4ceb Mon Sep 17 00:00:00 2001 From: Dan Callahan Date: Wed, 9 Oct 2019 09:22:50 +0100 Subject: [PATCH] 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 --- pkgs/servers/sql/mariadb/default.nix | 5 ++--- 1 file 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 ++ [