From 279c426f05e8ab7f09ac095446eaedd25a3add9e Mon Sep 17 00:00:00 2001 From: Phil Scott Date: Sun, 14 Jun 2015 17:44:38 +0100 Subject: [PATCH] Add Tales of Maj'eyal game. --- pkgs/games/tome4/default.nix | 29 +++++++++++++++++++++++++++++ pkgs/top-level/all-packages.nix | 2 ++ 2 files changed, 31 insertions(+) create mode 100644 pkgs/games/tome4/default.nix diff --git a/pkgs/games/tome4/default.nix b/pkgs/games/tome4/default.nix new file mode 100644 index 000000000000..8ff82767cb7a --- /dev/null +++ b/pkgs/games/tome4/default.nix @@ -0,0 +1,29 @@ +{stdenv, fetchurl, openal, libvorbis, mesa_glu, premake4, SDL2, SDL2_image, SDL2_ttf}: + +stdenv.mkDerivation rec { + version = "1.3.1"; + name = "tome4-${version}"; + src = fetchurl { + url = "http://te4.org/dl/t-engine/t-engine4-src-1.3.1.tar.bz2"; + sha256 = "9b6658e29ad3be9f8469a61e724350f4dfec676777e471f633d616443dfbc7e7"; + }; + 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)"; + license = stdenv.lib.licenses.gpl3; + }; +} diff --git a/pkgs/top-level/all-packages.nix b/pkgs/top-level/all-packages.nix index 000027a9125a..3e377bde4e71 100644 --- a/pkgs/top-level/all-packages.nix +++ b/pkgs/top-level/all-packages.nix @@ -13467,6 +13467,8 @@ let tintin = callPackage ../games/tintin { }; + tome4 = callPackage ../games/tome4 { }; + tpm = callPackage ../games/thePenguinMachine { }; tremulous = callPackage ../games/tremulous { };