2016-09-04 11:43:23 +00:00
|
|
|
{ stdenv, fetchgit, cmake, pkgconfig, git, curl, SDL, xercesc, openal, lua, vlc
|
2014-10-11 16:55:08 +00:00
|
|
|
, libjpeg, wxGTK, cppunit, ftgl, glew, libogg, libvorbis, buildEnv, libpng
|
2016-09-04 11:43:23 +00:00
|
|
|
, fontconfig, freetype, xorg, makeWrapper, bash, which, gnome3, mesa_glu, glib
|
|
|
|
}:
|
2014-10-11 16:55:08 +00:00
|
|
|
let
|
|
|
|
version = "3.9.2";
|
|
|
|
lib-env = buildEnv {
|
|
|
|
name = "megaglest-lib-env";
|
2015-09-15 09:26:18 +00:00
|
|
|
paths = [ SDL xorg.libSM xorg.libICE xorg.libX11 xorg.libXext
|
2014-10-11 16:55:08 +00:00
|
|
|
xercesc openal libvorbis lua libjpeg libpng curl fontconfig ftgl freetype
|
2016-09-04 11:43:23 +00:00
|
|
|
stdenv.cc.cc glew mesa_glu wxGTK ];
|
2014-10-11 16:55:08 +00:00
|
|
|
};
|
|
|
|
path-env = buildEnv {
|
|
|
|
name = "megaglest-path-env";
|
|
|
|
paths = [ bash which gnome3.zenity ];
|
|
|
|
};
|
|
|
|
in
|
|
|
|
stdenv.mkDerivation {
|
|
|
|
name = "megaglest-${version}";
|
|
|
|
|
|
|
|
src = fetchgit {
|
|
|
|
url = "git://github.com/MegaGlest/megaglest-source";
|
|
|
|
rev = "refs/tags/${version}";
|
2016-06-02 11:26:44 +00:00
|
|
|
sha256 = "1406ns1533x5678d91s2xxxv19q7r238zsaxr37c6mv5jrx7s5jv";
|
2014-10-11 16:55:08 +00:00
|
|
|
};
|
|
|
|
|
2016-09-04 11:43:23 +00:00
|
|
|
buildInputs = [ cmake pkgconfig git curl SDL xercesc openal lua libpng libjpeg vlc wxGTK
|
|
|
|
glib cppunit fontconfig freetype ftgl glew libogg libvorbis makeWrapper mesa_glu ];
|
2014-10-11 16:55:08 +00:00
|
|
|
|
|
|
|
configurePhase = ''
|
|
|
|
cmake -DCMAKE_INSTALL_PREFIX=$out -DBUILD_MEGAGLEST_TESTS=ON
|
|
|
|
'';
|
|
|
|
|
|
|
|
postInstall = ''
|
|
|
|
for i in $out/bin/*; do
|
|
|
|
wrapProgram $i \
|
|
|
|
--prefix LD_LIBRARY_PATH ":" "${lib-env}/lib" \
|
|
|
|
--prefix PATH ":" "${path-env}/bin"
|
|
|
|
done
|
|
|
|
'';
|
|
|
|
|
|
|
|
meta = {
|
|
|
|
description = "MegaGlest is an entertaining free (freeware and free software) and open source cross-platform 3D real-time strategy (RTS) game";
|
|
|
|
license = stdenv.lib.licenses.gpl3;
|
2017-08-01 20:03:30 +00:00
|
|
|
homepage = http://megaglest.org/;
|
2014-10-11 16:55:08 +00:00
|
|
|
maintainers = [ stdenv.lib.maintainers.matejc ];
|
|
|
|
platforms = stdenv.lib.platforms.linux;
|
|
|
|
};
|
|
|
|
}
|