nixpkgs/pkgs/games/blockattack/default.nix
stuebinm ff1a94e523 treewide: add meta.mainProgram to packages with a single binary
The nixpkgs-unstable channel's programs.sqlite was used to identify
packages producing exactly one binary, and these automatically added
to their package definitions wherever possible.
2024-03-19 03:14:51 +01:00

60 lines
1.0 KiB
Nix

{ lib
, stdenv
, fetchFromGitHub
, SDL2
, SDL2_image
, SDL2_mixer
, SDL2_ttf
, boost
, cmake
, gettext
, physfs
, pkg-config
, zip
}:
stdenv.mkDerivation rec {
pname = "blockattack";
version = "2.8.0";
src = fetchFromGitHub {
owner = "blockattack";
repo = "blockattack-game";
rev = "v${version}";
hash = "sha256-2oKesdr2eNZhDlGrFRiH5/8APFkGJfxPCNvzFoIumdQ=";
};
nativeBuildInputs = [
cmake
pkg-config
gettext
zip
];
buildInputs = [
SDL2
SDL2_image
SDL2_mixer
SDL2_ttf
SDL2_ttf
boost
physfs
];
preConfigure = ''
patchShebangs packdata.sh source/misc/translation/*.sh
chmod +x ./packdata.sh
./packdata.sh
'';
meta = with lib; {
homepage = "https://blockattack.net/";
description = "An open source clone of Panel de Pon (aka Tetris Attack)";
mainProgram = "blockattack";
license = licenses.gpl2Plus;
maintainers = with maintainers; [ AndersonTorres ];
platforms = platforms.unix;
broken = stdenv.isDarwin;
};
}