btanks: fix building with lua 5.2

gstqt5
Peter Hoeg 2019-08-19 23:24:08 +08:00 committed by Matthieu Coudron
parent 8ffb3cced1
commit 8b8f03682c
1 changed files with 12 additions and 9 deletions

View File

@ -1,5 +1,5 @@
{ stdenv, fetchurl, fetchpatch, sconsPackages, pkgconfig, SDL, libGLU_combined, zlib, smpeg
, SDL_image, libvorbis, expat, zip, lua5_1 }:
{ stdenv, fetchurl, fetchpatch, sconsPackages, pkgconfig, SDL, libGL, zlib, smpeg
, SDL_image, libvorbis, expat, zip, lua }:
stdenv.mkDerivation rec {
pname = "btanks";
@ -11,16 +11,19 @@ stdenv.mkDerivation rec {
};
nativeBuildInputs = [ sconsPackages.scons_3_0_1 pkgconfig ];
buildInputs = [ SDL libGLU_combined zlib smpeg SDL_image libvorbis expat zip lua5_1 ];
buildInputs = [ SDL libGL zlib smpeg SDL_image libvorbis expat zip lua ];
enableParallelBuilding = true;
NIX_CFLAGS_COMPILE = "-I${SDL_image}/include/SDL";
prePatch = ''
substituteInPlace ./engine/SConscript --replace "lua5.1" "lua" \
--replace "lua5.0" "lua"
'';
patches = [
(fetchpatch {
url = "https://aur.archlinux.org/cgit/aur.git/plain/lua52.patch?h=btanks";
sha256 = "0ip563kz6lhwiims5djrxq3mvb7jx9yzkpsqxxhbi9n6qzz7y2az";
name = "lua52.patch";
})
(fetchpatch {
url = "https://salsa.debian.org/games-team/btanks/raw/master/debian/patches/gcc-4.7.patch";
sha256 = "1dxlk1xh69gj10sqcsyckiakb8an3h41206wby4z44mpmvxc7pi4";
@ -32,8 +35,8 @@ stdenv.mkDerivation rec {
];
meta = with stdenv.lib; {
homepage = "https://sourceforge.net/projects/btanks/";
description = "Fast 2d tank arcade game";
homepage = "https://sourceforge.net/projects/btanks/";
license = licenses.gpl2Plus;
platforms = platforms.linux;
};