diff options
author | Dan Peebles <pumpkin@me.com> | 2016-08-14 14:29:02 -0400 |
---|---|---|
committer | Dan Peebles <pumpkin@me.com> | 2016-08-14 15:08:23 -0400 |
commit | ccd16f87d545448ad8c3b5037d191d1994226a67 (patch) | |
tree | e0eb1e55227b5f0dcb200dd6d54b176f488f629c /pkgs/servers/sql | |
parent | 1f0df5f21fa038eb27e1a02ed47141d2d6fa214f (diff) |
mariadb: re-enable jemalloc on darwin and fix impurity
CMake in its usual infinite wisdom searches all over the system for java and finds the host OSX java and JNI headers. It then decides to build the connector and fails later on because we didn't actually tell Nix that we wanted java in scope. So instead, we just tell CMake that we don't want the jdbc connector. I believe it does the same with GSS, so I disable that stuff too. None of this should affect Linux, but let me know if it does somheow.
Diffstat (limited to 'pkgs/servers/sql')
-rw-r--r-- | pkgs/servers/sql/mariadb/default.nix | 15 |
1 files changed, 12 insertions, 3 deletions
diff --git a/pkgs/servers/sql/mariadb/default.nix b/pkgs/servers/sql/mariadb/default.nix index 76a7755f39570..97b7a90892a7d 100644 --- a/pkgs/servers/sql/mariadb/default.nix +++ b/pkgs/servers/sql/mariadb/default.nix @@ -32,8 +32,8 @@ common = rec { # attributes common to both builds nativeBuildInputs = [ cmake pkgconfig ]; buildInputs = [ - ncurses openssl zlib pcre - ] ++ stdenv.lib.optionals stdenv.isLinux [ jemalloc libaio systemd ] + ncurses openssl zlib pcre jemalloc + ] ++ stdenv.lib.optionals stdenv.isLinux [ libaio systemd ] ++ stdenv.lib.optionals stdenv.isDarwin [ perl fixDarwinDylibNames cctools CoreServices ]; cmakeFlags = [ @@ -49,9 +49,18 @@ common = rec { # attributes common to both builds "-DWITH_ZLIB=system" "-DWITH_SSL=system" "-DWITH_PCRE=system" + + # On Darwin without sandbox, CMake will find the system java and attempt to build with java support, but + # then it will fail during the actual build. Let's just disable the flag explicitly until someone decides + # to pass in java explicitly. This should have no effect on Linux. + "-DCONNECT_WITH_JDBC=OFF" + + # Same as above. Somehow on Darwin CMake decides that we support GSS even though we aren't provding the + # library through Nix, and then breaks later on. This should have no effect on Linux. + "-DPLUGIN_AUTH_GSSAPI=NO" + "-DPLUGIN_AUTH_GSSAPI_CLIENT=NO" ] ++ optional stdenv.isDarwin "-DCURSES_LIBRARY=${ncurses.out}/lib/libncurses.dylib" - ++ optional (!stdenv.isLinux) "-DWITH_JEMALLOC=no" # bad build at least on Darwin ; preConfigure = '' |