2014-06-15 11:40:24 +02:00
|
|
|
{ stdenv, fetchurl, bison, flex, gettext, pkgconfig, libpng
|
|
|
|
, libtheora, openalSoft, physfs, mesa, fribidi, fontconfig
|
|
|
|
, freetype, qt4, glew, libogg, libvorbis, zlib, libX11
|
|
|
|
, libXrandr, zip, unzip, which
|
|
|
|
, withVideos ? false
|
2010-05-03 18:07:01 +02:00
|
|
|
}:
|
|
|
|
stdenv.mkDerivation rec {
|
|
|
|
pname = "warzone2100";
|
2014-06-15 11:40:24 +02:00
|
|
|
version = "3.1.1";
|
2010-05-03 18:07:01 +02:00
|
|
|
name = "${pname}-${version}";
|
|
|
|
src = fetchurl {
|
2014-06-15 11:40:24 +02:00
|
|
|
url = "mirror://sourceforge/${pname}/releases/${version}/${name}.tar.xz";
|
|
|
|
sha256 = "c937a2e2c7afdad00b00767636234bbec4d8b18efb008073445439d32edb76cf";
|
2010-05-03 18:07:01 +02:00
|
|
|
};
|
2014-06-15 11:40:24 +02:00
|
|
|
sequences_src = fetchurl {
|
|
|
|
url = "mirror://sourceforge/${pname}/warzone2100/Videos/high-quality-en/sequences.wz";
|
|
|
|
sha256 = "90ff552ca4a70e2537e027e22c5098ea4ed1bc11bb7fc94138c6c941a73d29fa";
|
|
|
|
};
|
|
|
|
buildInputs = [ bison flex gettext pkgconfig libpng libtheora openalSoft
|
|
|
|
physfs mesa fribidi fontconfig freetype qt4
|
|
|
|
glew libogg libvorbis zlib libX11 libXrandr zip
|
|
|
|
unzip
|
2010-05-03 18:07:01 +02:00
|
|
|
];
|
|
|
|
patchPhase = ''
|
|
|
|
substituteInPlace lib/exceptionhandler/dumpinfo.cpp \
|
|
|
|
--replace "which %s" "${which}/bin/which %s"
|
2014-06-15 11:40:24 +02:00
|
|
|
substituteInPlace lib/exceptionhandler/exceptionhandler.cpp \
|
2010-05-03 18:07:01 +02:00
|
|
|
--replace "which %s" "${which}/bin/which %s"
|
|
|
|
'';
|
2014-06-15 11:40:24 +02:00
|
|
|
configureFlags = "--with-backend=qt --with-distributor=NixOS";
|
2014-09-04 21:02:14 +02:00
|
|
|
|
|
|
|
NIX_CFLAGS_COMPILE = "-fpermissive"; # GL header minor incompatibility
|
|
|
|
|
2014-06-15 11:40:24 +02:00
|
|
|
postInstall = []
|
|
|
|
++ stdenv.lib.optional withVideos "cp ${sequences_src} $out/share/warzone2100/sequences.wz";
|
2014-09-04 21:04:11 +02:00
|
|
|
|
|
|
|
meta = with stdenv.lib; {
|
2010-05-03 18:07:01 +02:00
|
|
|
description = "A free RTS game, originally developed by Pumpkin Studios";
|
|
|
|
longDescription = ''
|
|
|
|
Warzone 2100 is an open source real-time strategy and real-time tactics
|
|
|
|
hybrid computer game, originally developed by Pumpkin Studios and
|
|
|
|
published by Eidos Interactive.
|
|
|
|
In Warzone 2100, you command the forces of The Project in a battle to
|
|
|
|
rebuild the world after mankind has almost been destroyed by nuclear
|
|
|
|
missiles. The game offers campaign, multi-player, and single-player
|
|
|
|
skirmish modes. An extensive tech tree with over 400 different
|
|
|
|
technologies, combined with the unit design system, allows for a wide
|
|
|
|
variety of possible units and tactics.
|
|
|
|
'';
|
|
|
|
homepage = http://wz2100.net;
|
2014-09-04 21:04:11 +02:00
|
|
|
license = licenses.gpl2Plus;
|
|
|
|
maintainers = [ maintainers.astsmtl ];
|
|
|
|
platforms = platforms.linux;
|
2010-05-03 18:07:01 +02:00
|
|
|
};
|
|
|
|
}
|