summary refs log tree commit diff
path: root/pkgs/games
diff options
context:
space:
mode:
Diffstat (limited to 'pkgs/games')
-rw-r--r--pkgs/games/prboom/default.nix20
-rw-r--r--pkgs/games/scummvm/default.nix12
2 files changed, 32 insertions, 0 deletions
diff --git a/pkgs/games/prboom/default.nix b/pkgs/games/prboom/default.nix
new file mode 100644
index 000000000000..f66e2295a22c
--- /dev/null
+++ b/pkgs/games/prboom/default.nix
@@ -0,0 +1,20 @@
+{stdenv, fetchurl, SDL, SDL_mixer, SDL_net, mesa}:
+
+stdenv.mkDerivation {
+  name = "prboom-2.5.0";
+  src = fetchurl {
+    url = mirror://sourceforge/prboom/prboom-2.5.0.tar.gz;
+    sha256 = "1bjb04q8dk232956k30qlpq6q0hxb904yh1nflr87jcc1x3iqv12";
+  };
+
+  buildInputs = [ SDL SDL_mixer SDL_net mesa ];
+  crossAttrs = {
+    propagatedBuildInputs = [ SDL.hostDrv SDL_mixer.hostDrv SDL_net.hostDrv ];
+    configureFlags = "--disable-gl --disable-cpu-opt --without-x --disable-sdltest
+      ac_cv_type_uid_t=yes ac_cv_type_gid_t=yes";
+
+    postInstall = ''
+      mv $out/games/ $out/bin
+    '';
+  };
+}
diff --git a/pkgs/games/scummvm/default.nix b/pkgs/games/scummvm/default.nix
index 1397bfef1516..c1ae54c01bd4 100644
--- a/pkgs/games/scummvm/default.nix
+++ b/pkgs/games/scummvm/default.nix
@@ -10,6 +10,18 @@ stdenv.mkDerivation {
   
   buildInputs = [SDL zlib mpeg2dec];
 
+  crossAttrs = {
+    preConfigure = ''
+      # Remove the --build flag set by the gcc cross wrapper setup
+      # hook
+      export configureFlags="--host=${stdenv.cross.config}"
+    '';
+    postConfigure = ''
+      # They use 'install -s', that calls the native strip instead of the cross
+      sed -i 's/-c -s/-c/' ports.mk;
+    '';
+  };
+
   meta = {
     description = "Program to run certain classic graphical point-and-click adventure games (such as Monkey Island)";
     homepage = http://www.scummvm.org/;