···11-{ lib, stdenv, fetchurl, pkg-config, SDL2, libogg, libvorbis, zlib, unzip }:
22-33-let
44-55- # Digital recordings of the music on an original Roland MT-32. So
66- # we don't need actual MIDI playback capability.
77- audio = fetchurl {
88- url = "mirror://sourceforge/exult/exult_audio.zip";
99- sha256 = "0s5wvgy9qja06v38g0qwzpaw76ff96vzd6gb1i3lb9k4hvx0xqbj";
1010- };
1111-1212-in
11+{ lib
22+, stdenv
33+, fetchFromGitHub
44+, SDL2
55+, autoconf
66+, automake
77+, libogg
88+, libtool
99+, libvorbis
1010+, pkg-config
1111+, zlib
1212+, enableTools ? false
1313+}:
13141415stdenv.mkDerivation rec {
1516 pname = "exult";
1616- version = "1.6";
1717+ version = "1.8";
17181818- src = fetchurl {
1919- url = "mirror://sourceforge/exult/exult-${version}.tar.gz";
2020- sha256 = "1dm27qkxj30567zb70q4acddsizn0xyi3z87hg7lysxdkyv49s3s";
1919+ src = fetchFromGitHub {
2020+ owner = "exult";
2121+ repo = "exult";
2222+ rev = "v${version}";
2323+ hash = "sha256-Y7FpgiGuqR4ZG/PNSfLcNcRWeeC7GebUTighXsCfy+E=";
2124 };
22252323- configureFlags = [ "--disable-tools" ];
2626+ nativeBuildInputs = [
2727+ autoconf
2828+ automake
2929+ libtool
3030+ pkg-config
3131+ ];
24322525- nativeBuildInputs = [ pkg-config unzip ];
2626- buildInputs = [ SDL2 libogg libvorbis zlib ];
3333+ buildInputs = [
3434+ SDL2
3535+ libogg
3636+ libvorbis
3737+ zlib
3838+ ];
27392828- enableParallelBuilding = true;
4040+ preConfigure = ''
4141+ ./autogen.sh
4242+ '';
29433030- NIX_LDFLAGS = "-lX11";
3131-3232- postInstall =
3333- ''
3434- mkdir -p $out/share/exult/music
3535- unzip -o -d $out/share/exult ${audio}
3636- chmod 644 $out/share/exult/*.flx
3737- ''; # */
4444+ configureFlags = lib.optional (!enableTools) "--disable-tools";
38453939- meta = {
4040- homepage = "http://exult.sourceforge.net/";
4141- description = "A reimplementation of the Ultima VII game engine";
4242- maintainers = [ lib.maintainers.eelco ];
4343- platforms = lib.platforms.unix;
4444- hydraPlatforms = lib.platforms.linux; # darwin times out
4545- license = lib.licenses.gpl2Plus;
4646+ meta = with lib; {
4747+ description = "Exult is a project to recreate Ultima VII for modern operating systems";
4848+ longDescription = ''
4949+ Ultima VII, an RPG from the early 1990's, still has a huge following. But,
5050+ being a DOS game with a very nonstandard memory manager, it is difficult
5151+ to run it on the latest computers. Exult is a project that created an
5252+ Ultima VII game engine that runs on modern operating systems, capable of
5353+ using the data and graphics files that come with the game. Exult aims to
5454+ let those people who own Ultima VII play the game on modern hardware, in
5555+ as close to (or perhaps even surpassing) its original splendor as is
5656+ possible.
5757+ '';
5858+ homepage = "http://exult.info";
5959+ license = licenses.gpl2Plus;
6060+ maintainers = with maintainers; [ azahi eelco ];
4661 };
4762}