summary refs log tree commit diff
path: root/pkgs/games/cataclysm-dda
diff options
context:
space:
mode:
authorMitsuhiro Nakamura <m.nacamura@gmail.com>2018-01-26 21:42:20 +0900
committerMitsuhiro Nakamura <m.nacamura@gmail.com>2018-02-08 13:55:40 +0900
commit27ec2df59eb0d69883f696b217994157f837cd3f (patch)
treef5c413fb10b5caf1ba242a751fd4af5c8701c4ae /pkgs/games/cataclysm-dda
parent52f63106261d51170631d5d5045e00e64233a8c4 (diff)
downloadnixpkgs-27ec2df59eb0d69883f696b217994157f837cd3f.tar
nixpkgs-27ec2df59eb0d69883f696b217994157f837cd3f.tar.gz
nixpkgs-27ec2df59eb0d69883f696b217994157f837cd3f.tar.bz2
nixpkgs-27ec2df59eb0d69883f696b217994157f837cd3f.tar.lz
nixpkgs-27ec2df59eb0d69883f696b217994157f837cd3f.tar.xz
nixpkgs-27ec2df59eb0d69883f696b217994157f837cd3f.tar.zst
nixpkgs-27ec2df59eb0d69883f696b217994157f837cd3f.zip
cataclysm-dda{,-git}: clean up
- Remove cmath include (introduced by 97c484a) since the current gcc/clang
  works fine without it.
- Suppress known compiler warnings instead of removing -Werror flag.
Diffstat (limited to 'pkgs/games/cataclysm-dda')
-rw-r--r--pkgs/games/cataclysm-dda/default.nix10
-rw-r--r--pkgs/games/cataclysm-dda/git.nix5
2 files changed, 5 insertions, 10 deletions
diff --git a/pkgs/games/cataclysm-dda/default.nix b/pkgs/games/cataclysm-dda/default.nix
index be6f3265430..541b174cc6a 100644
--- a/pkgs/games/cataclysm-dda/default.nix
+++ b/pkgs/games/cataclysm-dda/default.nix
@@ -22,11 +22,6 @@ stdenv.mkDerivation rec {
 
   postPatch = ''
     patchShebangs .
-    sed -i Makefile \
-      -e 's,-Werror,,g'
-
-    sed '1i#include <cmath>' \
-      -i src/{crafting,skill,weather_data,melee,vehicle,overmap,iuse_actor}.cpp
   '';
 
   makeFlags = [
@@ -35,6 +30,11 @@ stdenv.mkDerivation rec {
   ] ++ stdenv.lib.optionals stdenv.isDarwin [
     "NATIVE=osx CLANG=1"
     "OSX_MIN=10.6"  # SDL for macOS only supports deploying on 10.6 and above
+  ] ++ stdenv.lib.optionals stdenv.cc.isGNU [
+    "WARNINGS+=-Wno-deprecated-declarations"
+    "WARNINGS+=-Wno-ignored-attributes"
+  ] ++ stdenv.lib.optionals stdenv.cc.isClang [
+    "WARNINGS+=-Wno-inconsistent-missing-override"
   ];
 
   postBuild = stdenv.lib.optionalString stdenv.isDarwin ''
diff --git a/pkgs/games/cataclysm-dda/git.nix b/pkgs/games/cataclysm-dda/git.nix
index 3d8ec7d6844..ac2c1f9fdb1 100644
--- a/pkgs/games/cataclysm-dda/git.nix
+++ b/pkgs/games/cataclysm-dda/git.nix
@@ -21,11 +21,6 @@ stdenv.mkDerivation rec {
 
   postPatch = ''
     patchShebangs .
-    sed -i Makefile \
-      -e 's,-Werror,,g'
-
-    sed '1i#include <cmath>' \
-      -i src/{crafting,skill,weather_data,melee,vehicle,overmap,iuse_actor}.cpp
   '';
 
   makeFlags = [