@@ -1,32 +1,43 @@
11{stdenv, fetchurl, openal, libpng, libvorbis, mesa_glu, premake4, SDL2, SDL2_image, SDL2_ttf }:
22
33stdenv.mkDerivation rec {
4− version = "1.4.6";
4+ version = "1.4.9";
55 name = "tome4-${version}";
66 src = fetchurl {
77 url = "http://te4.org/dl/t-engine/t-engine4-src-${version}.tar.bz2";
8− sha256 = "12pi2lw1k6l3p209nnkh4nfv3ppp8kpd6mkh1324c81z6mh6w4wg";
8+ sha256 = "0c82m0g1ps64zghgdrp78m6bvfngcb75whhknqiailld7kz1g9xl";
99 };
10− buildInputs = [ mesa_glu openal libpng libvorbis SDL2 SDL2_ttf SDL2_image premake4 ];
11− NIX_CFLAGS_COMPILE = [ "-I${SDL2_image}/include/SDL2" "-I${SDL2_ttf}/include/SDL2" ];
10+ nativeBuildInputs = [ premake4 ];
11+ buildInputs = [
12+ mesa_glu openal libpng libvorbis SDL2 SDL2_ttf SDL2_image
13+ ];
14+ NIX_CFLAGS_COMPILE = [
15+ "-I${SDL2_image}/include/SDL2"
16+ "-I${SDL2_ttf}/include/SDL2"
17+ ];
1218 preConfigure = ''
13− 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
19+ substituteInPlace premake4.lua \
20+ --replace "/opt/SDL-2.0/include/SDL2" "${SDL2.dev}/include/SDL2" \
21+ --replace "/usr/include/GL" "/run/opengl-driver/include"
1422 premake4 gmake
1523 '';
1624 makeFlags = [ "config=release" ];
1725 installPhase = ''
1826 install -Dm755 t-engine $out/opt/tome4/t-engine
19− echo "cd $out/opt/tome4" >> tome4
20− echo "./t-engine &" >> tome4
27+ cat > tome4 <<EOF
28+#!/bin/sh
29+cd $out/opt/tome4
30+./t-engine &
31+EOF
2132 install -Dm755 tome4 $out/bin/tome4
2233 cp -r bootstrap $out/opt/tome4
2334 cp -r game $out/opt/tome4
2435 '';
25− meta = {
36+ meta = with stdenv.lib; {
2637 homepage = "http://te4.org/";
2738 description = "Tales of Maj'eyal (rogue-like game)";
28− maintainers = [ stdenv.lib.maintainers.chattered ];
29− license = stdenv.lib.licenses.gpl3;
30− platforms = stdenv.lib.platforms.linux;
39+ maintainers = [ maintainers.chattered ];
40+ license = licenses.gpl3;
41+ platforms = platforms.linux;
3142 };
3243}