From 2ad0491113bdcd321642176bb005265c6c74efe9 Mon Sep 17 00:00:00 2001 From: Eelco Dolstra Date: Tue, 12 Sep 2006 15:23:28 +0000 Subject: [PATCH] * Exult now with glorious Roland MT-32 music! svn path=/nixpkgs/trunk/; revision=6503 --- .../libraries/SDL_mixer/default.nix | 5 +++-- pkgs/games/exult/builder.sh | 11 ++++++++++ pkgs/games/exult/default.nix | 22 ++++++++++++++++--- pkgs/top-level/all-packages.nix | 4 ++-- 4 files changed, 35 insertions(+), 7 deletions(-) create mode 100644 pkgs/games/exult/builder.sh diff --git a/pkgs/development/libraries/SDL_mixer/default.nix b/pkgs/development/libraries/SDL_mixer/default.nix index 33f157dbad8..14b8359c70a 100644 --- a/pkgs/development/libraries/SDL_mixer/default.nix +++ b/pkgs/development/libraries/SDL_mixer/default.nix @@ -1,4 +1,4 @@ -{stdenv, fetchurl, SDL}: +{stdenv, fetchurl, SDL, libogg, libvorbis}: stdenv.mkDerivation { name = "SDL_mixer-1.2.7"; @@ -6,5 +6,6 @@ stdenv.mkDerivation { url = http://www.libsdl.org/projects/SDL_mixer/release/SDL_mixer-1.2.7.tar.gz; md5 = "7959b89c8f8f1564ca90968f6c88fa1e"; }; - buildInputs = [SDL]; + buildInputs = [SDL libogg libvorbis]; + configureFlags = "--disable-music-ogg-shared"; } diff --git a/pkgs/games/exult/builder.sh b/pkgs/games/exult/builder.sh new file mode 100644 index 00000000000..33ed6ffd3fe --- /dev/null +++ b/pkgs/games/exult/builder.sh @@ -0,0 +1,11 @@ +source $stdenv/setup + +postInstall=postInstall +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 5a5d5c33e5e..89a3e4c51be 100644 --- a/pkgs/games/exult/default.nix +++ b/pkgs/games/exult/default.nix @@ -1,12 +1,28 @@ -{stdenv, fetchurl, SDL, SDL_mixer, zlib, libpng}: +{stdenv, fetchurl, SDL, SDL_mixer, zlib, libpng, unzip}: stdenv.mkDerivation { name = "exult-1.2"; + builder = ./builder.sh; + src = fetchurl { url = http://surfnet.dl.sourceforge.net/sourceforge/exult/exult-1.2.tar.gz; md5 = "0fc88dee74a91724d25373ba0a8670ba"; }; - buildInputs = [SDL SDL_mixer zlib libpng]; -# patches = [./gcc4.patch]; + + 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 = http://surfnet.dl.sourceforge.net/sourceforge/exult/U7MusicOGG_1of2.zip; + md5 = "7746d1a9164fd67509107797496553bf"; + }) + (fetchurl { + url = http://surfnet.dl.sourceforge.net/sourceforge/exult/U7MusicOGG_2of2.zip; + md5 = "cdae5956d7c52f35e90317913a660123"; + }) + ]; } diff --git a/pkgs/top-level/all-packages.nix b/pkgs/top-level/all-packages.nix index 8c87b83e84b..38b82cef117 100644 --- a/pkgs/top-level/all-packages.nix +++ b/pkgs/top-level/all-packages.nix @@ -1825,7 +1825,7 @@ rec { }; SDL_mixer = (import ../development/libraries/SDL_mixer) { - inherit fetchurl stdenv SDL; + inherit fetchurl stdenv SDL libogg libvorbis; }; boehmgc = (import ../development/libraries/boehm-gc) { @@ -2633,7 +2633,7 @@ rec { }; exult = import ../games/exult { - inherit fetchurl SDL SDL_mixer zlib libpng; + inherit fetchurl SDL SDL_mixer zlib libpng unzip; stdenv = overrideGCC stdenv gcc34; };