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.
This commit is contained in:
parent
1f0df5f21f
commit
ccd16f87d5
@ -32,8 +32,8 @@ common = rec { # attributes common to both builds
|
|||||||
nativeBuildInputs = [ cmake pkgconfig ];
|
nativeBuildInputs = [ cmake pkgconfig ];
|
||||||
|
|
||||||
buildInputs = [
|
buildInputs = [
|
||||||
ncurses openssl zlib pcre
|
ncurses openssl zlib pcre jemalloc
|
||||||
] ++ stdenv.lib.optionals stdenv.isLinux [ jemalloc libaio systemd ]
|
] ++ stdenv.lib.optionals stdenv.isLinux [ libaio systemd ]
|
||||||
++ stdenv.lib.optionals stdenv.isDarwin [ perl fixDarwinDylibNames cctools CoreServices ];
|
++ stdenv.lib.optionals stdenv.isDarwin [ perl fixDarwinDylibNames cctools CoreServices ];
|
||||||
|
|
||||||
cmakeFlags = [
|
cmakeFlags = [
|
||||||
@ -49,9 +49,18 @@ common = rec { # attributes common to both builds
|
|||||||
"-DWITH_ZLIB=system"
|
"-DWITH_ZLIB=system"
|
||||||
"-DWITH_SSL=system"
|
"-DWITH_SSL=system"
|
||||||
"-DWITH_PCRE=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.isDarwin "-DCURSES_LIBRARY=${ncurses.out}/lib/libncurses.dylib"
|
||||||
++ optional (!stdenv.isLinux) "-DWITH_JEMALLOC=no" # bad build at least on Darwin
|
|
||||||
;
|
;
|
||||||
|
|
||||||
preConfigure = ''
|
preConfigure = ''
|
||||||
|
Loading…
Reference in New Issue
Block a user