@@ -1,12 +1,11 @@
11{ stdenv, fetchurl, fetchFromGitHub, cmake, pkgconfig, makeWrapper, ncurses, nixosTests
2−, libiconv, openssl, pcre, boost, judy, bison, libxml2, libkrb5, linux-pam, curl
3−, libaio, libevent, jemalloc450, jemalloc, cracklib, systemd, perl
2+, libiconv, openssl, pcre2, boost, judy, bison, libxml2, libkrb5, linux-pam, curl
3+, libaio, libevent, jemalloc, cracklib, systemd, perl
44, bzip2, lz4, lzo, snappy, xz, zlib, zstd
55, fixDarwinDylibNames, cctools, CoreServices, less
66, numactl # NUMA Support
77, withStorageMroonga ? true, kytea, msgpack, zeromq
88, withStorageRocks ? true
9−, withStorageToku ? true
109}:
1110
1211with stdenv.lib;
@@ -23,14 +22,14 @@ mariadb = server // {
2322};
2423
2524common = rec { # attributes common to both builds
26− version = "10.4.15";
25+ version = "10.5.8";
2726
2827 src = fetchurl {
2928 urls = [
3029 "https://downloads.mariadb.org/f/mariadb-${version}/source/mariadb-${version}.tar.gz"
3130 "https://downloads.mariadb.com/MariaDB/mariadb-${version}/source/mariadb-${version}.tar.gz"
3231 ];
33− sha256 = "0cdfzr768cb7n9ag9gqahr8c6igfn513md67xn4rf98ajmnxg0r7";
32+ sha256 = "1s3vfm73911cddjhgpcbkya6nz7ag2zygg56qqzwscn5ybv28j7b";
3433 name = "mariadb-${version}.tar.gz";
3534 };
3635
@@ -38,11 +37,10 @@ common = rec { # attributes common to both builds
3837 ++ optional stdenv.hostPlatform.isDarwin fixDarwinDylibNames;
3938
4039 buildInputs = [
41− ncurses openssl zlib pcre libiconv curl
40+ ncurses openssl zlib pcre2 libiconv curl
4241 ] ++ optionals stdenv.hostPlatform.isLinux [ libaio systemd libkrb5 ]
4342 ++ optionals stdenv.hostPlatform.isDarwin [ perl cctools CoreServices ]
44− ++ optional (!stdenv.hostPlatform.isDarwin && withStorageToku) [ jemalloc450 ]
45− ++ optional (!stdenv.hostPlatform.isDarwin && !withStorageToku) [ jemalloc ];
43+ ++ optional (!stdenv.hostPlatform.isDarwin) [ jemalloc ];
4644
4745 prePatch = ''
4846 sed -i 's,[^"]*/var/log,/var/log,g' storage/mroonga/vendor/groonga/CMakeLists.txt
@@ -174,6 +172,7 @@ server = stdenv.mkDerivation (common // {
174172 "-DWITH_INNODB_DISALLOW_WRITES=ON"
175173 "-DWITHOUT_EXAMPLE=1"
176174 "-DWITHOUT_FEDERATED=1"
175+ "-DWITHOUT_TOKUDB=1"
177176 ] ++ optional (stdenv.hostPlatform.isLinux && !stdenv.hostPlatform.isAarch32) [
178177 "-DWITH_NUMA=ON"
179178 ] ++ optional (!withStorageMroonga) [
@@ -182,13 +181,12 @@ server = stdenv.mkDerivation (common // {
182181 "-DWITHOUT_ROCKSDB=1"
183182 ] ++ optional (!stdenv.hostPlatform.isDarwin && withStorageRocks) [
184183 "-DWITH_ROCKSDB_JEMALLOC=ON"
185− ] ++ optional (stdenv.hostPlatform.isDarwin || stdenv.hostPlatform.isMusl || !withStorageToku) [
186− "-DWITHOUT_TOKUDB=1"
187− ] ++ optional (!stdenv.hostPlatform.isDarwin && withStorageToku) [
188− "-DWITH_JEMALLOC=static"
189− ] ++ optional stdenv.hostPlatform.isDarwin [
184+ ] ++ optional (!stdenv.hostPlatform.isDarwin) [
185+ "-DWITH_JEMALLOC=yes"
186+ ] ++ optionals stdenv.hostPlatform.isDarwin [
190187 "-DPLUGIN_AUTH_PAM=OFF"
191188 "-DWITHOUT_OQGRAPH=1"
189+ "-DWITHOUT_PLUGIN_S3=1"
192190 ];
193191
194192 preConfigure = optionalString (!stdenv.hostPlatform.isDarwin) ''
@@ -198,7 +196,6 @@ server = stdenv.mkDerivation (common // {
198196 postInstall = common.postInstall + ''
199197 chmod +x "$out"/bin/wsrep_sst_common
200198 rm "$out"/bin/{mariadb-client-test,mariadb-test,mysql_client_test,mysqltest}
201− rm -r "$out"/data # Don't need testing data
202199 '' + optionalString withStorageMroonga ''
203200 mv "$out"/share/{groonga,groonga-normalizer-mysql} "$out"/share/doc/mysql
204201 '' + optionalString (!stdenv.hostPlatform.isDarwin) ''