3
0
Fork 0
forked from mirrors/nixpkgs

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
  6c97b0486c
  7e43b4d0ae
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
This commit is contained in:
Dan Callahan 2019-10-09 09:22:50 +01:00
parent 6dc7f20f85
commit b0b0bb7e0b
No known key found for this signature in database
GPG key ID: 8D6DD713E9EBA7FD

View file

@ -41,9 +41,6 @@ common = rec { # attributes common to both builds
prePatch = '' prePatch = ''
sed -i 's,[^"]*/var/log,/var/log,g' storage/mroonga/vendor/groonga/CMakeLists.txt 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 = [ patches = [
@ -163,6 +160,8 @@ server = stdenv.mkDerivation (common // {
patches = common.patches ++ [ patches = common.patches ++ [
./cmake-without-client.patch ./cmake-without-client.patch
] ++ optionals stdenv.isDarwin [
./cmake-without-plugin-auth-pam.patch
]; ];
cmakeFlags = common.cmakeFlags ++ [ cmakeFlags = common.cmakeFlags ++ [