summary refs log tree commit diff
path: root/pkgs/games/quake3
diff options
context:
space:
mode:
authorEelco Dolstra2006-01-28 00:41:16 +0000
committerEelco Dolstra2006-01-28 00:41:16 +0000
commit7f74c406c4dab2a4aa9c3c818c14f59b3d28829d (patch)
tree2f97649d9768700393d489a5a1924112c38c4e87 /pkgs/games/quake3
parent3263d078dd4e6476deef256cc835a5cdd30feab3 (diff)
* In Quake 3, by default use Mesa as the OpenGL implementation. But
  allow the OpenGL implementation to be overriden through the
  OPENGL_DRIVER environment variable.  If it is not set, we use the
  implementation installed in the profile
  /nix/var/nix/profiles/opengl, allowing easy late binding by the
  user, e.g.,

    $ nix-env -p /nix/var/nix/profiles/opengl -i nvidia-sys-opengl

  might install the NVidia OpenGL implementation.

  The code that does this is not specific to Quake 3: it has been
  factored out into build-support/opengl/mesa-switch.sh.  Presumably
  any application that requires hardware-accelerated OpenGL needs it.

* Add the Quake 3 demo to the cache.

svn path=/nixpkgs/trunk/; revision=4612
Diffstat (limited to 'pkgs/games/quake3')
-rw-r--r--pkgs/games/quake3/wrapper/builder.sh5
-rw-r--r--pkgs/games/quake3/wrapper/default.nix6
2 files changed, 8 insertions, 3 deletions
diff --git a/pkgs/games/quake3/wrapper/builder.sh b/pkgs/games/quake3/wrapper/builder.sh
index 6162adfa824c..3042e7548f09 100644
--- a/pkgs/games/quake3/wrapper/builder.sh
+++ b/pkgs/games/quake3/wrapper/builder.sh
@@ -12,8 +12,13 @@ done
 ensureDir $out/bin
 
 cat >$out/bin/quake3 <<EOF
+mesa=$mesa
+
+$(cat $mesaSwitch)
+
 exec $game/ioquake3.i386 \
     +set fs_basepath $out \
+    +set r_allowSoftwareGL 1 \
     "\$@"
 EOF
 
diff --git a/pkgs/games/quake3/wrapper/default.nix b/pkgs/games/quake3/wrapper/default.nix
index 512ff21d7ce4..315516f037f4 100644
--- a/pkgs/games/quake3/wrapper/default.nix
+++ b/pkgs/games/quake3/wrapper/default.nix
@@ -1,7 +1,7 @@
-{stdenv, fetchurl, game, paks}:
+{stdenv, fetchurl, game, paks, mesa, name}:
 
 stdenv.mkDerivation {
-  name = "quake3";
   builder = ./builder.sh;
-  inherit game paks;
+  inherit game paks mesa name;
+  mesaSwitch = ../../../build-support/opengl/mesa-switch.sh;
 }