Merge pull request #146220 from Izorkin/update-mariadb

mariadb: cleanup build configuration

authored by

ajs124 and committed by
GitHub
623cfa87 41aaf69b

+35 -26
pkgs/servers/sql/mariadb/cmake-includedir.patch pkgs/servers/sql/mariadb/patch/cmake-includedir.patch
pkgs/servers/sql/mariadb/cmake-plugin-includedir.patch pkgs/servers/sql/mariadb/patch/cmake-plugin-includedir.patch
+30 -23
pkgs/servers/sql/mariadb/default.nix
··· 1 - { lib, stdenv, fetchurl, fetchFromGitHub, cmake, pkg-config, makeWrapper, ncurses, nixosTests 2 - , libiconv, openssl, pcre2, boost, judy, bison, libxml2, libkrb5, linux-pam, curl 3 - , liburing, libevent, jemalloc, cracklib, systemd, perl 1 + { lib, stdenv, fetchurl, nixosTests 2 + # Native buildInputs components 3 + , bison, boost, cmake, fixDarwinDylibNames, flex, makeWrapper, pkg-config 4 + # Common components 5 + , curl, libiconv, ncurses, openssl, pcre2 6 + , libkrb5, liburing, systemd 7 + , CoreServices, cctools, perl 8 + , jemalloc, less 9 + # Server components 4 10 , bzip2, lz4, lzo, snappy, xz, zlib, zstd 5 - , fixDarwinDylibNames, cctools, CoreServices, less 6 - , numactl # NUMA Support 11 + , cracklib, judy, libevent, libxml2 12 + , linux-pam, numactl, pmdk 7 13 , withStorageMroonga ? true, kytea, libsodium, msgpack, zeromq 8 14 , withStorageRocks ? true 9 15 }: ··· 30 36 }; 31 37 32 38 nativeBuildInputs = [ cmake pkg-config ] 33 - ++ optional stdenv.hostPlatform.isDarwin fixDarwinDylibNames; 39 + ++ optional stdenv.hostPlatform.isDarwin fixDarwinDylibNames 40 + ++ optional (!stdenv.hostPlatform.isDarwin) makeWrapper; 34 41 35 42 buildInputs = [ 36 - ncurses openssl zlib pcre2 libiconv curl 37 - ] ++ optionals stdenv.hostPlatform.isLinux [ liburing systemd libkrb5 ] 38 - ++ optionals stdenv.hostPlatform.isDarwin [ perl cctools CoreServices ] 43 + curl libiconv ncurses openssl pcre2 zlib 44 + ] ++ optionals stdenv.hostPlatform.isLinux [ libkrb5 liburing systemd ] 45 + ++ optionals stdenv.hostPlatform.isDarwin [ CoreServices cctools perl ] 39 46 ++ optional (!stdenv.hostPlatform.isDarwin) [ jemalloc ]; 40 47 41 48 prePatch = '' ··· 43 50 ''; 44 51 45 52 patches = [ 46 - ./cmake-includedir.patch 53 + ./patch/cmake-includedir.patch 47 54 ] 48 55 # Fixes a build issue as documented on 49 56 # https://jira.mariadb.org/browse/MDEV-26769?focusedCommentId=206073&page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel#comment-206073 50 - ++ lib.optional (!stdenv.isLinux) ./macos-MDEV-26769-regression-fix.patch; 57 + ++ lib.optional (!stdenv.isLinux) ./patch/macos-MDEV-26769-regression-fix.patch; 51 58 52 59 cmakeFlags = [ 53 60 "-DBUILD_CONFIG=mysql_release" ··· 94 101 rm "$out"/bin/{mariadb-config,mariadb_config,mysql_config} 95 102 rm -r $out/include 96 103 rm -r $out/lib/pkgconfig 104 + ''; 105 + 106 + # perlPackages.DBDmysql is broken on darwin 107 + postFixup = optionalString (!stdenv.hostPlatform.isDarwin) '' 108 + wrapProgram $out/bin/mytop --set PATH ${makeBinPath [ less ncurses ]} 97 109 ''; 98 110 99 111 passthru.mysqlVersion = "5.7"; ··· 122 134 outputs = [ "out" "man" ]; 123 135 124 136 patches = common.patches ++ [ 125 - ./cmake-plugin-includedir.patch 137 + ./patch/cmake-plugin-includedir.patch 126 138 ]; 127 139 128 140 cmakeFlags = common.cmakeFlags ++ [ ··· 146 158 147 159 outputs = [ "out" "man" ]; 148 160 149 - nativeBuildInputs = common.nativeBuildInputs ++ [ bison boost.dev ] ++ optional (!stdenv.hostPlatform.isDarwin) makeWrapper; 161 + nativeBuildInputs = common.nativeBuildInputs ++ [ bison boost.dev flex ]; 150 162 151 163 buildInputs = common.buildInputs ++ [ 152 164 bzip2 lz4 lzo snappy xz zstd 153 - libxml2 judy libevent cracklib 165 + cracklib judy libevent libxml2 154 166 ] ++ optional (stdenv.hostPlatform.isLinux && !stdenv.hostPlatform.isAarch32) numactl 155 - ++ optionals withStorageMroonga [ kytea libsodium msgpack zeromq ] 156 - ++ optional stdenv.hostPlatform.isLinux linux-pam 157 - ++ optional (!stdenv.hostPlatform.isDarwin) mytopEnv; 167 + ++ optionals stdenv.hostPlatform.isLinux [ linux-pam pmdk.dev ] 168 + ++ optional (!stdenv.hostPlatform.isDarwin) mytopEnv 169 + ++ optionals withStorageMroonga [ kytea libsodium msgpack zeromq ]; 158 170 159 171 patches = common.patches; 160 172 ··· 196 208 ''; 197 209 198 210 postInstall = common.postInstall + '' 199 - rm -rf "$out"/share/aclocal 211 + rm -r "$out"/share/aclocal 200 212 chmod +x "$out"/bin/wsrep_sst_common 201 213 rm "$out"/bin/{mariadb-client-test,mariadb-test,mysql_client_test,mysqltest} 202 214 '' + optionalString withStorageMroonga '' ··· 205 217 mv "$out"/OFF/suite/plugins/pam/pam_mariadb_mtr.so "$out"/share/pam/lib/security 206 218 mv "$out"/OFF/suite/plugins/pam/mariadb_mtr "$out"/share/pam/etc/security 207 219 rm -r "$out"/OFF 208 - ''; 209 - 210 - # perlPackages.DBDmysql is broken on darwin 211 - postFixup = optionalString (!stdenv.hostPlatform.isDarwin) '' 212 - wrapProgram $out/bin/mytop --set PATH ${makeBinPath [ less ncurses ]} 213 220 ''; 214 221 215 222 CXXFLAGS = optionalString stdenv.hostPlatform.isi686 "-fpermissive";
+5 -3
pkgs/servers/sql/mariadb/galera/default.nix
··· 4 4 5 5 stdenv.mkDerivation rec { 6 6 pname = "mariadb-galera"; 7 - version = "26.4.9"; 7 + version = "26.4.10"; 8 8 9 9 src = fetchFromGitHub { 10 10 owner = "codership"; 11 11 repo = "galera"; 12 12 rev = "release_${version}"; 13 - sha256 = "1nf8vv0b9v7rjsxl93avgvv0lz5jjg91brnric0dhlnp2dzzxi6g"; 13 + sha256 = "sha256-v3fKadoHCAKHZGPjuh/uLnmAaaPESrax73GEI/mH39g="; 14 14 fetchSubmodules = true; 15 15 }; 16 16 17 - buildInputs = [ asio boost check openssl cmake ]; 17 + nativeBuildInputs = [ cmake ]; 18 + 19 + buildInputs = [ asio boost.dev check openssl ]; 18 20 19 21 preConfigure = '' 20 22 # make sure bundled asio cannot be used, but leave behind license, because it gets installed
pkgs/servers/sql/mariadb/macos-MDEV-26769-regression-fix.patch pkgs/servers/sql/mariadb/patch/macos-MDEV-26769-regression-fix.patch