2020-09-25 17:49:40 +02:00
|
|
|
{ stdenv, cmake, pkgconfig, git, curl, SDL2, xercesc, openal, lua, libvlc
|
2014-10-11 18:55:08 +02:00
|
|
|
, libjpeg, wxGTK, cppunit, ftgl, glew, libogg, libvorbis, buildEnv, libpng
|
2018-02-24 13:59:47 +01:00
|
|
|
, fontconfig, freetype, xorg, makeWrapper, bash, which, gnome3, libGLU, glib
|
2017-12-21 20:53:42 +01:00
|
|
|
, fetchFromGitHub
|
2016-09-04 13:43:23 +02:00
|
|
|
}:
|
2014-10-11 18:55:08 +02:00
|
|
|
let
|
2018-01-04 14:43:35 +01:00
|
|
|
version = "3.13.0";
|
2014-10-11 18:55:08 +02:00
|
|
|
lib-env = buildEnv {
|
|
|
|
name = "megaglest-lib-env";
|
2018-01-04 14:43:35 +01:00
|
|
|
paths = [ SDL2 xorg.libSM xorg.libICE xorg.libX11 xorg.libXext
|
2014-10-11 18:55:08 +02:00
|
|
|
xercesc openal libvorbis lua libjpeg libpng curl fontconfig ftgl freetype
|
2018-02-24 13:59:47 +01:00
|
|
|
stdenv.cc.cc glew libGLU wxGTK ];
|
2014-10-11 18:55:08 +02:00
|
|
|
};
|
|
|
|
path-env = buildEnv {
|
|
|
|
name = "megaglest-path-env";
|
|
|
|
paths = [ bash which gnome3.zenity ];
|
|
|
|
};
|
|
|
|
in
|
|
|
|
stdenv.mkDerivation {
|
2019-08-13 23:52:01 +02:00
|
|
|
pname = "megaglest";
|
|
|
|
inherit version;
|
2014-10-11 18:55:08 +02:00
|
|
|
|
2017-12-21 20:53:42 +01:00
|
|
|
src = fetchFromGitHub {
|
|
|
|
owner = "MegaGlest";
|
|
|
|
repo = "megaglest-source";
|
2019-09-09 01:38:31 +02:00
|
|
|
rev = version;
|
2017-12-21 20:53:42 +01:00
|
|
|
fetchSubmodules = true;
|
2018-01-04 14:43:35 +01:00
|
|
|
sha256 = "0fb58a706nic14ss89zrigphvdiwy5s9dwvhscvvgrfvjpahpcws";
|
2014-10-11 18:55:08 +02:00
|
|
|
};
|
|
|
|
|
2017-09-05 23:26:13 +02:00
|
|
|
nativeBuildInputs = [ pkgconfig ];
|
2020-09-25 17:49:40 +02:00
|
|
|
buildInputs = [ cmake git curl SDL2 xercesc openal lua libpng libjpeg libvlc wxGTK
|
2018-02-24 13:59:47 +01:00
|
|
|
glib cppunit fontconfig freetype ftgl glew libogg libvorbis makeWrapper libGLU ];
|
2014-10-11 18:55:08 +02:00
|
|
|
|
|
|
|
configurePhase = ''
|
2017-12-21 20:57:26 +01:00
|
|
|
cmake -DCMAKE_INSTALL_PREFIX=$out \
|
|
|
|
-DBUILD_MEGAGLEST=On \
|
|
|
|
-DBUILD_MEGAGLEST_MAP_EDITOR=On \
|
|
|
|
-DBUILD_MEGAGLEST_MODEL_IMPORT_EXPORT_TOOLS=On \
|
|
|
|
-DBUILD_MEGAGLEST_MODEL_VIEWER=On
|
2014-10-11 18:55:08 +02:00
|
|
|
'';
|
|
|
|
|
|
|
|
postInstall = ''
|
|
|
|
for i in $out/bin/*; do
|
|
|
|
wrapProgram $i \
|
|
|
|
--prefix LD_LIBRARY_PATH ":" "${lib-env}/lib" \
|
|
|
|
--prefix PATH ":" "${path-env}/bin"
|
|
|
|
done
|
|
|
|
'';
|
|
|
|
|
|
|
|
meta = {
|
2020-10-26 05:08:40 +01:00
|
|
|
description = "An entertaining free (freeware and free software) and open source cross-platform 3D real-time strategy (RTS) game";
|
2014-10-11 18:55:08 +02:00
|
|
|
license = stdenv.lib.licenses.gpl3;
|
2020-04-01 03:11:51 +02:00
|
|
|
homepage = "http://megaglest.org/";
|
2014-10-11 18:55:08 +02:00
|
|
|
maintainers = [ stdenv.lib.maintainers.matejc ];
|
|
|
|
platforms = stdenv.lib.platforms.linux;
|
|
|
|
};
|
|
|
|
}
|