From 0296e678cf58e944b1ba7c0a13ad7b89b0a190b4 Mon Sep 17 00:00:00 2001 From: Izorkin Date: Wed, 1 Apr 2020 16:51:30 +0300 Subject: mariadb: add option to build server without tokudb storage --- pkgs/servers/sql/mariadb/default.nix | 21 +++++++++++++-------- 1 file changed, 13 insertions(+), 8 deletions(-) (limited to 'pkgs/servers/sql') diff --git a/pkgs/servers/sql/mariadb/default.nix b/pkgs/servers/sql/mariadb/default.nix index 2b287c8f6ffd..1e9c087bb6e7 100644 --- a/pkgs/servers/sql/mariadb/default.nix +++ b/pkgs/servers/sql/mariadb/default.nix @@ -1,9 +1,10 @@ { stdenv, fetchurl, fetchFromGitHub, cmake, pkgconfig, makeWrapper, ncurses, zlib, xz, lzo, lz4, bzip2, snappy , libiconv, openssl, pcre, boost, judy, bison, libxml2, libkrb5, linux-pam, curl -, libaio, libevent, jemalloc, cracklib, systemd, perl +, libaio, libevent, jemalloc450, jemalloc, cracklib, systemd, perl , fixDarwinDylibNames, cctools, CoreServices, less , numactl # NUMA Support , withStorageMroonga ? true, kytea, msgpack, zeromq +, withStorageToku ? true }: with stdenv.lib; @@ -34,9 +35,11 @@ common = rec { # attributes common to both builds nativeBuildInputs = [ cmake pkgconfig ]; buildInputs = [ - ncurses openssl zlib pcre jemalloc libiconv curl + ncurses openssl zlib pcre libiconv curl ] ++ optionals stdenv.hostPlatform.isLinux [ libaio systemd libkrb5 ] - ++ optionals stdenv.hostPlatform.isDarwin [ perl fixDarwinDylibNames cctools CoreServices ]; + ++ optionals stdenv.hostPlatform.isDarwin [ perl fixDarwinDylibNames cctools CoreServices ] + ++ optional (!stdenv.hostPlatform.isDarwin && withStorageToku) [ jemalloc450 ] + ++ optional (!stdenv.hostPlatform.isDarwin && !withStorageToku) [ jemalloc ]; prePatch = '' sed -i 's,[^"]*/var/log,/var/log,g' storage/mroonga/vendor/groonga/CMakeLists.txt @@ -80,8 +83,6 @@ common = rec { # attributes common to both builds # to pass in java explicitly. "-DCONNECT_WITH_JDBC=OFF" "-DCURSES_LIBRARY=${ncurses.out}/lib/libncurses.dylib" - ] ++ optionals stdenv.hostPlatform.isMusl [ - "-DWITHOUT_TOKUDB=1" # mariadb docs say disable this for musl ]; postInstall = '' @@ -99,6 +100,7 @@ common = rec { # attributes common to both builds passthru.mysqlVersion = "5.7"; meta = { + description = "An enhanced, drop-in replacement for MySQL"; homepage = https://mariadb.org/; license = licenses.gpl2; @@ -166,10 +168,13 @@ server = stdenv.mkDerivation (common // { ] ++ optional (stdenv.hostPlatform.isLinux && !stdenv.hostPlatform.isAarch32) [ "-DWITH_NUMA=ON" ] ++ optional (!withStorageMroonga) [ - "-DWITHOUT_MROONGA=ON" - ] ++ optionals stdenv.hostPlatform.isDarwin [ - "-DWITHOUT_OQGRAPH=1" + "-DWITHOUT_MROONGA=1" + ] ++ optional (stdenv.hostPlatform.isDarwin || stdenv.hostPlatform.isMusl || !withStorageToku) [ "-DWITHOUT_TOKUDB=1" + ] ++ optional (!stdenv.hostPlatform.isDarwin && withStorageToku) [ + "-DWITH_JEMALLOC=static" + ] ++ optional stdenv.hostPlatform.isDarwin [ + "-DWITHOUT_OQGRAPH=1" ]; preConfigure = optionalString (!stdenv.hostPlatform.isDarwin) '' -- cgit 1.4.1 From eafdfc8f51b10b629ace0f8e5dba784b83fcc7ea Mon Sep 17 00:00:00 2001 From: Izorkin Date: Thu, 2 Apr 2020 10:12:22 +0300 Subject: mariadb: add option to build server without rocksdb storage --- pkgs/servers/sql/mariadb/default.nix | 5 +++++ 1 file changed, 5 insertions(+) (limited to 'pkgs/servers/sql') diff --git a/pkgs/servers/sql/mariadb/default.nix b/pkgs/servers/sql/mariadb/default.nix index 1e9c087bb6e7..c0d4cc101972 100644 --- a/pkgs/servers/sql/mariadb/default.nix +++ b/pkgs/servers/sql/mariadb/default.nix @@ -4,6 +4,7 @@ , fixDarwinDylibNames, cctools, CoreServices, less , numactl # NUMA Support , withStorageMroonga ? true, kytea, msgpack, zeromq +, withStorageRocks ? true , withStorageToku ? true }: @@ -169,6 +170,10 @@ server = stdenv.mkDerivation (common // { "-DWITH_NUMA=ON" ] ++ optional (!withStorageMroonga) [ "-DWITHOUT_MROONGA=1" + ] ++ optional (!withStorageRocks) [ + "-DWITHOUT_ROCKSDB=1" + ] ++ optional (!stdenv.hostPlatform.isDarwin && withStorageRocks) [ + "-DWITH_ROCKSDB_JEMALLOC=ON" ] ++ optional (stdenv.hostPlatform.isDarwin || stdenv.hostPlatform.isMusl || !withStorageToku) [ "-DWITHOUT_TOKUDB=1" ] ++ optional (!stdenv.hostPlatform.isDarwin && withStorageToku) [ -- cgit 1.4.1 From 24357432cdac1ab22f3d5e1f6021c50bcba3ac6a Mon Sep 17 00:00:00 2001 From: Izorkin Date: Thu, 2 Apr 2020 10:22:10 +0300 Subject: mariadb: add zstd compression --- pkgs/servers/sql/mariadb/default.nix | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) (limited to 'pkgs/servers/sql') diff --git a/pkgs/servers/sql/mariadb/default.nix b/pkgs/servers/sql/mariadb/default.nix index c0d4cc101972..b2274a457aee 100644 --- a/pkgs/servers/sql/mariadb/default.nix +++ b/pkgs/servers/sql/mariadb/default.nix @@ -1,6 +1,7 @@ -{ stdenv, fetchurl, fetchFromGitHub, cmake, pkgconfig, makeWrapper, ncurses, zlib, xz, lzo, lz4, bzip2, snappy +{ stdenv, fetchurl, fetchFromGitHub, cmake, pkgconfig, makeWrapper, ncurses , libiconv, openssl, pcre, boost, judy, bison, libxml2, libkrb5, linux-pam, curl , libaio, libevent, jemalloc450, jemalloc, cracklib, systemd, perl +, bzip2, lz4, lzo, snappy, xz, zlib, zstd , fixDarwinDylibNames, cctools, CoreServices, less , numactl # NUMA Support , withStorageMroonga ? true, kytea, msgpack, zeromq @@ -144,7 +145,7 @@ server = stdenv.mkDerivation (common // { nativeBuildInputs = common.nativeBuildInputs ++ [ bison ] ++ optional (!stdenv.hostPlatform.isDarwin) makeWrapper; buildInputs = common.buildInputs ++ [ - xz lzo lz4 bzip2 snappy + bzip2 lz4 lzo snappy xz zstd libxml2 boost judy libevent cracklib ] ++ optional (stdenv.hostPlatform.isLinux && !stdenv.hostPlatform.isAarch32) numactl ++ optionals withStorageMroonga [ kytea msgpack zeromq ] -- cgit 1.4.1 From 5abc729dd6f70f71efc499541dbb8b9c334ef722 Mon Sep 17 00:00:00 2001 From: Izorkin Date: Thu, 2 Apr 2020 10:31:58 +0300 Subject: mariadb: fix deps build --- pkgs/servers/sql/mariadb/default.nix | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'pkgs/servers/sql') diff --git a/pkgs/servers/sql/mariadb/default.nix b/pkgs/servers/sql/mariadb/default.nix index b2274a457aee..9c23da852f5b 100644 --- a/pkgs/servers/sql/mariadb/default.nix +++ b/pkgs/servers/sql/mariadb/default.nix @@ -142,11 +142,11 @@ server = stdenv.mkDerivation (common // { outputs = [ "out" "man" ]; - nativeBuildInputs = common.nativeBuildInputs ++ [ bison ] ++ optional (!stdenv.hostPlatform.isDarwin) makeWrapper; + nativeBuildInputs = common.nativeBuildInputs ++ [ bison boost.dev ] ++ optional (!stdenv.hostPlatform.isDarwin) makeWrapper; buildInputs = common.buildInputs ++ [ bzip2 lz4 lzo snappy xz zstd - libxml2 boost judy libevent cracklib + libxml2 judy libevent cracklib ] ++ optional (stdenv.hostPlatform.isLinux && !stdenv.hostPlatform.isAarch32) numactl ++ optionals withStorageMroonga [ kytea msgpack zeromq ] ++ optional stdenv.hostPlatform.isLinux linux-pam -- cgit 1.4.1