diff --git a/pkgs/games/btanks/default.nix b/pkgs/games/btanks/default.nix index 46f5b3d01830..93f341298a83 100644 --- a/pkgs/games/btanks/default.nix +++ b/pkgs/games/btanks/default.nix @@ -1,4 +1,5 @@ -{stdenv, fetchurl, scons, pkgconfig, SDL, mesa, zlib, smpeg, SDL_image, libvorbis, lua5, zip }: +{ stdenv, fetchurl, fetchpatch, scons, pkgconfig, SDL, mesa, zlib, smpeg +, SDL_image, libvorbis, expat, zip, lua5_1 }: stdenv.mkDerivation rec { name = "battle-tanks-0.9.8083"; @@ -8,8 +9,16 @@ stdenv.mkDerivation rec { sha256 = "0ha35kxc8xlbg74wsrbapfgxvcrwy6psjkqi7c6adxs55dmcxliz"; }; - buildInputs = [ scons pkgconfig SDL mesa zlib smpeg SDL_image libvorbis lua5 - zip ]; + nativeBuildInputs = [ scons pkgconfig ]; + buildInputs = [ SDL mesa zlib smpeg SDL_image libvorbis expat zip lua5_1 ]; + + NIX_CFLAGS_COMPILE = "-I${SDL_image}/include/SDL"; + + patches = [ (fetchpatch { + name = "gcc-4.7.patch"; + url = "https://anonscm.debian.org/viewvc/pkg-games/packages/trunk/btanks/debian/patches/gcc-4.7.patch?revision=13641&view=co&pathrev=15758"; + sha256 = "1dxlk1xh69gj10sqcsyckiakb8an3h41206wby4z44mpmvxc7pi4"; + }) ]; buildPhase = '' scons prefix=$out