diff --git a/pkgs/games/blockattack/default.nix b/pkgs/games/blockattack/default.nix new file mode 100644 index 000000000000..7616d2e51a34 --- /dev/null +++ b/pkgs/games/blockattack/default.nix @@ -0,0 +1,59 @@ +{ lib +, stdenv +, fetchFromGitHub +, SDL2 +, SDL2_image +, SDL2_mixer +, SDL2_ttf +, boost +, cmake +, gettext +, physfs +, pkg-config +, zip +}: + +stdenv.mkDerivation rec { + pname = "blockattack"; + version = "2.7.0"; + + src = fetchFromGitHub { + name = "${pname}-${version}-src"; + owner = "blockattack"; + repo = "blockattack-game"; + rev = "v${version}"; + hash = "sha256-ySLm3AdoJRiMRdla45OJh8ZIFYNh+HzjG2VnFqoWuZA="; + }; + + 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)"; + license = licenses.gpl2Plus; + maintainers = with maintainers; [ AndersonTorres ]; + platforms = platforms.unix; + broken = stdenv.isDarwin; + }; +} diff --git a/pkgs/games/the-legend-of-edgar/default.nix b/pkgs/games/the-legend-of-edgar/default.nix new file mode 100644 index 000000000000..d099bbf2a420 --- /dev/null +++ b/pkgs/games/the-legend-of-edgar/default.nix @@ -0,0 +1,75 @@ +{ lib +, stdenv +, fetchFromGitHub +, SDL2 +, SDL2_image +, SDL2_mixer +, SDL2_ttf +, gettext +, libpng +, pkg-config +, zlib +}: + +stdenv.mkDerivation rec { + pname = "the-legend-of-edgar"; + version = "1.35"; + + src = fetchFromGitHub { + name = "${pname}-${version}-src"; + owner = "riksweeney"; + repo = "edgar"; + rev = version; + hash = "sha256-ojy4nEW9KiSte/AoFUMPrKCxvIeQpMVIL4ileHiBydo="; + }; + + nativeBuildInputs = [ + pkg-config + gettext + ]; + + buildInputs = [ + SDL2 + SDL2_image + SDL2_mixer + SDL2_ttf + libpng + zlib + ]; + + dontConfigure = true; + + makefile = "makefile"; + + makeFlags = [ + "PREFIX=${placeholder "out"}" + "BIN_DIR=${placeholder "out"}/bin/" + ]; + + # TODO: remove the setting below when the next version arrives + # https://github.com/riksweeney/edgar/pull/57 + preBuild = '' + export CFLAGS=$(sdl2-config --cflags) + ''; + + meta = with lib; { + homepage = "https://www.parallelrealities.co.uk/games/edgar"; + description = "A 2D platform game with a persistent world"; + longDescription = '' + When Edgar's father fails to return home after venturing out one dark and + stormy night, Edgar fears the worst: he has been captured by the evil + sorcerer who lives in a fortress beyond the forbidden swamp. + + Donning his armour, Edgar sets off to rescue him, but his quest will not + be easy... + + The Legend of Edgar is a platform game, not unlike those found on the + Amiga and SNES. Edgar must battle his way across the world, solving + puzzles and defeating powerful enemies to achieve his quest. + ''; + license = licenses.gpl1Plus; + maintainers = with maintainers; [ AndersonTorres ]; + platforms = platforms.unix; + broken = stdenv.isDarwin; + }; +} diff --git a/pkgs/top-level/all-packages.nix b/pkgs/top-level/all-packages.nix index 5fae7a0bb91a..2a3b63dedc2f 100644 --- a/pkgs/top-level/all-packages.nix +++ b/pkgs/top-level/all-packages.nix @@ -30234,6 +30234,8 @@ with pkgs; ballerburg = callPackage ../games/ballerburg { } ; + blockattack = callPackage ../games/blockattack { } ; + colobot = callPackage ../games/colobot {}; doom-bcc = callPackage ../games/zdoom/bcc-git.nix { }; @@ -31152,6 +31154,8 @@ with pkgs; tcl2048 = callPackage ../games/tcl2048 { }; + the-legend-of-edgar = callPackage ../games/the-legend-of-edgar { }; + the-powder-toy = callPackage ../games/the-powder-toy { lua = lua5_1; };