nixpkgs/pkgs/games/ut2004demo/make-wrapper.sh
Eelco Dolstra 8e22f2f58b * Unreal Tournament 2004 Demo. Also a binary-only component.
An interesting complication is that we have to change the ELF type
  of the executable from `Linux' to `SVR4', otherwise the
  `ld-linux.so.2' trick to override the glibc used doesn't work
  (apparently `Linux' is not a recognised ELF type!).

  UT doesn't work with software Mesa, so right now we impurily use
  `/usr/lib/libGL.so'.  I cannot really test whether it works with
  hardware Mesa, since it barfs with an error about missing OpenGL
  extensions.  But that's probably because I'm testing this on an
  iBook over an SSH connection to a Linux machine.

svn path=/nixpkgs/trunk/; revision=1047
2004-06-09 18:06:29 +00:00

17 lines
290 B
Bash

. $stdenv/setup
mkdir $out
mkdir $out/bin
glibc=$(cat $NIX_GCC/nix-support/orig-glibc)
cat > $out/bin/ut2004demo <<EOF
#! $SHELL -e
cd $raw/System
LD_LIBRARY_PATH=$libX11/lib:$libXext/lib:/usr/lib:$mesa/lib $glibc/lib/ld-linux.so.2 ./ut2004-bin "\$@"
EOF
chmod +x $out/bin/ut2004demo