openraPackages_2019: fix build All mods and engines were failing to build due to path issues after package name changes.

mdarocha d5a64ffb 12904347

+8 -8
+2 -2
pkgs/games/openra_2019/common.nix
··· 27 27 sed -i 's|locations=.*|locations=${lua}/lib|' ${dir}/thirdparty/configure-native-deps.sh 28 28 ''; 29 29 30 - wrapLaunchGame = openraSuffix: '' 30 + wrapLaunchGame = openraSuffix: binaryName: '' 31 31 # Setting TERM=xterm fixes an issue with terminfo in mono: System.Exception: Magic number is wrong: 542 32 32 # https://github.com/mono/mono/issues/6752#issuecomment-365212655 33 33 wrapProgram $out/lib/openra${openraSuffix}/launch-game.sh \ ··· 35 35 --prefix LD_LIBRARY_PATH : "${rpath}" \ 36 36 --set TERM xterm 37 37 38 - makeWrapper $out/lib/openra${openraSuffix}/launch-game.sh $(mkdirp $out/bin)/openra${openraSuffix} \ 38 + makeWrapper $out/lib/openra${openraSuffix}/launch-game.sh $(mkdirp $out/bin)/${binaryName} \ 39 39 --chdir "$out/lib/openra${openraSuffix}" 40 40 ''; 41 41
+1 -1
pkgs/games/openra_2019/engine.nix
··· 46 46 ]; 47 47 48 48 postInstall = '' 49 - ${wrapLaunchGame ""} 49 + ${wrapLaunchGame "" "openra"} 50 50 51 51 ${concatStrings (map (mod: '' 52 52 makeWrapper $out/bin/openra $out/bin/openra-${mod} --add-flags Game.Mod=${mod}
+2 -2
pkgs/games/openra_2019/mod-launch-game.sh
··· 8 8 exit 1 9 9 } 10 10 11 - cd "@out@/lib/openra-@name@" 11 + pushd "@out@/lib/openra_2019-@name@" > /dev/null 12 12 13 13 # Check for missing assets 14 14 assetsError='@assetsError@' ··· 17 17 fi 18 18 19 19 # Run the game 20 - mono --debug OpenRA.Game.exe Game.Mod=@name@ Engine.LaunchPath="@out@/bin/openra-@name@" Engine.ModSearchPaths="@out@/lib/openra-@name@/mods" "$@" 20 + mono --debug OpenRA.Game.exe Game.Mod=@name@ Engine.LaunchPath="@out@/bin/openra-@name@" Engine.ModSearchPaths="@out@/lib/openra_2019-@name@/mods" "$@" 21 21 22 22 # Show a crash dialog if something went wrong 23 23 if (( $? != 0 && $? != 1 )); then
+3 -3
pkgs/games/openra_2019/mod.nix
··· 70 70 cp -r ${engineSourceName}/mods/{${concatStringsSep "," ([ "common" "modcontent" ] ++ engine.mods)}} mods/* \ 71 71 $out/lib/${pname}/mods/ 72 72 73 - substitute ${./mod-launch-game.sh} $out/lib/${pname}/launch-game.sh \ 73 + substitute ${./mod-launch-game.sh} $out/lib/openra_2019-${mod.name}/launch-game.sh \ 74 74 --subst-var out \ 75 75 --subst-var-by name ${escapeShellArg mod.name} \ 76 76 --subst-var-by title ${escapeShellArg mod.title} \ 77 77 --subst-var-by assetsError ${escapeShellArg mod.assetsError} 78 - chmod +x $out/lib/${pname}/launch-game.sh 78 + chmod +x $out/lib/openra_2019-${mod.name}/launch-game.sh 79 79 80 - ${wrapLaunchGame "-${mod.name}"} 80 + ${wrapLaunchGame "_2019-${mod.name}" "openra-${mod.name}"} 81 81 82 82 substitute ${./openra-mod.desktop} $(mkdirp $out/share/applications)/${pname}.desktop \ 83 83 --subst-var-by name ${escapeShellArg mod.name} \