Skip to content

Commit

Permalink
mariadb: fix darwin build
Browse files Browse the repository at this point in the history
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
  6c97b04
  7e43b4d
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 NixOS#70835

(cherry picked from commit b0b0bb7)
  • Loading branch information
callahad authored and Drew Smathers committed Feb 23, 2020
1 parent c08c7a6 commit bca7643
Showing 1 changed file with 2 additions and 3 deletions.
5 changes: 2 additions & 3 deletions pkgs/servers/sql/mariadb/default.nix
Original file line number Diff line number Diff line change
Expand Up @@ -48,9 +48,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 = [
Expand Down Expand Up @@ -170,6 +167,8 @@ server = stdenv.mkDerivation (common // {

patches = common.patches ++ [
./cmake-without-client.patch
] ++ optionals stdenv.isDarwin [
./cmake-without-plugin-auth-pam.patch
];

cmakeFlags = common.cmakeFlags ++ [
Expand Down

0 comments on commit bca7643

Please sign in to comment.