Author: sandervanderburg
Date: Sat Jun 25 22:25:50 2011
New Revision: 27539
URL: https://svn.nixos.org/websvn/nix/?rev=27539&sc=1

Log:
Added ZSNES emulator package

Added:
   nixpkgs/trunk/pkgs/misc/emulators/zsnes/
   nixpkgs/trunk/pkgs/misc/emulators/zsnes/default.nix
Modified:
   nixpkgs/trunk/pkgs/top-level/all-packages.nix

Added: nixpkgs/trunk/pkgs/misc/emulators/zsnes/default.nix
==============================================================================
--- /dev/null   00:00:00 1970   (empty, because file is newly added)
+++ nixpkgs/trunk/pkgs/misc/emulators/zsnes/default.nix Sat Jun 25 22:25:50 
2011        (r27539)
@@ -0,0 +1,36 @@
+{stdenv, fetchurl, nasm, SDL, zlib, libpng, ncurses, mesa}:
+
+stdenv.mkDerivation {
+  name = "zsnes-1.51";
+  
+  src = fetchurl {
+    url = mirror://sourceforge/zsnes/zsnes151src.tar.bz2;
+    sha256 = "08s64qsxziv538vmfv38fg1rfrz5k95dss5zdkbfxsbjlbdxwmi8";
+  };
+
+  buildInputs = [ nasm SDL zlib libpng ncurses mesa ];
+  
+  preConfigure = ''
+    cd src
+    
+    # Fix for undefined strncasecmp()
+    echo '#include <strings.h>' > tmp.cpp 
+    cat tmp.cpp tools/strutil.h > tools/strutil.h.new
+    mv tools/strutil.h.new tools/strutil.h
+    
+    # Fix for undefined system()
+    echo '#include <stdlib.h>' > tmp.cpp
+    cat tmp.cpp tools/depbuild.cpp > tools/depbuild.cpp.new
+    mv tools/depbuild.cpp.new tools/depbuild.cpp
+    
+    # Fix for lots of undefined strcmp, strncmp etc.
+    echo '#include <string.h>' > tmp.cpp 
+    cat tmp.cpp parsegen.cpp > parsegen.cpp.new
+    mv parsegen.cpp.new parsegen.cpp
+  '';
+  
+  meta = {
+    description = "A Super Nintendo Entertainment System Emulator";
+    license = "GPLv2";
+  };
+}
\ No newline at end of file

Modified: nixpkgs/trunk/pkgs/top-level/all-packages.nix
==============================================================================
--- nixpkgs/trunk/pkgs/top-level/all-packages.nix       Fri Jun 24 12:35:58 
2011        (r27538)
+++ nixpkgs/trunk/pkgs/top-level/all-packages.nix       Sat Jun 25 22:25:50 
2011        (r27539)
@@ -8090,6 +8090,8 @@
     inherit (stdenv) mkDerivation;
   };
 
+  zsnes = callPackage_i686 ../misc/emulators/zsnes { };
+
   misc = import ../misc/misc.nix { inherit pkgs stdenv; };
 
 }; in pkgs
_______________________________________________
nix-commits mailing list
[email protected]
http://mail.cs.uu.nl/mailman/listinfo/nix-commits

Reply via email to