mariadb: fix build on x86_64-darwin (#454507)

This commit is contained in:
Vladimír Čunát
2025-10-22 20:59:19 +00:00
committed by GitHub
+9 -4
View File
@@ -116,10 +116,15 @@ let
prePatch = ''
sed -i 's,[^"]*/var/log,/var/log,g' storage/mroonga/vendor/groonga/CMakeLists.txt
'';
env = lib.optionalAttrs (stdenv.hostPlatform.isLinux && !stdenv.hostPlatform.isGnu) {
# MariaDB uses non-POSIX fopen64, which musl only conditionally defines.
NIX_CFLAGS_COMPILE = "-D_LARGEFILE64_SOURCE";
};
env =
lib.optionalAttrs (stdenv.hostPlatform.isLinux && !stdenv.hostPlatform.isGnu) {
# 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 = [
./patch/cmake-includedir.patch