summary refs log tree commit diff
path: root/pkgs/games/cataclysm-dda
diff options
context:
space:
mode:
authorJoachim Fasting <joachifm@fastmail.fm>2016-03-23 01:05:50 +0100
committerJoachim Fasting <joachifm@fastmail.fm>2016-03-23 01:44:02 +0100
commit18b35bd7417368cebacefea4a10c920a8e5516c4 (patch)
tree7b8f58a9fbf05fc3b50e0cdb256bf88833bb866a /pkgs/games/cataclysm-dda
parentb81400e9602b30d0ee6debfc4fb0b861a704c3a4 (diff)
downloadnixpkgs-18b35bd7417368cebacefea4a10c920a8e5516c4.tar
nixpkgs-18b35bd7417368cebacefea4a10c920a8e5516c4.tar.gz
nixpkgs-18b35bd7417368cebacefea4a10c920a8e5516c4.tar.bz2
nixpkgs-18b35bd7417368cebacefea4a10c920a8e5516c4.tar.lz
nixpkgs-18b35bd7417368cebacefea4a10c920a8e5516c4.tar.xz
nixpkgs-18b35bd7417368cebacefea4a10c920a8e5516c4.tar.zst
nixpkgs-18b35bd7417368cebacefea4a10c920a8e5516c4.zip
cataclysm-dda: build recipe enhancements & gcc5 support
- Remove redundant platform check; meta.platforms is sufficient
- Use postPatch rather than override patchPhase entirely
- Strip -Werror
- Move build-time only dependencies to nativeBuildInputs

This also fixes gcc5 build, which fails due to a deprecated-declarations
warning (see https://hydra.nixos.org/build/33117020/nixlog/2/raw).
Diffstat (limited to 'pkgs/games/cataclysm-dda')
-rw-r--r--pkgs/games/cataclysm-dda/default.nix22
1 files changed, 8 insertions, 14 deletions
diff --git a/pkgs/games/cataclysm-dda/default.nix b/pkgs/games/cataclysm-dda/default.nix
index ed4aed35e11..3956c994531 100644
--- a/pkgs/games/cataclysm-dda/default.nix
+++ b/pkgs/games/cataclysm-dda/default.nix
@@ -1,15 +1,7 @@
 { fetchFromGitHub, stdenv, makeWrapper, pkgconfig, ncurses, lua, SDL2, SDL2_image, SDL2_ttf,
 SDL2_mixer, freetype, gettext }:
 
-let architecture =
-      if stdenv.system == "i686-linux" then
-        "linux32"
-      else if stdenv.system == "x86_64-linux" then
-        "linux64"
-      else
-        abort "currently only linux 32-bit and 64-bit are supported";
-
-in stdenv.mkDerivation rec {
+stdenv.mkDerivation rec {
   version = "0.C";
   name = "cataclysm-dda-${version}";
 
@@ -20,13 +12,15 @@ in stdenv.mkDerivation rec {
     sha256 = "03sdzsk4qdq99qckq0axbsvg1apn6xizscd8pwp5w6kq2fyj5xkv";
   };
 
-  buildInputs = [ makeWrapper pkgconfig ncurses lua SDL2 SDL2_image SDL2_ttf SDL2_mixer freetype gettext ];
+  nativeBuildInputs = [ makeWrapper pkgconfig ];
+
+  buildInputs = [ ncurses lua SDL2 SDL2_image SDL2_ttf SDL2_mixer freetype gettext ];
 
-  patchPhase = ''
+  postPatch = ''
     patchShebangs .
-    substituteAllInPlace lang/compile_mo.sh \
-      --replace msgfmt ${gettext}/msgfmt
-    sed -i -e 's|DATA_PREFIX=$(PREFIX)/share/cataclysm-dda/|DATA_PREFIX=$(PREFIX)/share/|g' Makefile
+    sed -i Makefile \
+      -e 's,-Werror,,g' \
+      -e 's,\(DATA_PREFIX=$(PREFIX)/share/\)cataclysm-dda/,\1,g'
   '';
 
   makeFlags = "PREFIX=$(out) LUA=1 TILES=1 SOUND=1 RELEASE=1 USE_HOME_DIR=1";