From cecffb9df5b322c8708c6b02bc193eec9f707f3f Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Llu=C3=ADs=20Batlle=20i=20Rossell?= Date: Tue, 28 Sep 2010 22:37:27 +0000 Subject: [PATCH] Adding crack-attack (patch sent by Piotr Pietraszkiewicz) svn path=/nixpkgs/trunk/; revision=23987 --- .../crack-attack-1.1.14-gcc43.patch | 10 +++++++ .../crack-attack-1.1.14-glut.patch | 10 +++++++ pkgs/games/crack-attack/default.nix | 27 +++++++++++++++++++ pkgs/top-level/all-packages.nix | 2 ++ 4 files changed, 49 insertions(+) create mode 100644 pkgs/games/crack-attack/crack-attack-1.1.14-gcc43.patch create mode 100644 pkgs/games/crack-attack/crack-attack-1.1.14-glut.patch create mode 100644 pkgs/games/crack-attack/default.nix diff --git a/pkgs/games/crack-attack/crack-attack-1.1.14-gcc43.patch b/pkgs/games/crack-attack/crack-attack-1.1.14-gcc43.patch new file mode 100644 index 000000000000..fb2910d128ee --- /dev/null +++ b/pkgs/games/crack-attack/crack-attack-1.1.14-gcc43.patch @@ -0,0 +1,10 @@ +--- crack-attack-1.1.14/src/Game.h ++++ crack-attack-1.1.14/src/Game.h +@@ -34,6 +34,7 @@ + #include + #include + #include ++#include + + #ifdef __MINGW32__ + # include diff --git a/pkgs/games/crack-attack/crack-attack-1.1.14-glut.patch b/pkgs/games/crack-attack/crack-attack-1.1.14-glut.patch new file mode 100644 index 000000000000..4daea4c53a28 --- /dev/null +++ b/pkgs/games/crack-attack/crack-attack-1.1.14-glut.patch @@ -0,0 +1,10 @@ +--- crack-attack-1.1.14/src/Attack.cxx ++++ crack-attack-1.1.14/src/Attack.cxx +@@ -83,6 +83,7 @@ + int height = -1, width = -1; + + player_name[0] = '\0'; ++ glutInit(&argc, argv); + parseCommandLine(argc, argv, mode, port, host_name, player_name, height, width); + run_crack_attack(mode, port, host_name, player_name, height, width); + diff --git a/pkgs/games/crack-attack/default.nix b/pkgs/games/crack-attack/default.nix new file mode 100644 index 000000000000..7e90d448a8be --- /dev/null +++ b/pkgs/games/crack-attack/default.nix @@ -0,0 +1,27 @@ +{ stdenv, fetchurl, pkgconfig, gtk, freeglut, SDL, mesa, libXi, libXmu}: + +stdenv.mkDerivation { + name = "crack-attack-1.1.14"; + + src = fetchurl { + url = mirror://savannah/crack-attack/crack-attack-1.1.14.tar.gz; + sha256 = "1sakj9a2q05brpd7lkqxi8q30bccycdzd96ns00s6jbxrzjlijkm"; + }; + + buildInputs = + [ + pkgconfig gtk freeglut SDL mesa libXi libXmu + ]; + + meta = { + description = "A fast-paced puzzle game inspired by the classic Super NES title Tetris Attack!"; + homepage = http://www.nongnu.org/crack-attack/; + license = "GPLv2"; + platforms = stdenv.lib.platforms.linux; + }; + + patches = [ + ./crack-attack-1.1.14-gcc43.patch + ./crack-attack-1.1.14-glut.patch + ]; +} diff --git a/pkgs/top-level/all-packages.nix b/pkgs/top-level/all-packages.nix index a1d589654646..95fc2ce8d586 100644 --- a/pkgs/top-level/all-packages.nix +++ b/pkgs/top-level/all-packages.nix @@ -6436,6 +6436,8 @@ let inherit mesa freeglut; }; + crack_attack = callPackage ../games/crack-attack { }; + eduke32 = callPackage ../games/eduke32 { }; egoboo = callPackage ../games/egoboo { };