tome4: 1.4.6 -> 1.4.9

This commit is contained in:
Ricardo Ardissone 2017-03-04 12:24:46 -03:00 committed by Jörg Thalheim
parent 07bf113bbe
commit 8cbba14dbe
No known key found for this signature in database
GPG Key ID: CA4106B8D7CC79FA

View File

@ -1,32 +1,43 @@
{stdenv, fetchurl, openal, libpng, libvorbis, mesa_glu, premake4, SDL2, SDL2_image, SDL2_ttf }: {stdenv, fetchurl, openal, libpng, libvorbis, mesa_glu, premake4, SDL2, SDL2_image, SDL2_ttf }:
stdenv.mkDerivation rec { stdenv.mkDerivation rec {
version = "1.4.6"; version = "1.4.9";
name = "tome4-${version}"; name = "tome4-${version}";
src = fetchurl { src = fetchurl {
url = "http://te4.org/dl/t-engine/t-engine4-src-${version}.tar.bz2"; url = "http://te4.org/dl/t-engine/t-engine4-src-${version}.tar.bz2";
sha256 = "12pi2lw1k6l3p209nnkh4nfv3ppp8kpd6mkh1324c81z6mh6w4wg"; sha256 = "0c82m0g1ps64zghgdrp78m6bvfngcb75whhknqiailld7kz1g9xl";
}; };
buildInputs = [ mesa_glu openal libpng libvorbis SDL2 SDL2_ttf SDL2_image premake4 ]; nativeBuildInputs = [ premake4 ];
NIX_CFLAGS_COMPILE = [ "-I${SDL2_image}/include/SDL2" "-I${SDL2_ttf}/include/SDL2" ]; buildInputs = [
mesa_glu openal libpng libvorbis SDL2 SDL2_ttf SDL2_image
];
NIX_CFLAGS_COMPILE = [
"-I${SDL2_image}/include/SDL2"
"-I${SDL2_ttf}/include/SDL2"
];
preConfigure = '' 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 substituteInPlace premake4.lua \
--replace "/opt/SDL-2.0/include/SDL2" "${SDL2.dev}/include/SDL2" \
--replace "/usr/include/GL" "/run/opengl-driver/include"
premake4 gmake premake4 gmake
''; '';
makeFlags = [ "config=release" ]; makeFlags = [ "config=release" ];
installPhase = '' installPhase = ''
install -Dm755 t-engine $out/opt/tome4/t-engine install -Dm755 t-engine $out/opt/tome4/t-engine
echo "cd $out/opt/tome4" >> tome4 cat > tome4 <<EOF
echo "./t-engine &" >> tome4 #!/bin/sh
cd $out/opt/tome4
./t-engine &
EOF
install -Dm755 tome4 $out/bin/tome4 install -Dm755 tome4 $out/bin/tome4
cp -r bootstrap $out/opt/tome4 cp -r bootstrap $out/opt/tome4
cp -r game $out/opt/tome4 cp -r game $out/opt/tome4
''; '';
meta = { meta = with stdenv.lib; {
homepage = "http://te4.org/"; homepage = "http://te4.org/";
description = "Tales of Maj'eyal (rogue-like game)"; description = "Tales of Maj'eyal (rogue-like game)";
maintainers = [ stdenv.lib.maintainers.chattered ]; maintainers = [ maintainers.chattered ];
license = stdenv.lib.licenses.gpl3; license = licenses.gpl3;
platforms = stdenv.lib.platforms.linux; platforms = platforms.linux;
}; };
} }