Skip to content
Permalink

Comparing changes

Choose two branches to see what’s changed or to start a new pull request. If you need to, you can also or learn more about diff comparisons.

Open a pull request

Create a new pull request by comparing changes across two branches. If you need to, you can also . Learn more about diff comparisons here.
base repository: NixOS/nixpkgs
Failed to load repositories. Confirm that selected base ref is valid, then try again.
Loading
base: b0631dc3de7a
Choose a base ref
...
head repository: NixOS/nixpkgs
Failed to load repositories. Confirm that selected head ref is valid, then try again.
Loading
compare: 55dcf622ecde
Choose a head ref
  • 2 commits
  • 2 files changed
  • 2 contributors

Commits on Apr 4, 2020

  1. cataclysm-dda: 0.D -> 0.E

    catern committed Apr 4, 2020

    Verified

    This commit was signed with the committer’s verified signature.
    jtojnar Jan Tojnar
    Copy the full SHA
    4cfc499 View commit details

Commits on Apr 20, 2020

  1. Merge pull request #84261 from catern/cdda

    cataclysm-dda: 0.D -> 0.E
    worldofpeace authored Apr 20, 2020
    Copy the full SHA
    55dcf62 View commit details
Showing with 8 additions and 22 deletions.
  1. +3 −15 pkgs/games/cataclysm-dda/default.nix
  2. +5 −7 pkgs/games/cataclysm-dda/patches/fix_locale_dir.patch
18 changes: 3 additions & 15 deletions pkgs/games/cataclysm-dda/default.nix
Original file line number Diff line number Diff line change
@@ -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 ];
};
12 changes: 5 additions & 7 deletions pkgs/games/cataclysm-dda/patches/fix_locale_dir.patch
Original file line number Diff line number Diff line change
@@ -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";
}