2016-09-01 10:26:24 +02:00
|
|
|
{stdenv, fetchurl, openal, libpng, libvorbis, mesa_glu, premake4, SDL2, SDL2_image, SDL2_ttf }:
|
2015-06-14 18:44:38 +02:00
|
|
|
|
|
|
|
stdenv.mkDerivation rec {
|
2016-05-10 01:50:32 +02:00
|
|
|
version = "1.4.6";
|
2015-06-14 18:44:38 +02:00
|
|
|
name = "tome4-${version}";
|
|
|
|
src = fetchurl {
|
2015-12-16 21:24:03 +01:00
|
|
|
url = "http://te4.org/dl/t-engine/t-engine4-src-${version}.tar.bz2";
|
2016-05-10 01:50:32 +02:00
|
|
|
sha256 = "12pi2lw1k6l3p209nnkh4nfv3ppp8kpd6mkh1324c81z6mh6w4wg";
|
2015-06-14 18:44:38 +02:00
|
|
|
};
|
2016-09-01 10:26:24 +02:00
|
|
|
buildInputs = [ mesa_glu openal libpng libvorbis SDL2 SDL2_ttf SDL2_image premake4 ];
|
|
|
|
NIX_CFLAGS_COMPILE = [ "-I${SDL2_image}/include/SDL2" "-I${SDL2_ttf}/include/SDL2" ];
|
2015-06-14 18:44:38 +02:00
|
|
|
preConfigure = ''
|
|
|
|
sed -e "s@/opt/SDL-2.0/include/SDL2@${SDL2}/include/SDL2@g" -e "s@/usr/include/GL@/run/opengl-driver/include@g" -i premake4.lua
|
|
|
|
premake4 gmake
|
|
|
|
'';
|
|
|
|
makeFlags = [ "config=release" ];
|
|
|
|
installPhase = ''
|
|
|
|
install -Dm755 t-engine $out/opt/tome4/t-engine
|
|
|
|
echo "cd $out/opt/tome4" >> tome4
|
|
|
|
echo "./t-engine &" >> tome4
|
|
|
|
install -Dm755 tome4 $out/bin/tome4
|
|
|
|
cp -r bootstrap $out/opt/tome4
|
|
|
|
cp -r game $out/opt/tome4
|
|
|
|
'';
|
|
|
|
meta = {
|
|
|
|
homepage = "http://te4.org/";
|
|
|
|
description = "Tales of Maj'eyal (rogue-like game)";
|
2015-06-28 18:17:51 +02:00
|
|
|
maintainers = [ stdenv.lib.maintainers.chattered ];
|
2015-06-14 18:44:38 +02:00
|
|
|
license = stdenv.lib.licenses.gpl3;
|
2016-08-02 19:50:55 +02:00
|
|
|
platforms = stdenv.lib.platforms.linux;
|
2015-06-14 18:44:38 +02:00
|
|
|
};
|
|
|
|
}
|