about summary refs log tree commit diff
path: root/pkgs/games/openspades/default.nix
diff options
context:
space:
mode:
authorVladimír Čunát <vcunat@gmail.com>2016-06-19 10:18:30 +0200
committerVladimír Čunát <vcunat@gmail.com>2016-06-19 10:18:30 +0200
commit97c484a10f4b38efc4fb3dd210defed96003ae7d (patch)
tree3cf505288a69445d7a0da288197352484942421c /pkgs/games/openspades/default.nix
parentd133a168f082d2f4c94984190e836e55f5e389a7 (diff)
treewide: fix #include errors after gcc-5.4
They were mostly missing <cmath> or <math.h>.
Diffstat (limited to 'pkgs/games/openspades/default.nix')
-rw-r--r--pkgs/games/openspades/default.nix5
1 files changed, 4 insertions, 1 deletions
diff --git a/pkgs/games/openspades/default.nix b/pkgs/games/openspades/default.nix
index 2203bb6337eb4..d263be3ec1156 100644
--- a/pkgs/games/openspades/default.nix
+++ b/pkgs/games/openspades/default.nix
@@ -16,7 +16,10 @@ stdenv.mkDerivation rec {
   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("
+    substituteInPlace Sources/Draw/SWMapRenderer.cpp \
+      --replace "isnan(" "std::isnan(" --replace "isinf(" "std::isinf("
+    sed '1i#include <cmath>' -i Sources/Client/{Player,Client_Input,Corpse}.cpp \
+      -i Sources/Draw/SWMapRenderer.cpp
   '';
 
   nativeBuildInputs =