mariadb: fix build on x86_64-darwin

This commit is contained in:
Simon Hauser
2025-10-22 12:22:06 +02:00
parent 2b9d36ae10
commit 47e4f9f869

View File

@@ -116,10 +116,15 @@ let
prePatch = '' prePatch = ''
sed -i 's,[^"]*/var/log,/var/log,g' storage/mroonga/vendor/groonga/CMakeLists.txt sed -i 's,[^"]*/var/log,/var/log,g' storage/mroonga/vendor/groonga/CMakeLists.txt
''; '';
env = lib.optionalAttrs (stdenv.hostPlatform.isLinux && !stdenv.hostPlatform.isGnu) { env =
# MariaDB uses non-POSIX fopen64, which musl only conditionally defines. lib.optionalAttrs (stdenv.hostPlatform.isLinux && !stdenv.hostPlatform.isGnu) {
NIX_CFLAGS_COMPILE = "-D_LARGEFILE64_SOURCE"; # MariaDB uses non-POSIX fopen64, which musl only conditionally defines.
}; NIX_CFLAGS_COMPILE = "-D_LARGEFILE64_SOURCE";
}
// lib.optionalAttrs (stdenv.hostPlatform.isDarwin && stdenv.hostPlatform.isx86_64) {
# Detection of netdb.h doesnt work for some reason on x86_64-darwin
NIX_CFLAGS_COMPILE = "-DHAVE_NETDB_H";
};
patches = [ patches = [
./patch/cmake-includedir.patch ./patch/cmake-includedir.patch