diff options
author | github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com> | 2022-06-25 12:01:16 +0000 |
---|---|---|
committer | GitHub <noreply@github.com> | 2022-06-25 12:01:16 +0000 |
commit | 62b079eb5d88d3b700e2d8b29725611c1ed89be8 (patch) | |
tree | d3d39f4199f06ac9d4cfce7c0c9f7516537008b8 /pkgs/games | |
parent | ae24e28a9860a9d1ad2d599ea287b5ba6e2812a3 (diff) | |
parent | 41c91c48eee8801b91eb6c18ef763b11dc059047 (diff) |
Merge master into staging-next
Diffstat (limited to 'pkgs/games')
-rw-r--r-- | pkgs/games/umoria/default.nix | 24 |
1 files changed, 11 insertions, 13 deletions
diff --git a/pkgs/games/umoria/default.nix b/pkgs/games/umoria/default.nix index 1114d47b7be56..13ec037afba78 100644 --- a/pkgs/games/umoria/default.nix +++ b/pkgs/games/umoria/default.nix @@ -8,7 +8,7 @@ }: let - savesDir = "~/.umoria/"; + savesDir = "~/.umoria"; in gcc9Stdenv.mkDerivation rec { pname = "umoria"; @@ -38,24 +38,22 @@ gcc9Stdenv.mkDerivation rec { RUNDIR=\$(mktemp -d) - cleanup() { - rm -rf \$RUNDIR - } - - trap cleanup EXIT + # Print the directory, so users have access to dumps, and let the system + # take care of cleaning up temp files. + echo "Running umoria in \$RUNDIR" cd \$RUNDIR - mkdir data - - for i in $out/data/*; do - ln -s \$i "data/\$(basename \$i)" - done + ln -sn $out/data \$RUNDIR/data mkdir -p ${savesDir} [[ ! -f ${savesDir}/scores.dat ]] && touch ${savesDir}/scores.dat ln -s ${savesDir}/scores.dat scores.dat - $out/.umoria-unwrapped + if [ \$# -eq 0 ]; then + $out/.umoria-unwrapped ${savesDir}/game.sav + else + $out/.umoria-unwrapped "\$@" + fi EOF chmod +x $out/bin/umoria @@ -74,7 +72,7 @@ gcc9Stdenv.mkDerivation rec { ''; platforms = platforms.unix; badPlatforms = [ "aarch64-darwin" ]; - maintainers = [ maintainers.aciceri ]; + maintainers = with maintainers; [ aciceri kenran ]; license = licenses.gpl3Plus; }; } |