2017-01-07 15:47:55 +00:00
|
|
|
{ stdenv, lib, fetchurl, perl, unzip, zip, which, pkgconfig
|
2018-07-03 13:27:06 +01:00
|
|
|
, qtbase, qtscript, SDL2, libtheora, openal, glew, physfs, fribidi, libXrandr
|
2014-06-15 10:40:24 +01:00
|
|
|
, withVideos ? false
|
2010-05-03 17:07:01 +01:00
|
|
|
}:
|
2016-04-11 03:47:15 +01:00
|
|
|
|
|
|
|
let
|
2010-05-03 17:07:01 +01:00
|
|
|
pname = "warzone2100";
|
2014-06-15 10:40:24 +01:00
|
|
|
sequences_src = fetchurl {
|
|
|
|
url = "mirror://sourceforge/${pname}/warzone2100/Videos/high-quality-en/sequences.wz";
|
|
|
|
sha256 = "90ff552ca4a70e2537e027e22c5098ea4ed1bc11bb7fc94138c6c941a73d29fa";
|
|
|
|
};
|
2016-04-11 03:47:15 +01:00
|
|
|
in
|
|
|
|
|
|
|
|
stdenv.mkDerivation rec {
|
2017-12-18 14:30:08 +00:00
|
|
|
version = "3.2.3";
|
2016-04-11 03:47:15 +01:00
|
|
|
name = "${pname}-${version}";
|
2017-01-07 15:47:55 +00:00
|
|
|
|
2016-04-11 03:47:15 +01:00
|
|
|
src = fetchurl {
|
|
|
|
url = "mirror://sourceforge/${pname}/releases/${version}/${name}.tar.xz";
|
2017-12-18 14:30:08 +00:00
|
|
|
sha256 = "10kmpr4cby95zwqsl1zwx95d9achli6khq7flv6xmrq30a39xazw";
|
2016-04-11 03:47:15 +01:00
|
|
|
};
|
2017-01-07 15:47:55 +00:00
|
|
|
|
2018-07-03 13:27:06 +01:00
|
|
|
buildInputs = [ qtbase qtscript SDL2 libtheora openal glew physfs fribidi libXrandr ];
|
2017-01-07 15:47:55 +00:00
|
|
|
nativeBuildInputs = [ perl zip unzip pkgconfig ];
|
|
|
|
|
|
|
|
postPatch = ''
|
2010-05-03 17:07:01 +01:00
|
|
|
substituteInPlace lib/exceptionhandler/dumpinfo.cpp \
|
|
|
|
--replace "which %s" "${which}/bin/which %s"
|
2014-06-15 10:40:24 +01:00
|
|
|
substituteInPlace lib/exceptionhandler/exceptionhandler.cpp \
|
2010-05-03 17:07:01 +01:00
|
|
|
--replace "which %s" "${which}/bin/which %s"
|
|
|
|
'';
|
2014-09-04 20:02:14 +01:00
|
|
|
|
2017-01-07 15:47:55 +00:00
|
|
|
configureFlags = [ "--with-distributor=NixOS" ];
|
|
|
|
|
|
|
|
hardeningDisable = [ "format" ];
|
|
|
|
|
|
|
|
enableParallelBuilding = true;
|
2014-09-04 20:02:14 +01:00
|
|
|
|
2017-01-07 15:47:55 +00:00
|
|
|
postInstall = lib.optionalString withVideos "cp ${sequences_src} $out/share/warzone2100/sequences.wz";
|
2014-09-04 20:04:11 +01:00
|
|
|
|
|
|
|
meta = with stdenv.lib; {
|
2010-05-03 17:07:01 +01: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
|
2016-04-11 03:47:15 +01:00
|
|
|
variety of possible units and tactics.
|
2010-05-03 17:07:01 +01:00
|
|
|
'';
|
|
|
|
homepage = http://wz2100.net;
|
2014-09-04 20:04:11 +01:00
|
|
|
license = licenses.gpl2Plus;
|
|
|
|
maintainers = [ maintainers.astsmtl ];
|
|
|
|
platforms = platforms.linux;
|
2010-05-03 17:07:01 +01:00
|
|
|
};
|
|
|
|
}
|