diff options
author | mdarocha <git@mdarocha.pl> | 2023-06-15 17:01:52 +0200 |
---|---|---|
committer | mdarocha <git@mdarocha.pl> | 2023-06-15 17:41:07 +0200 |
commit | d5a64ffb1e04c96d69675919849f74cbd11f4eae (patch) | |
tree | 09ba7c5964b535f2b64bc1b054740cdbe1f73a57 /pkgs/games/openra_2019 | |
parent | 12904347a786db684603f978642e9cceba8d1166 (diff) |
openraPackages_2019: fix build
All mods and engines were failing to build due to path issues after package name changes.
Diffstat (limited to 'pkgs/games/openra_2019')
-rw-r--r-- | pkgs/games/openra_2019/common.nix | 4 | ||||
-rw-r--r-- | pkgs/games/openra_2019/engine.nix | 2 | ||||
-rw-r--r-- | pkgs/games/openra_2019/mod-launch-game.sh | 4 | ||||
-rw-r--r-- | pkgs/games/openra_2019/mod.nix | 6 |
4 files changed, 8 insertions, 8 deletions
diff --git a/pkgs/games/openra_2019/common.nix b/pkgs/games/openra_2019/common.nix index d9cc93e823484..338215616196e 100644 --- a/pkgs/games/openra_2019/common.nix +++ b/pkgs/games/openra_2019/common.nix @@ -27,7 +27,7 @@ in { sed -i 's|locations=.*|locations=${lua}/lib|' ${dir}/thirdparty/configure-native-deps.sh ''; - wrapLaunchGame = openraSuffix: '' + wrapLaunchGame = openraSuffix: binaryName: '' # Setting TERM=xterm fixes an issue with terminfo in mono: System.Exception: Magic number is wrong: 542 # https://github.com/mono/mono/issues/6752#issuecomment-365212655 wrapProgram $out/lib/openra${openraSuffix}/launch-game.sh \ @@ -35,7 +35,7 @@ in { --prefix LD_LIBRARY_PATH : "${rpath}" \ --set TERM xterm - makeWrapper $out/lib/openra${openraSuffix}/launch-game.sh $(mkdirp $out/bin)/openra${openraSuffix} \ + makeWrapper $out/lib/openra${openraSuffix}/launch-game.sh $(mkdirp $out/bin)/${binaryName} \ --chdir "$out/lib/openra${openraSuffix}" ''; diff --git a/pkgs/games/openra_2019/engine.nix b/pkgs/games/openra_2019/engine.nix index d6acf10cfc697..f3f3b9c073c57 100644 --- a/pkgs/games/openra_2019/engine.nix +++ b/pkgs/games/openra_2019/engine.nix @@ -46,7 +46,7 @@ stdenv.mkDerivation (recursiveUpdate packageAttrs rec { ]; postInstall = '' - ${wrapLaunchGame ""} + ${wrapLaunchGame "" "openra"} ${concatStrings (map (mod: '' makeWrapper $out/bin/openra $out/bin/openra-${mod} --add-flags Game.Mod=${mod} diff --git a/pkgs/games/openra_2019/mod-launch-game.sh b/pkgs/games/openra_2019/mod-launch-game.sh index 88b53e71e1bc4..16fb14c24d656 100644 --- a/pkgs/games/openra_2019/mod-launch-game.sh +++ b/pkgs/games/openra_2019/mod-launch-game.sh @@ -8,7 +8,7 @@ show_error() { exit 1 } -cd "@out@/lib/openra-@name@" +pushd "@out@/lib/openra_2019-@name@" > /dev/null # Check for missing assets assetsError='@assetsError@' @@ -17,7 +17,7 @@ if [[ -n "$assetsError" && ! -d "$HOME/.openra/Content/@name@" ]]; then fi # Run the game -mono --debug OpenRA.Game.exe Game.Mod=@name@ Engine.LaunchPath="@out@/bin/openra-@name@" Engine.ModSearchPaths="@out@/lib/openra-@name@/mods" "$@" +mono --debug OpenRA.Game.exe Game.Mod=@name@ Engine.LaunchPath="@out@/bin/openra-@name@" Engine.ModSearchPaths="@out@/lib/openra_2019-@name@/mods" "$@" # Show a crash dialog if something went wrong if (( $? != 0 && $? != 1 )); then diff --git a/pkgs/games/openra_2019/mod.nix b/pkgs/games/openra_2019/mod.nix index 9d69b79bdeb4b..c57726580741e 100644 --- a/pkgs/games/openra_2019/mod.nix +++ b/pkgs/games/openra_2019/mod.nix @@ -70,14 +70,14 @@ in stdenv.mkDerivation (recursiveUpdate packageAttrs rec { cp -r ${engineSourceName}/mods/{${concatStringsSep "," ([ "common" "modcontent" ] ++ engine.mods)}} mods/* \ $out/lib/${pname}/mods/ - substitute ${./mod-launch-game.sh} $out/lib/${pname}/launch-game.sh \ + substitute ${./mod-launch-game.sh} $out/lib/openra_2019-${mod.name}/launch-game.sh \ --subst-var out \ --subst-var-by name ${escapeShellArg mod.name} \ --subst-var-by title ${escapeShellArg mod.title} \ --subst-var-by assetsError ${escapeShellArg mod.assetsError} - chmod +x $out/lib/${pname}/launch-game.sh + chmod +x $out/lib/openra_2019-${mod.name}/launch-game.sh - ${wrapLaunchGame "-${mod.name}"} + ${wrapLaunchGame "_2019-${mod.name}" "openra-${mod.name}"} substitute ${./openra-mod.desktop} $(mkdirp $out/share/applications)/${pname}.desktop \ --subst-var-by name ${escapeShellArg mod.name} \ |