summary refs log tree commit diff
path: root/pkgs/games
diff options
context:
space:
mode:
authorD Anzorge <d.anzorge@gmail.com>2021-07-03 13:30:19 +0200
committerD Anzorge <d.anzorge@gmail.com>2021-07-04 18:50:58 +0200
commit5f298b119a1fe11f154093d0f8c83c446aa29a7b (patch)
tree6cbd8ff3ecaf735835c8ee6f6335fb498fcba6dc /pkgs/games
parentd364e06e4ba7fe1557d2a672af9d52d992838f23 (diff)
downloadnixpkgs-5f298b119a1fe11f154093d0f8c83c446aa29a7b.tar
nixpkgs-5f298b119a1fe11f154093d0f8c83c446aa29a7b.tar.gz
nixpkgs-5f298b119a1fe11f154093d0f8c83c446aa29a7b.tar.bz2
nixpkgs-5f298b119a1fe11f154093d0f8c83c446aa29a7b.tar.lz
nixpkgs-5f298b119a1fe11f154093d0f8c83c446aa29a7b.tar.xz
nixpkgs-5f298b119a1fe11f154093d0f8c83c446aa29a7b.tar.zst
nixpkgs-5f298b119a1fe11f154093d0f8c83c446aa29a7b.zip
cataclysm-dda: 0.E-3 -> 0.F
Diffstat (limited to 'pkgs/games')
-rw-r--r--pkgs/games/cataclysm-dda/common.nix23
-rw-r--r--pkgs/games/cataclysm-dda/stable.nix4
2 files changed, 11 insertions, 16 deletions
diff --git a/pkgs/games/cataclysm-dda/common.nix b/pkgs/games/cataclysm-dda/common.nix
index d975a60c1fd..d91db073ff6 100644
--- a/pkgs/games/cataclysm-dda/common.nix
+++ b/pkgs/games/cataclysm-dda/common.nix
@@ -13,17 +13,15 @@ let
   tilesDeps = [ SDL2 SDL2_image SDL2_mixer SDL2_ttf freetype ]
     ++ optionals stdenv.isDarwin [ Cocoa ];
 
-  installXDGAppLauncher = ''
-    launcher="$out/share/applications/cataclysm-dda.desktop"
-    install -D -m 444 data/xdg/*cataclysm-dda.desktop -T "$launcher"
-    sed -i "$launcher" -e "s,\(Exec=\)\(cataclysm-tiles\),\1$out/bin/\2,"
-    install -D -m 444 data/xdg/cataclysm-dda.svg -t $out/share/icons/hicolor/scalable/apps
+  patchDesktopFile = ''
+    substituteInPlace $out/share/applications/org.cataclysmdda.CataclysmDDA.desktop \
+      --replace "Exec=cataclysm-tiles" "Exec=$out/bin/cataclysm-tiles"
   '';
 
   installMacOSAppLauncher = ''
     app=$out/Applications/Cataclysm.app
-    install -D -m 444 data/osx/Info.plist -t $app/Contents
-    install -D -m 444 data/osx/AppIcon.icns -t $app/Contents/Resources
+    install -D -m 444 build-data/osx/Info.plist -t $app/Contents
+    install -D -m 444 build-data/osx/AppIcon.icns -t $app/Contents/Resources
     mkdir $app/Contents/MacOS
     launcher=$app/Contents/MacOS/Cataclysm.sh
     cat << EOF > $launcher
@@ -58,22 +56,19 @@ stdenv.mkDerivation {
   ] ++ optionals tiles [
     "TILES=1" "SOUND=1"
   ] ++ optionals stdenv.isDarwin [
-    "NATIVE=osx" "CLANG=1"
+    "NATIVE=osx"
+    "CLANG=1"
+    "OSX_MIN=${stdenv.targetPlatform.darwinMinVersion}"
   ];
 
   postInstall = optionalString tiles
   ( if !stdenv.isDarwin
-    then installXDGAppLauncher
+    then patchDesktopFile
     else installMacOSAppLauncher
   );
 
   dontStrip = debug;
 
-  # https://hydra.nixos.org/build/65193254
-  # src/weather_data.cpp:203:1: fatal error: opening dependency file obj/tiles/weather_data.d: No such file or directory
-  # make: *** [Makefile:687: obj/tiles/weather_data.o] Error 1
-  enableParallelBuilding = false;
-
   passthru = {
     isTiles = tiles;
     isCurses = !tiles;
diff --git a/pkgs/games/cataclysm-dda/stable.nix b/pkgs/games/cataclysm-dda/stable.nix
index d0452090ca6..ba475ac9601 100644
--- a/pkgs/games/cataclysm-dda/stable.nix
+++ b/pkgs/games/cataclysm-dda/stable.nix
@@ -10,13 +10,13 @@ let
   };
 
   self = common.overrideAttrs (common: rec {
-    version = "0.E-3";
+    version = "0.F";
 
     src = fetchFromGitHub {
       owner = "CleverRaven";
       repo = "Cataclysm-DDA";
       rev = version;
-      sha256 = "qhHtsm5cM0ct/7qXev0SiLInO2jqs2odxhWndLfRDIE=";
+      sha256 = "1jid8lcl04y768b3psj1ifhx96lmd6fn1j2wzxhl4ic7ra66p2z3";
     };
 
     meta = common.meta // {