Merge pull request #146220 from Izorkin/update-mariadb
mariadb: cleanup build configuration
This commit is contained in:
@@ -1,9 +1,15 @@
|
||||
{ lib, stdenv, fetchurl, fetchFromGitHub, cmake, pkg-config, makeWrapper, ncurses, nixosTests
|
||||
, libiconv, openssl, pcre2, boost, judy, bison, libxml2, libkrb5, linux-pam, curl
|
||||
, liburing, libevent, jemalloc, cracklib, systemd, perl
|
||||
{ lib, stdenv, fetchurl, nixosTests
|
||||
# Native buildInputs components
|
||||
, bison, boost, cmake, fixDarwinDylibNames, flex, makeWrapper, pkg-config
|
||||
# Common components
|
||||
, curl, libiconv, ncurses, openssl, pcre2
|
||||
, libkrb5, liburing, systemd
|
||||
, CoreServices, cctools, perl
|
||||
, jemalloc, less
|
||||
# Server components
|
||||
, bzip2, lz4, lzo, snappy, xz, zlib, zstd
|
||||
, fixDarwinDylibNames, cctools, CoreServices, less
|
||||
, numactl # NUMA Support
|
||||
, cracklib, judy, libevent, libxml2
|
||||
, linux-pam, numactl, pmdk
|
||||
, withStorageMroonga ? true, kytea, libsodium, msgpack, zeromq
|
||||
, withStorageRocks ? true
|
||||
}:
|
||||
@@ -30,12 +36,13 @@ common = rec { # attributes common to both builds
|
||||
};
|
||||
|
||||
nativeBuildInputs = [ cmake pkg-config ]
|
||||
++ optional stdenv.hostPlatform.isDarwin fixDarwinDylibNames;
|
||||
++ optional stdenv.hostPlatform.isDarwin fixDarwinDylibNames
|
||||
++ optional (!stdenv.hostPlatform.isDarwin) makeWrapper;
|
||||
|
||||
buildInputs = [
|
||||
ncurses openssl zlib pcre2 libiconv curl
|
||||
] ++ optionals stdenv.hostPlatform.isLinux [ liburing systemd libkrb5 ]
|
||||
++ optionals stdenv.hostPlatform.isDarwin [ perl cctools CoreServices ]
|
||||
curl libiconv ncurses openssl pcre2 zlib
|
||||
] ++ optionals stdenv.hostPlatform.isLinux [ libkrb5 liburing systemd ]
|
||||
++ optionals stdenv.hostPlatform.isDarwin [ CoreServices cctools perl ]
|
||||
++ optional (!stdenv.hostPlatform.isDarwin) [ jemalloc ];
|
||||
|
||||
prePatch = ''
|
||||
@@ -43,11 +50,11 @@ common = rec { # attributes common to both builds
|
||||
'';
|
||||
|
||||
patches = [
|
||||
./cmake-includedir.patch
|
||||
./patch/cmake-includedir.patch
|
||||
]
|
||||
# Fixes a build issue as documented on
|
||||
# https://jira.mariadb.org/browse/MDEV-26769?focusedCommentId=206073&page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel#comment-206073
|
||||
++ lib.optional (!stdenv.isLinux) ./macos-MDEV-26769-regression-fix.patch;
|
||||
++ lib.optional (!stdenv.isLinux) ./patch/macos-MDEV-26769-regression-fix.patch;
|
||||
|
||||
cmakeFlags = [
|
||||
"-DBUILD_CONFIG=mysql_release"
|
||||
@@ -96,6 +103,11 @@ common = rec { # attributes common to both builds
|
||||
rm -r $out/lib/pkgconfig
|
||||
'';
|
||||
|
||||
# perlPackages.DBDmysql is broken on darwin
|
||||
postFixup = optionalString (!stdenv.hostPlatform.isDarwin) ''
|
||||
wrapProgram $out/bin/mytop --set PATH ${makeBinPath [ less ncurses ]}
|
||||
'';
|
||||
|
||||
passthru.mysqlVersion = "5.7";
|
||||
|
||||
passthru.tests = {
|
||||
@@ -122,7 +134,7 @@ client = stdenv.mkDerivation (common // {
|
||||
outputs = [ "out" "man" ];
|
||||
|
||||
patches = common.patches ++ [
|
||||
./cmake-plugin-includedir.patch
|
||||
./patch/cmake-plugin-includedir.patch
|
||||
];
|
||||
|
||||
cmakeFlags = common.cmakeFlags ++ [
|
||||
@@ -146,15 +158,15 @@ server = stdenv.mkDerivation (common // {
|
||||
|
||||
outputs = [ "out" "man" ];
|
||||
|
||||
nativeBuildInputs = common.nativeBuildInputs ++ [ bison boost.dev ] ++ optional (!stdenv.hostPlatform.isDarwin) makeWrapper;
|
||||
nativeBuildInputs = common.nativeBuildInputs ++ [ bison boost.dev flex ];
|
||||
|
||||
buildInputs = common.buildInputs ++ [
|
||||
bzip2 lz4 lzo snappy xz zstd
|
||||
libxml2 judy libevent cracklib
|
||||
cracklib judy libevent libxml2
|
||||
] ++ optional (stdenv.hostPlatform.isLinux && !stdenv.hostPlatform.isAarch32) numactl
|
||||
++ optionals withStorageMroonga [ kytea libsodium msgpack zeromq ]
|
||||
++ optional stdenv.hostPlatform.isLinux linux-pam
|
||||
++ optional (!stdenv.hostPlatform.isDarwin) mytopEnv;
|
||||
++ optionals stdenv.hostPlatform.isLinux [ linux-pam pmdk.dev ]
|
||||
++ optional (!stdenv.hostPlatform.isDarwin) mytopEnv
|
||||
++ optionals withStorageMroonga [ kytea libsodium msgpack zeromq ];
|
||||
|
||||
patches = common.patches;
|
||||
|
||||
@@ -196,7 +208,7 @@ server = stdenv.mkDerivation (common // {
|
||||
'';
|
||||
|
||||
postInstall = common.postInstall + ''
|
||||
rm -rf "$out"/share/aclocal
|
||||
rm -r "$out"/share/aclocal
|
||||
chmod +x "$out"/bin/wsrep_sst_common
|
||||
rm "$out"/bin/{mariadb-client-test,mariadb-test,mysql_client_test,mysqltest}
|
||||
'' + optionalString withStorageMroonga ''
|
||||
@@ -207,11 +219,6 @@ server = stdenv.mkDerivation (common // {
|
||||
rm -r "$out"/OFF
|
||||
'';
|
||||
|
||||
# perlPackages.DBDmysql is broken on darwin
|
||||
postFixup = optionalString (!stdenv.hostPlatform.isDarwin) ''
|
||||
wrapProgram $out/bin/mytop --set PATH ${makeBinPath [ less ncurses ]}
|
||||
'';
|
||||
|
||||
CXXFLAGS = optionalString stdenv.hostPlatform.isi686 "-fpermissive";
|
||||
});
|
||||
in mariadb
|
||||
|
||||
@@ -4,17 +4,19 @@
|
||||
|
||||
stdenv.mkDerivation rec {
|
||||
pname = "mariadb-galera";
|
||||
version = "26.4.9";
|
||||
version = "26.4.10";
|
||||
|
||||
src = fetchFromGitHub {
|
||||
owner = "codership";
|
||||
repo = "galera";
|
||||
rev = "release_${version}";
|
||||
sha256 = "1nf8vv0b9v7rjsxl93avgvv0lz5jjg91brnric0dhlnp2dzzxi6g";
|
||||
sha256 = "sha256-v3fKadoHCAKHZGPjuh/uLnmAaaPESrax73GEI/mH39g=";
|
||||
fetchSubmodules = true;
|
||||
};
|
||||
|
||||
buildInputs = [ asio boost check openssl cmake ];
|
||||
nativeBuildInputs = [ cmake ];
|
||||
|
||||
buildInputs = [ asio boost.dev check openssl ];
|
||||
|
||||
preConfigure = ''
|
||||
# make sure bundled asio cannot be used, but leave behind license, because it gets installed
|
||||
|
||||
Reference in New Issue
Block a user