From 5f298b119a1fe11f154093d0f8c83c446aa29a7b Mon Sep 17 00:00:00 2001 From: D Anzorge Date: Sat, 3 Jul 2021 13:30:19 +0200 Subject: [PATCH 1/2] cataclysm-dda: 0.E-3 -> 0.F --- pkgs/games/cataclysm-dda/common.nix | 23 +++++++++-------------- pkgs/games/cataclysm-dda/stable.nix | 4 ++-- 2 files changed, 11 insertions(+), 16 deletions(-) diff --git a/pkgs/games/cataclysm-dda/common.nix b/pkgs/games/cataclysm-dda/common.nix index d975a60c1fd9..d91db073ff61 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 d0452090ca65..ba475ac9601d 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 // { From 27b3e0ab563a6ff2e235d45734825b63993a7139 Mon Sep 17 00:00:00 2001 From: D Anzorge Date: Sat, 3 Jul 2021 22:11:57 +0200 Subject: [PATCH 2/2] cataclysm-dda-git: 2020-12-09 -> 2021-07-03 --- pkgs/games/cataclysm-dda/git.nix | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/pkgs/games/cataclysm-dda/git.nix b/pkgs/games/cataclysm-dda/git.nix index b07689c09307..3dc0e944b5ef 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 ? "2020-12-09" -, rev ? "cb02195d9fb5ba71f35a105be4104c3d8883065c" -, sha256 ? "108cs6vp99qmqqfnmczad0xjgcl82bypm5xszwnlfcswdsrfs4da" +, version ? "2021-07-03" +, rev ? "9017808252e1e149446c8f8bd7a6582ce0f95285" +, sha256 ? "0qrvkbyg098jb9hv69sg5093b1vj8f4n75p73v01jnmyxlz3ax28" }: let