nixpkgs/pkgs/games/tome4/default.nix
2015-12-16 15:24:03 -05:00

31 lines
1.1 KiB
Nix

{stdenv, fetchurl, openal, libvorbis, mesa_glu, premake4, SDL2, SDL2_image, SDL2_ttf}:
stdenv.mkDerivation rec {
version = "1.3.3";
name = "tome4-${version}";
src = fetchurl {
url = "http://te4.org/dl/t-engine/t-engine4-src-${version}.tar.bz2";
sha256 = "d4c6d6aa0cb73b28172cebf89e4271b0a51c6e7dea744ce9c6d6042dd076e9cd";
};
buildInputs = [ mesa_glu openal libvorbis SDL2 SDL2_ttf SDL2_image premake4 ];
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)";
maintainers = [ stdenv.lib.maintainers.chattered ];
license = stdenv.lib.licenses.gpl3;
};
}