diff --git a/pkgs/games/exult/builder.sh b/pkgs/games/exult/builder.sh deleted file mode 100644 index b13e8c6d2348..000000000000 --- a/pkgs/games/exult/builder.sh +++ /dev/null @@ -1,10 +0,0 @@ -source $stdenv/setup - -postInstall() { - ensureDir $out/share/exult/music - for i in $musicFiles; do - unzip -o -d $out/share/exult/music $i - done -} - -genericBuild \ No newline at end of file diff --git a/pkgs/games/exult/default.nix b/pkgs/games/exult/default.nix index e6a25f6a163d..4d7126014359 100644 --- a/pkgs/games/exult/default.nix +++ b/pkgs/games/exult/default.nix @@ -1,8 +1,24 @@ {stdenv, fetchurl, SDL, SDL_mixer, zlib, libpng, unzip}: +let + + # Digital recordings of the music on an original Roland MT-32. So + # we don't need actual MIDI playback capability. + musicFiles = + [ (fetchurl { + url = mirror://sourceforge/exult/U7MusicOGG_1of2.zip; + md5 = "7746d1a9164fd67509107797496553bf"; + }) + (fetchurl { + url = mirror://sourceforge/exult/U7MusicOGG_2of2.zip; + md5 = "cdae5956d7c52f35e90317913a660123"; + }) + ]; + +in + stdenv.mkDerivation { name = "exult-1.2"; - builder = ./builder.sh; src = fetchurl { url = mirror://sourceforge/exult/exult-1.2.tar.gz; @@ -23,22 +39,18 @@ stdenv.mkDerivation { buildInputs = [SDL SDL_mixer zlib libpng unzip]; NIX_CFLAGS_COMPILE = "-I${SDL_mixer}/include/SDL"; - - # Digital recordings of the music on an original Roland MT-32. So - # we don't need actual MIDI playback capability. - musicFiles = [ - (fetchurl { - url = mirror://sourceforge/exult/U7MusicOGG_1of2.zip; - md5 = "7746d1a9164fd67509107797496553bf"; - }) - (fetchurl { - url = mirror://sourceforge/exult/U7MusicOGG_2of2.zip; - md5 = "cdae5956d7c52f35e90317913a660123"; - }) - ]; + postInstall = + '' + ensureDir $out/share/exult/music + for i in $musicFiles; do + unzip -o -d $out/share/exult/music $i + done + ''; + meta = { homepage = http://exult.sourceforge.net/; description = "A reimplementation of the Ultima VII game engine"; + maintainers = [stdenv.lib.maintainers.eelco]; }; }