mariadb: clean config
This commit is contained in:
parent
0692c615e5
commit
ac90575382
|
@ -43,8 +43,8 @@ common = rec { # attributes common to both builds
|
||||||
|
|
||||||
buildInputs = [
|
buildInputs = [
|
||||||
ncurses openssl zlib pcre jemalloc libiconv
|
ncurses openssl zlib pcre jemalloc libiconv
|
||||||
] ++ stdenv.lib.optionals stdenv.isLinux [ libaio systemd libkrb5 ]
|
] ++ optionals stdenv.isLinux [ libaio systemd libkrb5 ]
|
||||||
++ stdenv.lib.optionals stdenv.isDarwin [ perl fixDarwinDylibNames cctools CoreServices ];
|
++ optionals stdenv.isDarwin [ perl fixDarwinDylibNames cctools CoreServices ];
|
||||||
|
|
||||||
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
|
||||||
|
@ -87,25 +87,28 @@ common = rec { # attributes common to both builds
|
||||||
"-DWITH_SAFEMALLOC=OFF"
|
"-DWITH_SAFEMALLOC=OFF"
|
||||||
"-DWITH_UNIT_TESTS=OFF"
|
"-DWITH_UNIT_TESTS=OFF"
|
||||||
"-DEMBEDDED_LIBRARY=OFF"
|
"-DEMBEDDED_LIBRARY=OFF"
|
||||||
] ++ optional stdenv.isDarwin [
|
] ++ optionals stdenv.isDarwin [
|
||||||
# On Darwin without sandbox, CMake will find the system java and attempt to build with java support, but
|
# 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
|
# then it will fail during the actual build. Let's just disable the flag explicitly until someone decides
|
||||||
# to pass in java explicitly.
|
# to pass in java explicitly.
|
||||||
"-DCONNECT_WITH_JDBC=OFF"
|
"-DCONNECT_WITH_JDBC=OFF"
|
||||||
"-DCURSES_LIBRARY=${ncurses.out}/lib/libncurses.dylib"
|
"-DCURSES_LIBRARY=${ncurses.out}/lib/libncurses.dylib"
|
||||||
] ++ optional stdenv.hostPlatform.isMusl [
|
] ++ optionals stdenv.hostPlatform.isMusl [
|
||||||
"-DWITHOUT_TOKUDB=1" # mariadb docs say disable this for musl
|
"-DWITHOUT_TOKUDB=1" # mariadb docs say disable this for musl
|
||||||
];
|
];
|
||||||
|
|
||||||
postInstall = ''
|
postInstall = ''
|
||||||
|
rm "$out"/lib/mysql/plugin/daemon_example.ini
|
||||||
mkdir -p "$dev"/bin && mv "$out"/bin/{mariadb_config,mysql_config} "$dev"/bin
|
mkdir -p "$dev"/bin && mv "$out"/bin/{mariadb_config,mysql_config} "$dev"/bin
|
||||||
mkdir -p "$dev"/lib/mysql && mv "$out"/lib/mysql/{libmariadbclient.a,libmysqlclient.a,libmysqlclient_r.a,libmysqlservices.a} "$dev"/lib/mysql
|
mkdir -p "$dev"/lib/mysql && mv "$out"/lib/mysql/{libmariadbclient.a,libmysqlclient.a,libmysqlclient_r.a,libmysqlservices.a} "$dev"/lib/mysql
|
||||||
mkdir -p "$dev"/lib/mysql/plugin && mv "$out"/lib/mysql/plugin/{caching_sha2_password.so,dialog.so,mysql_clear_password.so,sha256_password.so} "$dev"/lib/mysql/plugin
|
mkdir -p "$dev"/lib/mysql/plugin && mv "$out"/lib/mysql/plugin/{caching_sha2_password.so,dialog.so,mysql_clear_password.so,sha256_password.so} "$dev"/lib/mysql/plugin
|
||||||
'';
|
'';
|
||||||
|
|
||||||
|
enableParallelBuilding = true;
|
||||||
|
|
||||||
passthru.mysqlVersion = "5.7";
|
passthru.mysqlVersion = "5.7";
|
||||||
|
|
||||||
meta = with stdenv.lib; {
|
meta = {
|
||||||
description = "An enhanced, drop-in replacement for MySQL";
|
description = "An enhanced, drop-in replacement for MySQL";
|
||||||
homepage = https://mariadb.org/;
|
homepage = https://mariadb.org/;
|
||||||
license = licenses.gpl2;
|
license = licenses.gpl2;
|
||||||
|
@ -139,15 +142,12 @@ client = stdenv.mkDerivation (common // {
|
||||||
postInstall = common.postInstall + ''
|
postInstall = common.postInstall + ''
|
||||||
rm -r "$out"/share/doc
|
rm -r "$out"/share/doc
|
||||||
rm "$out"/bin/{mysqltest,mytop,wsrep_sst_rsync_wan}
|
rm "$out"/bin/{mysqltest,mytop,wsrep_sst_rsync_wan}
|
||||||
rm "$out"/lib/mysql/plugin/daemon_example.ini
|
|
||||||
libmysqlclient_path=$(readlink -f $out/lib/mysql/libmysqlclient${libExt})
|
libmysqlclient_path=$(readlink -f $out/lib/mysql/libmysqlclient${libExt})
|
||||||
rm "$out"/lib/mysql/{libmariadb${libExt},libmysqlclient${libExt},libmysqlclient_r${libExt}}
|
rm "$out"/lib/mysql/{libmariadb${libExt},libmysqlclient${libExt},libmysqlclient_r${libExt}}
|
||||||
mv "$libmysqlclient_path" "$out"/lib/mysql/libmysqlclient${libExt}
|
mv "$libmysqlclient_path" "$out"/lib/mysql/libmysqlclient${libExt}
|
||||||
ln -sv libmysqlclient${libExt} "$out"/lib/mysql/libmysqlclient_r${libExt}
|
ln -sv libmysqlclient${libExt} "$out"/lib/mysql/libmysqlclient_r${libExt}
|
||||||
|
|
||||||
'';
|
'';
|
||||||
|
|
||||||
enableParallelBuilding = true; # the client should be OK
|
|
||||||
});
|
});
|
||||||
|
|
||||||
server = stdenv.mkDerivation (common // {
|
server = stdenv.mkDerivation (common // {
|
||||||
|
@ -199,17 +199,16 @@ server = stdenv.mkDerivation (common // {
|
||||||
chmod +x "$out"/bin/wsrep_sst_common
|
chmod +x "$out"/bin/wsrep_sst_common
|
||||||
rm "$out"/bin/mysql_client_test
|
rm "$out"/bin/mysql_client_test
|
||||||
rm -r "$out"/data # Don't need testing data
|
rm -r "$out"/data # Don't need testing data
|
||||||
rm "$out"/lib/mysql/plugin/daemon_example.ini
|
|
||||||
rm "$out"/lib/mysql/{libmysqlclient${libExt},libmysqlclient_r${libExt}}
|
rm "$out"/lib/mysql/{libmysqlclient${libExt},libmysqlclient_r${libExt}}
|
||||||
mv "$out"/share/{groonga,groonga-normalizer-mysql} "$out"/share/doc/mysql
|
mv "$out"/share/{groonga,groonga-normalizer-mysql} "$out"/share/doc/mysql
|
||||||
'' + optionalString withoutClient ''
|
'' + optionalString withoutClient ''
|
||||||
${ # We don't build with GSSAPI on Darwin
|
${ # We don't build with GSSAPI on Darwin
|
||||||
optionalString (! stdenv.isDarwin) ''
|
optionalString (!stdenv.isDarwin) ''
|
||||||
rm "$out"/lib/mysql/plugin/auth_gssapi_client.so
|
rm "$out"/lib/mysql/plugin/auth_gssapi_client.so
|
||||||
''
|
''
|
||||||
}
|
}
|
||||||
rm "$out"/lib/mysql/plugin/client_ed25519.so
|
rm "$out"/lib/mysql/plugin/client_ed25519.so
|
||||||
'' + optionalString (! stdenv.isDarwin) ''
|
'' + optionalString (!stdenv.isDarwin) ''
|
||||||
sed -i 's/-mariadb/-mysql/' "$out"/bin/galera_new_cluster
|
sed -i 's/-mariadb/-mysql/' "$out"/bin/galera_new_cluster
|
||||||
'';
|
'';
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue