7f74c406c4
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
26 lines
361 B
Bash
26 lines
361 B
Bash
source $stdenv/setup
|
|
|
|
|
|
ensureDir $out/baseq3
|
|
for i in $paks; do
|
|
if test -d "$paks/baseq3"; then
|
|
ln -s $paks/baseq3/* $out/baseq3/
|
|
fi
|
|
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
|
|
|
|
chmod +x $out/bin/quake3
|