Skip to content

Commit

Permalink
pkgs(games/wine/celeste): improve mods installer logic
Browse files Browse the repository at this point in the history
  • Loading branch information
mrtnvgr committed Nov 9, 2023
1 parent 5682d6e commit 0a13e25
Showing 1 changed file with 11 additions and 3 deletions.
14 changes: 11 additions & 3 deletions pkgs/games/wine/celeste/default.nix
Original file line number Diff line number Diff line change
Expand Up @@ -12,13 +12,13 @@ let
hash = "sha256-Zfz1NXg4BYJ82vLg7E/EOFOGvJBeQBu3TpiL572CB1Y=";
};

everestSetup = if everestMods != [ ] || everestSupport then ''
isEverestEnabled = if everestMods != [ ] then true else everestSupport;

everestSetup = if isEverestEnabled then ''
cp -r ${everestSrc}/* .
chmod -R +w .
wine MiniInstaller.exe
wineserver -w
${lib.concatMapStringsSep "\n" (mod: "cp -r ${mod} Mods/") everestMods}
'' else "";

pkg = wrapWine {
Expand All @@ -38,6 +38,14 @@ let
popd
'';

preScript = if isEverestEnabled then ''
# Checks if mods directory either doesn't exist or is empty
if [ -z "$(ls -A Mods)" ]; then
mkdir Mods
${lib.concatMapStringsSep "\n" (mod: "cp -r ${mod} Mods/") everestMods}
fi
'' else "";

tricks = [ "dotnet48" "dxvk" "d3dcompiler_47" ];
};
in stdenvNoCC.mkDerivation {
Expand Down

0 comments on commit 0a13e25

Please sign in to comment.