summary refs log tree commit diff
path: root/pkgs/games/openttd/default.nix
diff options
context:
space:
mode:
Diffstat (limited to 'pkgs/games/openttd/default.nix')
-rw-r--r--pkgs/games/openttd/default.nix32
1 files changed, 26 insertions, 6 deletions
diff --git a/pkgs/games/openttd/default.nix b/pkgs/games/openttd/default.nix
index 66c296b487ad..616adf002243 100644
--- a/pkgs/games/openttd/default.nix
+++ b/pkgs/games/openttd/default.nix
@@ -1,22 +1,42 @@
-{stdenv, fetchurl, SDL, libpng, zlib}:
+{stdenv, fetchurl, pkgconfig, SDL, libpng, zlib, xz, freetype, fontconfig}:
 
 stdenv.mkDerivation rec {
   name = "openttd-${version}";
-  version = "0.6.0";
+  version = "1.2.2";
 
   src = fetchurl {
-    url = "mirror://sf/openttd/${name}-source.tar.bz2";
-    md5 = "dcf63687c73ff56887049fedaf6c6019";
+    url = "http://binaries.openttd.org/releases/${version}/${name}-source.tar.xz";
+    sha256 = "158znfx389bhs9gd2hadnbc2a32z4ma1vz8704cmw9yh0fmhbcap";
   };
 
-  buildInputs = [SDL libpng];
+  buildInputs = [SDL libpng pkgconfig xz zlib freetype fontconfig];
   prefixKey = "--prefix-dir=";
-  configureFlags = "--with-zlib=${zlib}/lib/libz.a";
+
+  configureFlags = ''
+    --with-zlib=${zlib}/lib/libz.a 
+    --without-liblzo2
+  '';
+
   makeFlags = "INSTALL_PERSONAL_DIR=";
 
+  postInstall = ''
+    mv $out/games/ $out/bin
+  '';
+
   meta = {
     description = ''OpenTTD is an open source clone of the Microprose game "Transport Tycoon Deluxe".'';
+    longDescription = ''
+      OpenTTD is a transportation economics simulator. In single player mode,
+      players controll a transportation business, and use rail, road, sea, and air
+      transport to move goods and people around the simulated world. 
+
+      In multiplayer networked mode, players may:
+        - play competitively as different businesses
+        - play cooperatively controling the same business
+        - observe as spectators
+    '';
     homepage = http://www.openttd.org/;
     license = "GPLv2";
+    maintainers = with stdenv.lib.maintainers; [ jcumming ];
   };
 }