summary refs log tree commit diff
diff options
context:
space:
mode:
authorDmitry Kalinkin <dmitry.kalinkin@gmail.com>2021-12-16 17:55:08 -0500
committerDmitry Kalinkin <dmitry.kalinkin@gmail.com>2021-12-16 17:55:08 -0500
commitb6eea0848576b197c6761fb9d0b695646fbcc70b (patch)
tree3df4ca5895452919f2db9980b0530f231956b01a
parentbd7796dfcd94149b915a36ad2b23b8eaf78d92cd (diff)
downloadnixpkgs-b6eea0848576b197c6761fb9d0b695646fbcc70b.tar
nixpkgs-b6eea0848576b197c6761fb9d0b695646fbcc70b.tar.gz
nixpkgs-b6eea0848576b197c6761fb9d0b695646fbcc70b.tar.bz2
nixpkgs-b6eea0848576b197c6761fb9d0b695646fbcc70b.tar.lz
nixpkgs-b6eea0848576b197c6761fb9d0b695646fbcc70b.tar.xz
nixpkgs-b6eea0848576b197c6761fb9d0b695646fbcc70b.tar.zst
nixpkgs-b6eea0848576b197c6761fb9d0b695646fbcc70b.zip
openrw: fix darwin build
-rw-r--r--pkgs/games/openrw/default.nix8
1 files changed, 8 insertions, 0 deletions
diff --git a/pkgs/games/openrw/default.nix b/pkgs/games/openrw/default.nix
index f1bcab2895f..d86962b9abe 100644
--- a/pkgs/games/openrw/default.nix
+++ b/pkgs/games/openrw/default.nix
@@ -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 ];