diff options
-rw-r--r-- | pkgs/games/btanks/default.nix | 18 |
1 files changed, 12 insertions, 6 deletions
diff --git a/pkgs/games/btanks/default.nix b/pkgs/games/btanks/default.nix index 9de90069a375..ad2cef1ac39a 100644 --- a/pkgs/games/btanks/default.nix +++ b/pkgs/games/btanks/default.nix @@ -2,10 +2,11 @@ , SDL_image, libvorbis, expat, zip, lua5_1 }: stdenv.mkDerivation rec { - name = "battle-tanks-0.9.8083"; + pname = "btanks"; + version = "0.9.8083"; src = fetchurl { - url = mirror://sourceforge/btanks/btanks-0.9.8083.tar.bz2; + url = "mirror://sourceforge/${pname}/${pname}-${version}.tar.bz2"; sha256 = "0ha35kxc8xlbg74wsrbapfgxvcrwy6psjkqi7c6adxs55dmcxliz"; }; @@ -14,21 +15,26 @@ stdenv.mkDerivation rec { NIX_CFLAGS_COMPILE = "-I${SDL_image}/include/SDL"; + prePatch = '' + substituteInPlace ./engine/SConscript --replace "lua5.1" "lua" \ + --replace "lua5.0" "lua" + ''; + patches = [ (fetchpatch { - url = "https://sources.debian.org/data/main/b/btanks/0.9.8083-7/debian/patches/gcc-4.7.patch"; + url = "https://salsa.debian.org/games-team/btanks/raw/master/debian/patches/gcc-4.7.patch"; sha256 = "1dxlk1xh69gj10sqcsyckiakb8an3h41206wby4z44mpmvxc7pi4"; }) (fetchpatch { - url = "https://sources.debian.org/data/main/b/btanks/0.9.8083-7/debian/patches/pow10f.patch"; + url = "https://salsa.debian.org/games-team/btanks/raw/master/debian/patches/pow10f.patch"; sha256 = "1h45790v2dpdbccfn6lwfgl8782q54i14cz9gpipkaghcka4y0g9"; }) ]; meta = with stdenv.lib; { - homepage = https://sourceforge.net/projects/btanks/; + homepage = "https://sourceforge.net/projects/btanks/"; description = "Fast 2d tank arcade game"; license = licenses.gpl2Plus; - platforms = platforms.unix; + platforms = platforms.linux; }; } |