diff --git a/pkgs/games/openttd/default.nix b/pkgs/games/openttd/default.nix new file mode 100644 index 000000000000..66c296b487ad --- /dev/null +++ b/pkgs/games/openttd/default.nix @@ -0,0 +1,22 @@ +{stdenv, fetchurl, SDL, libpng, zlib}: + +stdenv.mkDerivation rec { + name = "openttd-${version}"; + version = "0.6.0"; + + src = fetchurl { + url = "mirror://sf/openttd/${name}-source.tar.bz2"; + md5 = "dcf63687c73ff56887049fedaf6c6019"; + }; + + buildInputs = [SDL libpng]; + prefixKey = "--prefix-dir="; + configureFlags = "--with-zlib=${zlib}/lib/libz.a"; + makeFlags = "INSTALL_PERSONAL_DIR="; + + meta = { + description = ''OpenTTD is an open source clone of the Microprose game "Transport Tycoon Deluxe".''; + homepage = http://www.openttd.org/; + license = "GPLv2"; + }; +} diff --git a/pkgs/top-level/all-packages.nix b/pkgs/top-level/all-packages.nix index 6346e259bd94..43c1186f309d 100644 --- a/pkgs/top-level/all-packages.nix +++ b/pkgs/top-level/all-packages.nix @@ -5958,6 +5958,11 @@ let pkgs = rec { inherit fetchurl stdenv SDL openal freealut zlib libpng python; }; + openttd = import ../games/openttd { + inherit fetchurl stdenv SDL libpng; + zlib = zlibStatic; + }; + quake3demo = import ../games/quake3/wrapper { name = "quake3-demo"; description = "Demo of Quake 3 Arena, a classic first-person shooter";