The crack-attack is an addictive tetris-like game.

In my previous post I copy-pasted the patch instead of attaching it. I guess this is why it didn't get committed. So here I fix my mistake. Attaching crack-atack.patch

Piotr
Index: pkgs/games/crack-attack/crack-attack-1.1.14-glut.patch
===================================================================
--- pkgs/games/crack-attack/crack-attack-1.1.14-glut.patch      (revision 0)
+++ pkgs/games/crack-attack/crack-attack-1.1.14-glut.patch      (revision 0)
@@ -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);
+ 

Property changes on: pkgs/games/crack-attack/crack-attack-1.1.14-glut.patch
___________________________________________________________________
Added: svn:executable
   + *

Index: pkgs/games/crack-attack/default.nix
===================================================================
--- pkgs/games/crack-attack/default.nix (revision 0)
+++ pkgs/games/crack-attack/default.nix (revision 0)
@@ -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
+  ];
+}

Property changes on: pkgs/games/crack-attack/default.nix
___________________________________________________________________
Added: svn:executable
   + *

Index: pkgs/games/crack-attack/crack-attack-1.1.14-gcc43.patch
===================================================================
--- pkgs/games/crack-attack/crack-attack-1.1.14-gcc43.patch     (revision 0)
+++ pkgs/games/crack-attack/crack-attack-1.1.14-gcc43.patch     (revision 0)
@@ -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 <climits>
+ #include <cstdlib>
+ #include <cmath>
++#include <cstring>
+ 
+ #ifdef __MINGW32__
+ #  include <windows.h>

Property changes on: pkgs/games/crack-attack/crack-attack-1.1.14-gcc43.patch
___________________________________________________________________
Added: svn:executable
   + *

Index: pkgs/top-level/all-packages.nix
===================================================================
--- pkgs/top-level/all-packages.nix     (revision 23986)
+++ pkgs/top-level/all-packages.nix     (working copy)
@@ -6436,6 +6436,8 @@
     inherit mesa freeglut;
   };
 
+  crack_attack = callPackage ../games/crack-attack { };
+
   eduke32 = callPackage ../games/eduke32 { };
 
   egoboo = callPackage ../games/egoboo { };
_______________________________________________
nix-dev mailing list
[email protected]
https://mail.cs.uu.nl/mailman/listinfo/nix-dev

Reply via email to