btanks: adopt (by AndersonTorres) and fixup

- finalAttrs
- strictDeps
This commit is contained in:
Anderson Torres 2024-05-10 21:04:15 -03:00
parent 10b4bf5fde
commit b8bbaa85b0

View File

@ -1,23 +1,30 @@
{ lib, stdenv, fetchurl, fetchpatch, scons, pkg-config, SDL, libGL, zlib, smpeg {
, SDL_image, libvorbis, expat, zip, lua }: lib,
SDL,
SDL_image,
expat,
fetchpatch,
fetchurl,
libGL,
libvorbis,
lua,
pkg-config,
scons,
smpeg,
stdenv,
zip,
zlib,
}:
stdenv.mkDerivation rec { stdenv.mkDerivation (finalAttrs: {
pname = "btanks"; pname = "btanks";
version = "0.9.8083"; version = "0.9.8083";
src = fetchurl { src = fetchurl {
url = "mirror://sourceforge/${pname}/${pname}-${version}.tar.bz2"; url = "mirror://sourceforge/btanks/btanks-${finalAttrs.version}.tar.bz2";
hash = "sha256-P9LOaitF96YMOxFPqa/xPLPdn7tqZc3JeYt2xPosQ0E="; hash = "sha256-P9LOaitF96YMOxFPqa/xPLPdn7tqZc3JeYt2xPosQ0E=";
}; };
nativeBuildInputs = [ scons pkg-config ];
buildInputs = [ SDL libGL zlib smpeg SDL_image libvorbis expat zip lua ];
enableParallelBuilding = true;
env.NIX_CFLAGS_COMPILE = "-I${SDL_image}/include/SDL";
patches = [ patches = [
(fetchpatch { (fetchpatch {
name = "lua52.patch"; name = "lua52.patch";
@ -42,10 +49,37 @@ stdenv.mkDerivation rec {
}) })
]; ];
meta = with lib; { nativeBuildInputs = [
description = "Fast 2d tank arcade game"; SDL
pkg-config
scons
smpeg
zip
];
buildInputs = [
SDL
SDL_image
expat
libGL
libvorbis
lua
smpeg
zlib
];
env.NIX_CFLAGS_COMPILE = "-I${lib.getDev SDL_image}/include/SDL";
enableParallelBuilding = true;
strictDeps = true;
meta = {
homepage = "https://sourceforge.net/projects/btanks/"; homepage = "https://sourceforge.net/projects/btanks/";
license = licenses.gpl2Plus; description = "Fast 2d tank arcade game with multiplayer and split-screen modes";
platforms = platforms.linux; license = lib.licenses.gpl2Plus;
mainProgram = "btanks";
maintainers = with lib.maintainers; [ AndersonTorres ];
inherit (SDL.meta) platforms;
}; };
} })