summary refs log tree commit diff
path: root/pkgs/games/cataclysm-dda/common.nix
diff options
context:
space:
mode:
authorMitsuhiro Nakamura <m.nacamura@gmail.com>2020-04-08 10:54:28 +0900
committerMitsuhiro Nakamura <m.nacamura@gmail.com>2020-07-18 14:21:12 +0900
commitbf71f12cb5e9868d8427160d0680fde48c2316c2 (patch)
tree4520ff68aa171fbad2bcf26b0ea62efa1e774592 /pkgs/games/cataclysm-dda/common.nix
parentd6863de058d61a35bef6d6c9221171ed040fc075 (diff)
downloadnixpkgs-bf71f12cb5e9868d8427160d0680fde48c2316c2.tar
nixpkgs-bf71f12cb5e9868d8427160d0680fde48c2316c2.tar.gz
nixpkgs-bf71f12cb5e9868d8427160d0680fde48c2316c2.tar.bz2
nixpkgs-bf71f12cb5e9868d8427160d0680fde48c2316c2.tar.lz
nixpkgs-bf71f12cb5e9868d8427160d0680fde48c2316c2.tar.xz
nixpkgs-bf71f12cb5e9868d8427160d0680fde48c2316c2.tar.zst
nixpkgs-bf71f12cb5e9868d8427160d0680fde48c2316c2.zip
cataclysm-dda{,-git}: apply locale patch dynamically
Each time src/translations.cpp is modified, we have to update the locale
patch. Using sed to patch dynamically should be handy.
Diffstat (limited to 'pkgs/games/cataclysm-dda/common.nix')
-rw-r--r--pkgs/games/cataclysm-dda/common.nix5
1 files changed, 5 insertions, 0 deletions
diff --git a/pkgs/games/cataclysm-dda/common.nix b/pkgs/games/cataclysm-dda/common.nix
index bf071d62c67..48941bdb01f 100644
--- a/pkgs/games/cataclysm-dda/common.nix
+++ b/pkgs/games/cataclysm-dda/common.nix
@@ -21,6 +21,11 @@ let
 
     postPatch = ''
       patchShebangs .
+
+      # Locale patch required for Darwin builds, see:
+      # https://github.com/NixOS/nixpkgs/pull/74064#issuecomment-560083970
+      sed -i src/translations.cpp \
+          -e 's@#elif (defined(__linux__) || (defined(MACOSX) && !defined(TILES)))@#elif 1@'
     '';
 
     makeFlags = [