1
0
Fork 1
mirror of https://github.com/NixOS/nixpkgs.git synced 2024-12-25 03:17:13 +00:00
nixpkgs/pkgs/games/tome4/default.nix

44 lines
1.3 KiB
Nix
Raw Normal View History

2016-09-01 09:26:24 +01:00
{stdenv, fetchurl, openal, libpng, libvorbis, mesa_glu, premake4, SDL2, SDL2_image, SDL2_ttf }:
2015-06-14 17:44:38 +01:00
stdenv.mkDerivation rec {
2017-03-04 15:24:46 +00:00
version = "1.4.9";
2015-06-14 17:44:38 +01:00
name = "tome4-${version}";
src = fetchurl {
2015-12-16 20:24:03 +00:00
url = "http://te4.org/dl/t-engine/t-engine4-src-${version}.tar.bz2";
2017-03-04 15:24:46 +00:00
sha256 = "0c82m0g1ps64zghgdrp78m6bvfngcb75whhknqiailld7kz1g9xl";
2015-06-14 17:44:38 +01:00
};
2017-03-04 15:24:46 +00:00
nativeBuildInputs = [ premake4 ];
buildInputs = [
mesa_glu openal libpng libvorbis SDL2 SDL2_ttf SDL2_image
];
NIX_CFLAGS_COMPILE = [
"-I${SDL2_image}/include/SDL2"
"-I${SDL2_ttf}/include/SDL2"
];
2015-06-14 17:44:38 +01:00
preConfigure = ''
2017-03-04 15:24:46 +00:00
substituteInPlace premake4.lua \
--replace "/opt/SDL-2.0/include/SDL2" "${SDL2.dev}/include/SDL2" \
--replace "/usr/include/GL" "/run/opengl-driver/include"
2015-06-14 17:44:38 +01:00
premake4 gmake
'';
makeFlags = [ "config=release" ];
installPhase = ''
install -Dm755 t-engine $out/opt/tome4/t-engine
2017-03-04 15:24:46 +00:00
cat > tome4 <<EOF
#!/bin/sh
cd $out/opt/tome4
./t-engine &
EOF
2015-06-14 17:44:38 +01:00
install -Dm755 tome4 $out/bin/tome4
cp -r bootstrap $out/opt/tome4
cp -r game $out/opt/tome4
'';
2017-03-04 15:24:46 +00:00
meta = with stdenv.lib; {
homepage = http://te4.org/;
2015-06-14 17:44:38 +01:00
description = "Tales of Maj'eyal (rogue-like game)";
2017-03-04 15:24:46 +00:00
maintainers = [ maintainers.chattered ];
license = licenses.gpl3;
platforms = platforms.linux;
2015-06-14 17:44:38 +01:00
};
}