Skip to content

Commit

Permalink
tome4: 1.4.9 -> 1.5.5
Browse files Browse the repository at this point in the history
  • Loading branch information
peterhoeg committed Feb 25, 2018
1 parent 831ef47 commit 7d9b2ba
Showing 1 changed file with 24 additions and 15 deletions.
39 changes: 24 additions & 15 deletions pkgs/games/tome4/default.nix
@@ -1,43 +1,52 @@
{stdenv, fetchurl, openal, libpng, libvorbis, mesa_glu, premake4, SDL2, SDL2_image, SDL2_ttf }:
{ stdenv, fetchurl, makeWrapper, premake4
, openal, libpng, libvorbis, mesa_glu, SDL2, SDL2_image, SDL2_ttf }:

stdenv.mkDerivation rec {
version = "1.4.9";
name = "tome4-${version}";
version = "1.5.5";

src = fetchurl {
url = "https://te4.org/dl/t-engine/t-engine4-src-${version}.tar.bz2";
sha256 = "0c82m0g1ps64zghgdrp78m6bvfngcb75whhknqiailld7kz1g9xl";
sha256 = "0v2qgdfpvdzd1bcbp9v8pfahj1bgczsq2d4xfhh5wg11jgjcwz03";
};
nativeBuildInputs = [ premake4 ];

nativeBuildInputs = [ premake4 makeWrapper ];

buildInputs = [
mesa_glu openal libpng libvorbis SDL2 SDL2_ttf SDL2_image
];

enableParallelBuilding = true;

NIX_CFLAGS_COMPILE = [
"-I${SDL2_image}/include/SDL2"
"-I${SDL2_ttf}/include/SDL2"
];

preConfigure = ''
substituteInPlace premake4.lua \
--replace "/opt/SDL-2.0/include/SDL2" "${SDL2.dev}/include/SDL2" \
--replace "/usr/include/GL" "/run/opengl-driver/include"
premake4 gmake
'';

makeFlags = [ "config=release" ];

installPhase = ''
install -Dm755 t-engine $out/opt/tome4/t-engine
cat > tome4 <<EOF
#!/bin/sh
cd $out/opt/tome4
./t-engine &
EOF
install -Dm755 tome4 $out/bin/tome4
cp -r bootstrap $out/opt/tome4
cp -r game $out/opt/tome4
runHook preInstall
dir=$out/opt/tome4
install -Dm755 t-engine $dir/t-engine
cp -r bootstrap game $dir
makeWrapper $dir/t-engine $out/bin/tome4
runHook postInstall
'';
meta = with stdenv.lib; {
homepage = https://te4.org/;
description = "Tales of Maj'eyal (rogue-like game)";
maintainers = [ maintainers.chattered ];
homepage = https://te4.org/;
license = licenses.gpl3;
maintainers = with maintainers; [ chattered ];
platforms = platforms.linux;
};
}

0 comments on commit 7d9b2ba

Please sign in to comment.