2018-01-04 13:43:35 +00:00
|
|
|
{ stdenv, cmake, pkgconfig, git, curl, SDL2, xercesc, openal, lua, vlc
|
2014-10-11 17:55:08 +01:00
|
|
|
, libjpeg, wxGTK, cppunit, ftgl, glew, libogg, libvorbis, buildEnv, libpng
|
2016-09-04 12:43:23 +01:00
|
|
|
, fontconfig, freetype, xorg, makeWrapper, bash, which, gnome3, mesa_glu, glib
|
2017-12-21 19:53:42 +00:00
|
|
|
, fetchFromGitHub
|
2016-09-04 12:43:23 +01:00
|
|
|
}:
|
2014-10-11 17:55:08 +01:00
|
|
|
let
|
2018-01-04 13:43:35 +00:00
|
|
|
version = "3.13.0";
|
2014-10-11 17:55:08 +01:00
|
|
|
lib-env = buildEnv {
|
|
|
|
name = "megaglest-lib-env";
|
2018-01-04 13:43:35 +00:00
|
|
|
paths = [ SDL2 xorg.libSM xorg.libICE xorg.libX11 xorg.libXext
|
2014-10-11 17:55:08 +01:00
|
|
|
xercesc openal libvorbis lua libjpeg libpng curl fontconfig ftgl freetype
|
2016-09-04 12:43:23 +01:00
|
|
|
stdenv.cc.cc glew mesa_glu wxGTK ];
|
2014-10-11 17:55:08 +01:00
|
|
|
};
|
|
|
|
path-env = buildEnv {
|
|
|
|
name = "megaglest-path-env";
|
|
|
|
paths = [ bash which gnome3.zenity ];
|
|
|
|
};
|
|
|
|
in
|
|
|
|
stdenv.mkDerivation {
|
|
|
|
name = "megaglest-${version}";
|
|
|
|
|
2017-12-21 19:53:42 +00:00
|
|
|
src = fetchFromGitHub {
|
|
|
|
owner = "MegaGlest";
|
|
|
|
repo = "megaglest-source";
|
|
|
|
rev = "${version}";
|
|
|
|
fetchSubmodules = true;
|
2018-01-04 13:43:35 +00:00
|
|
|
sha256 = "0fb58a706nic14ss89zrigphvdiwy5s9dwvhscvvgrfvjpahpcws";
|
2014-10-11 17:55:08 +01:00
|
|
|
};
|
|
|
|
|
2017-09-05 22:26:13 +01:00
|
|
|
nativeBuildInputs = [ pkgconfig ];
|
2018-01-04 13:43:35 +00:00
|
|
|
buildInputs = [ cmake git curl SDL2 xercesc openal lua libpng libjpeg vlc wxGTK
|
2016-09-04 12:43:23 +01:00
|
|
|
glib cppunit fontconfig freetype ftgl glew libogg libvorbis makeWrapper mesa_glu ];
|
2014-10-11 17:55:08 +01:00
|
|
|
|
|
|
|
configurePhase = ''
|
2017-12-21 19:56:50 +00:00
|
|
|
cmake -DCMAKE_INSTALL_PREFIX=$out
|
2014-10-11 17:55:08 +01:00
|
|
|
'';
|
|
|
|
|
|
|
|
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 21:03:30 +01:00
|
|
|
homepage = http://megaglest.org/;
|
2014-10-11 17:55:08 +01:00
|
|
|
maintainers = [ stdenv.lib.maintainers.matejc ];
|
|
|
|
platforms = stdenv.lib.platforms.linux;
|
|
|
|
};
|
|
|
|
}
|