diff options
Diffstat (limited to 'pkgs/games')
-rw-r--r-- | pkgs/games/quake3/game/builder.sh | 7 | ||||
-rw-r--r-- | pkgs/games/quake3/game/default.nix | 26 | ||||
-rw-r--r-- | pkgs/games/quake3/wrapper/builder.sh | 24 | ||||
-rw-r--r-- | pkgs/games/quake3/wrapper/default.nix | 9 | ||||
-rw-r--r-- | pkgs/games/ut2004demo/default.nix | 1 | ||||
-rw-r--r-- | pkgs/games/ut2004demo/make-wrapper.sh | 4 |
6 files changed, 34 insertions, 37 deletions
diff --git a/pkgs/games/quake3/game/builder.sh b/pkgs/games/quake3/game/builder.sh deleted file mode 100644 index 9082b8f21ad5e..0000000000000 --- a/pkgs/games/quake3/game/builder.sh +++ /dev/null @@ -1,7 +0,0 @@ -source $stdenv/setup - -ensureDir $out/baseq3 -installTargets=copyfiles -installFlags="COPYDIR=$out" - -genericBuild diff --git a/pkgs/games/quake3/game/default.nix b/pkgs/games/quake3/game/default.nix index c7fe303b5efff..292748c4546ab 100644 --- a/pkgs/games/quake3/game/default.nix +++ b/pkgs/games/quake3/game/default.nix @@ -1,11 +1,29 @@ {stdenv, fetchurl, x11, SDL, mesa, openal}: stdenv.mkDerivation { - name = "quake3-icculus-1.33pre526"; + name = "ioquake3-1.34-pre-rc3"; + src = fetchurl { - url = http://nix.cs.uu.nl/dist/tarballs/quake3-icculus-r526.tar.bz2; - md5 = "63429347b918052c27cdb5c1d15939ad"; + url = http://ioquake3.org/files/ioquake3_1.34-rc3.tar.bz2; + sha256 = "008vah60z0n9h1qp373xbqvhwfbyywbbhd1np0h0yw66g0qzchzv"; }; - builder = ./builder.sh; + + patchFlags = "-p0"; + + patches = [ + # Fix for compiling on gcc 4.2. + (fetchurl { + url = "http://sources.gentoo.org/viewcvs.py/*checkout*/gentoo-x86/games-fps/quake3/files/quake3-1.34_rc3-gcc42.patch?rev=1.1"; + sha256 = "06c9lxfczcby5q29pim231mr2wdkvbv36xp9zbxp9vk0dfs8rv9x"; + }) + ]; + buildInputs = [x11 SDL mesa openal]; + + preInstall = '' + ensureDir $out/baseq3 + installTargets=copyfiles + installFlags="COPYDIR=$out" + ''; + } diff --git a/pkgs/games/quake3/wrapper/builder.sh b/pkgs/games/quake3/wrapper/builder.sh index 4a477bac56114..e4c91a39b8fb3 100644 --- a/pkgs/games/quake3/wrapper/builder.sh +++ b/pkgs/games/quake3/wrapper/builder.sh @@ -1,6 +1,5 @@ source $stdenv/setup - ensureDir $out/baseq3 for i in $paks; do if test -d "$paks/baseq3"; then @@ -8,20 +7,9 @@ for i in $paks; do fi done - -ensureDir $out/bin - -cat >$out/bin/quake3 <<EOF -#! $SHELL -e - -mesa=$mesa - -$(cat $mesaSwitch) - -exec $game/ioquake3.i386 \ - +set fs_basepath $out \ - +set r_allowSoftwareGL 1 \ - "\$@" -EOF - -chmod +x $out/bin/quake3 +# We add Mesa to the end of $LD_LIBRARY_PATH to provide fallback +# software rendering. GCC is needed so that libgcc_s.so can be found +# when Mesa is used. +makeWrapper $game/ioquake3.i386 $out/bin/quake3 \ + --suffix-each LD_LIBRARY_PATH ':' "$mesa/lib $gcc/lib" \ + --add-flags "+set fs_basepath $out +set r_allowSoftwareGL 1" diff --git a/pkgs/games/quake3/wrapper/default.nix b/pkgs/games/quake3/wrapper/default.nix index a15efc77c2cb5..84d93cefa21c9 100644 --- a/pkgs/games/quake3/wrapper/default.nix +++ b/pkgs/games/quake3/wrapper/default.nix @@ -1,11 +1,14 @@ -{stdenv, fetchurl, game, paks, mesa, name, description}: +{stdenv, fetchurl, game, paks, mesa, name, description, makeWrapper}: stdenv.mkDerivation { builder = ./builder.sh; - inherit game paks mesa name; + + buildInputs = [makeWrapper]; - mesaSwitch = ../../../build-support/opengl/mesa-switch.sh; + inherit game paks mesa name; + gcc = stdenv.gcc.gcc; + meta = { inherit description; }; diff --git a/pkgs/games/ut2004demo/default.nix b/pkgs/games/ut2004demo/default.nix index 1c8b42891a4b3..04efc0049dd01 100644 --- a/pkgs/games/ut2004demo/default.nix +++ b/pkgs/games/ut2004demo/default.nix @@ -18,7 +18,6 @@ let { builder = ./make-wrapper.sh; inherit raw mesa; inherit (xlibs) libX11 libXext; - mesaSwitch = ../../build-support/opengl/mesa-switch.sh; }; } diff --git a/pkgs/games/ut2004demo/make-wrapper.sh b/pkgs/games/ut2004demo/make-wrapper.sh index d42adf1af0696..5dbb451272adc 100644 --- a/pkgs/games/ut2004demo/make-wrapper.sh +++ b/pkgs/games/ut2004demo/make-wrapper.sh @@ -5,10 +5,6 @@ ensureDir $out/bin cat > $out/bin/ut2004demo <<EOF #! $SHELL -e -mesa=$mesa - -$(cat $mesaSwitch) - cd $raw/System LD_LIBRARY_PATH=$libX11/lib:$libXext/lib\${LD_LIBRARY_PATH:+:}\$LD_LIBRARY_PATH ./ut2004-bin "\$@" |