11 savesDir = "~/.umoria";
13 gcc9Stdenv.mkDerivation rec {
17 src = fetchFromGitHub {
18 owner = "dungeons-of-moria";
21 sha256 = "sha256-1j4QkE33UcTzM06qAjk1/PyK5uNA7E/kyDe3bZcFKUM=";
24 nativeBuildInputs = [ cmake ];
25 buildInputs = [ ncurses6 ];
26 enableParallelBuilding = true;
31 mkdir -p $out/data $out/bin
32 cp -r umoria/data/* $out/data
33 cp umoria/umoria $out/.umoria-unwrapped
36 cat <<EOF >$out/bin/umoria
41 # Print the directory, so users have access to dumps, and let the system
42 # take care of cleaning up temp files.
43 echo "Running umoria in \$RUNDIR"
46 ln -sn $out/data \$RUNDIR/data
49 [[ ! -f ${savesDir}/scores.dat ]] && touch ${savesDir}/scores.dat
50 ln -s ${savesDir}/scores.dat scores.dat
52 if [ \$# -eq 0 ]; then
53 $out/.umoria-unwrapped ${savesDir}/game.sav
55 $out/.umoria-unwrapped "\$@"
59 chmod +x $out/bin/umoria
65 homepage = "https://umoria.org/";
66 description = "The Dungeons of Moria - the original roguelike";
68 The Dungeons of Moria is a single player dungeon simulation originally written
69 by Robert Alan Koeneke, with its first public release in 1983.
70 The game was originally developed using VMS Pascal before being ported to the C
71 language by James E. Wilson in 1988, and released a Umoria.
73 platforms = platforms.unix;
74 badPlatforms = [ "aarch64-darwin" ];
75 maintainers = with maintainers; [ aciceri kenran ];
76 license = licenses.gpl3Plus;