about summary refs log tree commit diff
path: root/pkgs/games/openspades
diff options
context:
space:
mode:
Diffstat (limited to 'pkgs/games/openspades')
-rw-r--r--pkgs/games/openspades/default.nix6
-rw-r--r--pkgs/games/openspades/git.nix2
2 files changed, 1 insertions, 7 deletions
diff --git a/pkgs/games/openspades/default.nix b/pkgs/games/openspades/default.nix
index 143fa21ce2e5..2203bb6337eb 100644
--- a/pkgs/games/openspades/default.nix
+++ b/pkgs/games/openspades/default.nix
@@ -16,11 +16,7 @@ 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("
-    sed '1i#include <cmath>' -i Sources/Client/{Player,Client_Input,Corpse}.cpp \
-      -i Sources/Draw/SWMapRenderer.cpp
-    sed '1i#include <math.h>' -i Sources/Draw/SWFeatureLevel.h
+    substituteInPlace Sources/Draw/SWMapRenderer.cpp --replace "isnan(" "std::isnan(" --replace "isinf(" "std::isinf("
   '';
 
   nativeBuildInputs = 
diff --git a/pkgs/games/openspades/git.nix b/pkgs/games/openspades/git.nix
index 7d76573f7345..8212f160cda8 100644
--- a/pkgs/games/openspades/git.nix
+++ b/pkgs/games/openspades/git.nix
@@ -14,8 +14,6 @@ stdenv.mkDerivation rec {
     sha256 = "0vyvmgim03q8pcmfa1i0njr4w1lpjq5g3b47f67v9b5c5jcjycwn";
   };
 
-  postPatch = "sed '1i#include <cmath>' -i Sources/Client/{,Client}Player.cpp";
-
   nativeBuildInputs = 
     with stdenv.lib;
     [ cmake curl glew makeWrapper mesa SDL2 SDL2_image unzip wget zlib ]