[Nix-dev] Re: new package: crack-attack

Piotr Pietraszkiewicz ppietrasa at googlemail.com
Tue Sep 21 22:39:25 CEST 2010


  Marc, roconnor thank you for your comments.

I applied your suggestions.

@Marc: I don't know how to prepare patches with git.  I read that nixos 
resides in svn repo (not git). Are there some tricks?

Below you'll find the output of the svn diff I run inside 
/etc/nixos/nixpkgs/.

@roconnor:  The lines 'Property changes on..' and 'Added: 
svn:executable' worry me. How to I add a file with svn so that it is 
treated as text (not executable)? I never used svn before.


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 23884)
+++ pkgs/top-level/all-packages.nix     (working copy)
@@ -6409,6 +6409,8 @@
      inherit mesa freeglut;
    };

+  crack_attack = callPackage ../games/crack-attack { };
+
    eduke32 = callPackage ../games/eduke32 { };

    egoboo = callPackage ../games/egoboo { };




More information about the nix-dev mailing list