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
This commit is contained in:
Johannes Maier 2022-06-18 13:54:28 +02:00
parent 7cb6a08be1
commit bfc755d4d0

View file

@ -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