Merge #2030: add openra game (C&C RTS engine)

Modifications from @vcunat, who tried Dune,
but it typically segfaults in mono after a few minutes
(IMHO unlikely to be a problem with packaging it).
This commit is contained in:
宋文武 2014-04-06 17:01:34 +02:00 committed by Vladimír Čunát
parent 0f65f11d6e
commit ddfd374c40
2 changed files with 46 additions and 0 deletions

View File

@ -0,0 +1,44 @@
{ stdenv, fetchurl, mono, makeWrapper
, SDL2, freetype, openal
}:
let
version = "20131223";
in stdenv.mkDerivation rec {
name = "openra-${version}";
meta = with stdenv.lib; {
description = "Real Time Strategy game engine recreates the C&C titles";
homepage = "http://www.open-ra.org/";
license = licenses.gpl3;
platforms = platforms.linux;
maintainers = with maintainers; [ iyzsong ];
};
src = fetchurl {
name = "${name}.tar.gz";
url = "https://github.com/OpenRA/OpenRA/archive/release-${version}.tar.gz";
sha256 = "1gfz6iiccajp86qc7xw5w843bng69k9zplvmipxxbspvr7byhw0c";
};
dontStrip = true;
nativeBuildInputs = [ mono makeWrapper ];
patchPhase = ''
sed -i 's/^VERSION.*/VERSION = release-${version}/g' Makefile
'';
preConfigure = ''
makeFlags="prefix=$out"
make version
'';
postInstall = with stdenv.lib; let
runtime = makeLibraryPath [ SDL2 freetype openal ];
in ''
wrapProgram $out/bin/openra \
--prefix PATH : "${mono}/bin" \
--prefix LD_LIBRARY_PATH : "${runtime}"
'';
}

View File

@ -9993,6 +9993,8 @@ let
oilrush = callPackage ../games/oilrush { };
openra = callPackage ../games/openra { };
openttd = callPackage ../games/openttd {
zlib = zlibStatic;
};