From ad8041c08ca8f7498ad2fa363a1e4c43e207c483 Mon Sep 17 00:00:00 2001 From: Sally Gordon <111138303+SallyGordon@users.noreply.github.com> Date: Sun, 21 Aug 2022 08:31:45 +0800 Subject: [PATCH] cataclysm-dda-git: 2021-07-03 -> 2022-08-20 (#187209) Co-authored-by: Have a good time --- pkgs/games/cataclysm-dda/git.nix | 13 ++++++++----- pkgs/games/cataclysm-dda/locale-path-git.patch | 18 ++++++++++++++++++ 2 files changed, 26 insertions(+), 5 deletions(-) create mode 100644 pkgs/games/cataclysm-dda/locale-path-git.patch diff --git a/pkgs/games/cataclysm-dda/git.nix b/pkgs/games/cataclysm-dda/git.nix index 9578480b794..21a7c66dbba 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 00000000000..03f103a548f --- /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; + }