diff --git a/pkgs/games/cataclysm-dda/default.nix b/pkgs/games/cataclysm-dda/default.nix index ced19bffb31a..ad1a9c409d57 100644 --- a/pkgs/games/cataclysm-dda/default.nix +++ b/pkgs/games/cataclysm-dda/default.nix @@ -1,4 +1,4 @@ -{ stdenv, callPackage, lua, CoreFoundation +{ stdenv, callPackage, CoreFoundation , tiles ? true, Cocoa , debug ? false }: @@ -9,28 +9,16 @@ let in stdenv.mkDerivation (common // rec { - version = "0.D"; + version = "0.E"; name = "cataclysm-dda-${version}"; src = fetchFromCleverRaven { rev = version; - sha256 = "00zzhx1mh1qjq668cga5nbrxp2qk6b82j5ak65skhgnlr6ii4ysc"; + sha256 = "0pbi0fw37zimzdklfj58s1ql0wlqq7dy6idkcsib3hn910ajaxan"; }; - buildInputs = common.buildInputs ++ [ lua ]; - patches = [ ./patches/fix_locale_dir.patch ]; - postPatch = common.postPatch + '' - substituteInPlace lua/autoexec.lua --replace "/usr/share" "$out/share" - ''; - - NIX_CFLAGS_COMPILE = stdenv.lib.optionalString stdenv.cc.isGNU "-Wno-error=deprecated-copy"; - - makeFlags = common.makeFlags ++ [ - "LUA=1" - ]; - meta = with stdenv.lib.maintainers; common.meta // { maintainers = common.meta.maintainers ++ [ skeidel ]; }; diff --git a/pkgs/games/cataclysm-dda/patches/fix_locale_dir.patch b/pkgs/games/cataclysm-dda/patches/fix_locale_dir.patch index 60a3dc457453..5bfff892d2af 100644 --- a/pkgs/games/cataclysm-dda/patches/fix_locale_dir.patch +++ b/pkgs/games/cataclysm-dda/patches/fix_locale_dir.patch @@ -1,15 +1,13 @@ -diff --git a/src/translations.cpp b/src/translations.cpp -index 2585b7ec56..7bb005823c 100644 --- a/src/translations.cpp +++ b/src/translations.cpp -@@ -195,14 +195,12 @@ void set_language() +@@ -212,14 +212,12 @@ void set_language() auto env = getenv( "LANGUAGE" ); - locale_dir = std::string( FILENAMES["base_path"] + "lang/mo/" + ( env ? env : "none" ) + + locale_dir = std::string( PATH_INFO::base_path() + "lang/mo/" + ( env ? env : "none" ) + "/LC_MESSAGES/cataclysm-dda.mo" ); --#elif (defined __linux__ || (defined MACOSX && !defined TILES)) +-#elif (defined(__linux__) || (defined(MACOSX) && !defined(TILES))) +#else - if( !FILENAMES["base_path"].empty() ) { - locale_dir = FILENAMES["base_path"] + "share/locale"; + if( !PATH_INFO::base_path().empty() ) { + locale_dir = PATH_INFO::base_path() + "share/locale"; } else { locale_dir = "lang/mo"; }