about summary refs log tree commit diff
path: root/pkgs/games/openspades
diff options
context:
space:
mode:
authorDomen Kožar <domen@dev.si>2016-03-01 14:31:33 +0100
committerDomen Kožar <domen@dev.si>2016-03-01 14:31:33 +0100
commit976657a71f96d9b7cdd09e96c8d1e844a74ce4d5 (patch)
tree85b3d074cbf803f5c00a06331a1f6ca7a98e9c2b /pkgs/games/openspades
parente5069c1be590df367f9f2e3085bc238cf053d285 (diff)
openspades: fix build
Diffstat (limited to 'pkgs/games/openspades')
-rw-r--r--pkgs/games/openspades/default.nix7
1 files changed, 7 insertions, 0 deletions
diff --git a/pkgs/games/openspades/default.nix b/pkgs/games/openspades/default.nix
index df987b3f856c4..475a844c1aba4 100644
--- a/pkgs/games/openspades/default.nix
+++ b/pkgs/games/openspades/default.nix
@@ -12,6 +12,13 @@ stdenv.mkDerivation rec {
     sha256 = "1aa848cck8qrp67ha9vrkzm3k24r2aiv1v4dxla6pi22rw98yxzm";
   };
 
+  # https://github.com/yvt/openspades/issues/354
+  postPatch = ''
+    substituteInPlace Sources/Client/Client_Input.cpp --replace "isnan(" "std::isnan("
+    substituteInPlace Sources/Client/Corpse.cpp --replace "isnan(" "std::isnan("
+    substituteInPlace Sources/Draw/SWMapRenderer.cpp --replace "isnan(" "std::isnan(" --replace "isinf(" "std::isinf("
+  '';
+
   nativeBuildInputs = 
     with stdenv.lib;
     [ cmake curl glew makeWrapper mesa SDL2 SDL2_image unzip wget zlib ]