about summary refs log tree commit diff
path: root/pkgs/games/cataclysm-dda
diff options
context:
space:
mode:
authorSally Gordon <111138303+SallyGordon@users.noreply.github.com>2022-08-21 08:31:45 +0800
committerGitHub <noreply@github.com>2022-08-21 02:31:45 +0200
commitad8041c08ca8f7498ad2fa363a1e4c43e207c483 (patch)
tree6215c29902d93b21c5c962bff7700a71cfd9244f /pkgs/games/cataclysm-dda
parente66d779751e9ea4bc65ab0721bdad4fe1451229b (diff)
cataclysm-dda-git: 2021-07-03 -> 2022-08-20 (#187209)
Co-authored-by: Have a good time <i@niconiconi.xyz>
Diffstat (limited to 'pkgs/games/cataclysm-dda')
-rw-r--r--pkgs/games/cataclysm-dda/git.nix13
-rw-r--r--pkgs/games/cataclysm-dda/locale-path-git.patch18
2 files changed, 26 insertions, 5 deletions
diff --git a/pkgs/games/cataclysm-dda/git.nix b/pkgs/games/cataclysm-dda/git.nix
index 9578480b79401..21a7c66dbbacb 100644
--- a/pkgs/games/cataclysm-dda/git.nix
+++ b/pkgs/games/cataclysm-dda/git.nix
@@ -2,9 +2,9 @@
 , tiles ? true, Cocoa
 , debug ? false
 , useXdgDir ? false
-, version ? "2021-07-03"
-, rev ? "9017808252e1e149446c8f8bd7a6582ce0f95285"
-, sha256 ? "0qrvkbyg098jb9hv69sg5093b1vj8f4n75p73v01jnmyxlz3ax28"
+, version ? "2022-08-20"
+, rev ? "f65b2bc4c6dea24bd9a993b8df146e5698e7e36f"
+, sha256 ? "sha256-00Tp9OmsM39PYwAJXKKRS9zmn7KsGQ9s1eVmEqghkpw="
 }:
 
 let
@@ -22,6 +22,11 @@ let
       inherit rev sha256;
     };
 
+    patches = [
+      # Unconditionally look for translation files in $out/share/locale
+      ./locale-path-git.patch
+    ];
+
     makeFlags = common.makeFlags ++ [
       "VERSION=git-${version}-${lib.substring 0 8 src.rev}"
     ];
@@ -29,8 +34,6 @@ let
     meta = common.meta // {
       maintainers = with lib.maintainers;
       common.meta.maintainers ++ [ rardiol ];
-      # /nix/store/s8xaq3x7mcysvd752in2nihb1nr6svsl-SDL2-2.0.20-dev/include/SDL2/SDL_events.h:645:65: error: use of old-style cast [-Werror,-Wold-style-cast]
-      broken = (stdenv.isDarwin && stdenv.isx86_64);
     };
   });
 in
diff --git a/pkgs/games/cataclysm-dda/locale-path-git.patch b/pkgs/games/cataclysm-dda/locale-path-git.patch
new file mode 100644
index 0000000000000..03f103a548fdd
--- /dev/null
+++ b/pkgs/games/cataclysm-dda/locale-path-git.patch
@@ -0,0 +1,18 @@
+diff --git a/src/translations.cpp b/src/translations.cpp
+index 76bdfd0..6dd6109 100644
+--- a/src/translations.cpp
++++ b/src/translations.cpp
+@@ -61,13 +61,11 @@ std::string locale_dir()
+ #define BSD
+ #endif
+ 
+-#if !defined(__ANDROID__) && ((defined(__linux__) || defined(BSD) || (defined(MACOSX) && !defined(TILES))))
+     if( !PATH_INFO::base_path().empty() ) {
+         loc_dir = PATH_INFO::base_path() + "share/locale";
+     } else {
+         loc_dir = PATH_INFO::langdir();
+     }
+-#endif
+ #endif // LOCALIZE
+     return loc_dir;
+ }