From 4b8d66aa7266ab55f08d53271df36832d9c055d2 Mon Sep 17 00:00:00 2001 From: Florian Klink Date: Sun, 15 Mar 2020 13:35:37 +0100 Subject: [PATCH] mariadb: remove withoutClient When used as a global override, it breaks most of the options in the mysql module, such as ensureDatabases, ensureUsers, initialDatabases, initialScript. We could use `.client` there, but if the reasoning behind this was closure size reduction, we now end up with the same (or a bigger) runtime closure and more complexity. Apart from the options exposed by the mysql module, the client is also likely to be required for local backups or DBA tasks anyways. Instead of dealing with all the increased complexity of this for no arguable benefit, let's just remove the `withoutClient` argument. Storage space on mysql servers shouldn't be that much of an issue. Closes #82428. --- .../sql/mariadb/cmake-without-client.patch | 15 --------------- pkgs/servers/sql/mariadb/default.nix | 15 +-------------- 2 files changed, 1 insertion(+), 29 deletions(-) delete mode 100644 pkgs/servers/sql/mariadb/cmake-without-client.patch diff --git a/pkgs/servers/sql/mariadb/cmake-without-client.patch b/pkgs/servers/sql/mariadb/cmake-without-client.patch deleted file mode 100644 index ce36d036b6d0..000000000000 --- a/pkgs/servers/sql/mariadb/cmake-without-client.patch +++ /dev/null @@ -1,15 +0,0 @@ -diff --git a/CMakeLists.txt b/CMakeLists.txt -index 1ea7c1df..b0face0d 100644 ---- a/CMakeLists.txt -+++ b/CMakeLists.txt -@@ -176,6 +176,10 @@ ELSE() - SET (SKIP_COMPONENTS "N-O-N-E") - ENDIF() - -+IF (WITHOUT_CLIENT) -+ SET (SKIP_COMPONENTS "Client|ClientPlugins|ManPagesClient") -+ENDIF() -+ - OPTION(NOT_FOR_DISTRIBUTION "Allow linking with GPLv2-incompatible system libraries. Only set it you never plan to distribute the resulting binaries" OFF) - - INCLUDE(check_compiler_flag) diff --git a/pkgs/servers/sql/mariadb/default.nix b/pkgs/servers/sql/mariadb/default.nix index 51181c4d2ae5..2b287c8f6ffd 100644 --- a/pkgs/servers/sql/mariadb/default.nix +++ b/pkgs/servers/sql/mariadb/default.nix @@ -4,7 +4,6 @@ , fixDarwinDylibNames, cctools, CoreServices, less , numactl # NUMA Support , withStorageMroonga ? true, kytea, msgpack, zeromq -, withoutClient ? false }: with stdenv.lib; @@ -149,9 +148,7 @@ server = stdenv.mkDerivation (common // { ++ optional stdenv.hostPlatform.isLinux linux-pam ++ optional (!stdenv.hostPlatform.isDarwin) mytopEnv; - patches = common.patches ++ [ - ./cmake-without-client.patch - ] ++ optionals stdenv.hostPlatform.isDarwin [ + patches = common.patches ++ optionals stdenv.hostPlatform.isDarwin [ ./cmake-without-plugin-auth-pam.patch ]; @@ -170,8 +167,6 @@ server = stdenv.mkDerivation (common // { "-DWITH_NUMA=ON" ] ++ optional (!withStorageMroonga) [ "-DWITHOUT_MROONGA=ON" - ] ++ optionals withoutClient [ - "-DWITHOUT_CLIENT=ON" ] ++ optionals stdenv.hostPlatform.isDarwin [ "-DWITHOUT_OQGRAPH=1" "-DWITHOUT_TOKUDB=1" @@ -185,14 +180,6 @@ server = stdenv.mkDerivation (common // { chmod +x "$out"/bin/wsrep_sst_common rm "$out"/bin/{mysql_client_test,mysqltest} rm -r "$out"/data # Don't need testing data - '' + optionalString withoutClient '' - ${ # We don't build with GSSAPI on Darwin - optionalString (!stdenv.hostPlatform.isDarwin) '' - rm "$out"/lib/mysql/plugin/auth_gssapi_client.so - '' - } - rm "$out"/lib/mysql/plugin/client_ed25519.so - rm "$out"/lib/{libmysqlclient${libExt},libmysqlclient_r${libExt}} '' + optionalString withStorageMroonga '' mv "$out"/share/{groonga,groonga-normalizer-mysql} "$out"/share/doc/mysql '' + optionalString (!stdenv.hostPlatform.isDarwin) ''