openrw: fix darwin build

This commit is contained in:
Dmitry Kalinkin 2021-12-16 17:55:08 -05:00
parent bd7796dfcd
commit b6eea08485
No known key found for this signature in database
GPG Key ID: 5157B3EC8B2CA333

View File

@ -28,8 +28,16 @@ stdenv.mkDerivation {
fetchSubmodules = true;
};
postPatch = lib.optional (stdenv.cc.isClang && (lib.versionAtLeast stdenv.cc.version "9"))''
substituteInPlace cmake_configure.cmake \
--replace 'target_link_libraries(rw_interface INTERFACE "stdc++fs")' ""
'';
nativeBuildInputs = [ cmake ];
# error: 'path' is unavailable: introduced in macOS 10.15
CXXFLAGS = lib.optional (stdenv.hostPlatform.system == "x86_64-darwin") "-D_LIBCPP_DISABLE_AVAILABILITY";
buildInputs = [
sfml libGLU libGL bullet glm libmad xlibsWrapper openal SDL2 boost ffmpeg
] ++ lib.optionals stdenv.isDarwin [ OpenAL Cocoa ];