umoria: fix savegame handling

It was impossible to continue a saved character before, as the
`cleanup` function would remove the whole temporary RUNDIR, including
the actual save file.

umoria allows passing a custom save file location, which now points to
the already-used data directory ~/.umoria.

Fixes #178136
main
Johannes Maier 2 years ago
parent 7cb6a08be1
commit bfc755d4d0
  1. 4
      pkgs/games/umoria/default.nix

@ -8,7 +8,7 @@
}:
let
savesDir = "~/.umoria/";
savesDir = "~/.umoria";
in
gcc9Stdenv.mkDerivation rec {
pname = "umoria";
@ -55,7 +55,7 @@ gcc9Stdenv.mkDerivation rec {
[[ ! -f ${savesDir}/scores.dat ]] && touch ${savesDir}/scores.dat
ln -s ${savesDir}/scores.dat scores.dat
$out/.umoria-unwrapped
$out/.umoria-unwrapped ${savesDir}/game.sav
EOF
chmod +x $out/bin/umoria

Loading…
Cancel
Save