about summary refs log tree commit diff
path: root/pkgs/games
diff options
context:
space:
mode:
authorJörg Thalheim <joerg@thalheim.io>2019-02-26 11:45:54 +0000
committerJörg Thalheim <joerg@thalheim.io>2019-02-26 14:10:49 +0000
commitdadc7eb3297e6c2fb0c0e01149c8fcebd80770c1 (patch)
tree9717b203342cd121abcdfde5ba8b66235c3ad67c /pkgs/games
parent1233c8d9e9bc463899ed6a8cf0232e6bf36475ee (diff)
treewide: use runtimeShell instead of stdenv.shell whenever possible
Whenever we create scripts that are installed to $out, we must use runtimeShell
in order to get the shell that can be executed on the machine we create the
package for. This is relevant for cross-compiling. The only use case for
stdenv.shell are scripts that are executed as part of the build system.
Usages in checkPhase are borderline however to decrease the likelyhood
of people copying the wrong examples, I decided to use runtimeShell as well.
Diffstat (limited to 'pkgs/games')
-rw-r--r--pkgs/games/andyetitmoves/default.nix4
-rw-r--r--pkgs/games/astromenace/default.nix4
-rw-r--r--pkgs/games/cataclysm-dda/common.nix4
-rw-r--r--pkgs/games/eduke32/default.nix4
-rw-r--r--pkgs/games/fsg/default.nix5
-rw-r--r--pkgs/games/oilrush/default.nix8
-rw-r--r--pkgs/games/openttd/default.nix4
-rw-r--r--pkgs/games/sauerbraten/default.nix6
-rw-r--r--pkgs/games/scummvm/games.nix4
-rw-r--r--pkgs/games/simutrans/default.nix5
-rw-r--r--pkgs/games/speed-dreams/default.nix4
-rw-r--r--pkgs/games/steam/chrootenv.nix9
-rw-r--r--pkgs/games/steam/steam.nix4
-rw-r--r--pkgs/games/tcl2048/default.nix4
-rw-r--r--pkgs/games/tibia/default.nix4
-rw-r--r--pkgs/games/tremulous/default.nix4
-rw-r--r--pkgs/games/trigger/default.nix5
-rw-r--r--pkgs/games/vessel/default.nix18
-rw-r--r--pkgs/games/worldofgoo/default.nix17
19 files changed, 60 insertions, 57 deletions
diff --git a/pkgs/games/andyetitmoves/default.nix b/pkgs/games/andyetitmoves/default.nix
index 123d4296c9738..d4ff86c424b1e 100644
--- a/pkgs/games/andyetitmoves/default.nix
+++ b/pkgs/games/andyetitmoves/default.nix
@@ -1,4 +1,4 @@
-{ stdenv, fetchurl, libvorbis, libogg, libtheora, SDL, libXft, SDL_image, zlib, libX11, libpng, openal, requireFile, commercialVersion ? false }:
+{ stdenv, fetchurl, libvorbis, libogg, libtheora, SDL, libXft, SDL_image, zlib, libX11, libpng, openal, runtimeShell, requireFile, commercialVersion ? false }:
 
 let plainName = "andyetitmoves";
     version   = "1.2.2";
@@ -50,7 +50,7 @@ stdenv.mkDerivation rec {
 
     patchelf --set-interpreter $(cat $NIX_CC/nix-support/dynamic-linker) --set-rpath $fullPath $out/opt/andyetitmoves/lib/$binName
     cat > $out/bin/$binName << EOF
-    #!${stdenv.shell}
+    #!${runtimeShell}
     cd $out/opt/andyetitmoves
     exec ./lib/$binName
     EOF
diff --git a/pkgs/games/astromenace/default.nix b/pkgs/games/astromenace/default.nix
index 91959a1c942b1..b2c86222f2b04 100644
--- a/pkgs/games/astromenace/default.nix
+++ b/pkgs/games/astromenace/default.nix
@@ -1,4 +1,4 @@
-{ fetchurl, stdenv, cmake, xlibsWrapper, libGLU_combined, SDL, openal, freealut, libogg, libvorbis }:
+{ fetchurl, stdenv, cmake, xlibsWrapper, libGLU_combined, SDL, openal, freealut, libogg, libvorbis, runtimeShell }:
 
 stdenv.mkDerivation rec {
   version = "1.3.2";
@@ -21,7 +21,7 @@ stdenv.mkDerivation rec {
     cp AstroMenace $out
     cp gamedata.vfs $out
     cat > $out/bin/AstroMenace << EOF
-    #!${stdenv.shell}
+    #!${runtimeShell}
     $out/AstroMenace --dir=$out
     EOF
     chmod 755 $out/bin/AstroMenace
diff --git a/pkgs/games/cataclysm-dda/common.nix b/pkgs/games/cataclysm-dda/common.nix
index 2c55911defcba..b39eb987e00d5 100644
--- a/pkgs/games/cataclysm-dda/common.nix
+++ b/pkgs/games/cataclysm-dda/common.nix
@@ -1,6 +1,6 @@
 { stdenv, fetchFromGitHub, pkgconfig, gettext, lua, ncurses
 , tiles, SDL2, SDL2_image, SDL2_mixer, SDL2_ttf, freetype, Cocoa
-, debug
+, debug, runtimeShell
 }:
 
 let
@@ -86,7 +86,7 @@ let
       mkdir $app/Contents/MacOS
       launcher=$app/Contents/MacOS/Cataclysm.sh
       cat << EOF > $launcher
-      #!${stdenv.shell}
+      #!${runtimeShell}
       $out/bin/cataclysm-tiles
       EOF
       chmod 555 $launcher
diff --git a/pkgs/games/eduke32/default.nix b/pkgs/games/eduke32/default.nix
index 859e503e10174..c51f014b179d2 100644
--- a/pkgs/games/eduke32/default.nix
+++ b/pkgs/games/eduke32/default.nix
@@ -1,5 +1,5 @@
 { stdenv, fetchurl, flac, gtk2, libvorbis, libvpx, makeDesktopItem, libGLU_combined, nasm
-, pkgconfig, SDL2, SDL2_mixer }:
+, pkgconfig, SDL2, SDL2_mixer, runtimeShell }:
 
 let
   year = "2015";
@@ -45,7 +45,7 @@ in stdenv.mkDerivation rec {
   installPhase = ''
     # Make wrapper script
     cat > eduke32-wrapper <<EOF
-    #!${stdenv.shell}
+    #!${runtimeShell}
 
     if [ "$EDUKE32_DATA_DIR" = "" ]; then
         EDUKE32_DATA_DIR=/var/lib/games/eduke32
diff --git a/pkgs/games/fsg/default.nix b/pkgs/games/fsg/default.nix
index 5c8d2541a01c2..d334439cafb84 100644
--- a/pkgs/games/fsg/default.nix
+++ b/pkgs/games/fsg/default.nix
@@ -1,4 +1,5 @@
-{ stdenv, fetchurl, gtk2, glib, pkgconfig, libGLU_combined, wxGTK, libX11, xorgproto }:
+{ stdenv, fetchurl, gtk2, glib, pkgconfig, libGLU_combined, wxGTK, libX11, xorgproto
+, runtimeShell }:
 
 stdenv.mkDerivation {
   name = "fsg-4.4";
@@ -24,7 +25,7 @@ stdenv.mkDerivation {
   installPhase = ''
     mkdir -p $out/bin $out/libexec
     cp sand $out/libexec
-    echo -e '#!${stdenv.shell}\nLC_ALL=C '$out'/libexec/sand "$@"' >$out/bin/fsg
+    echo -e '#!${runtimeShell}\nLC_ALL=C '$out'/libexec/sand "$@"' >$out/bin/fsg
     chmod a+x $out/bin/fsg
   '';
 
diff --git a/pkgs/games/oilrush/default.nix b/pkgs/games/oilrush/default.nix
index 2d636064205b2..1d56d86f53018 100644
--- a/pkgs/games/oilrush/default.nix
+++ b/pkgs/games/oilrush/default.nix
@@ -1,11 +1,11 @@
 { stdenv, config, fetchurl, libX11, libXext, libXinerama, libXrandr
-, libXrender, fontconfig, freetype, openal }:
+, libXrender, fontconfig, freetype, openal, runtimeShell }:
 
 let inherit (stdenv.lib) makeLibraryPath; in
 
 stdenv.mkDerivation {
   name = "oilrush";
-  src = 
+  src =
   let
     url = config.oilrush.url or null;
     sha256 = config.oilrush.sha256 or null;
@@ -54,7 +54,7 @@ stdenv.mkDerivation {
     cp -r * "$out/opt/oilrush"
     mkdir -p "$out/bin"
     cat << EOF > "$out/bin/oilrush"
-    #!${stdenv.shell}
+    #!${runtimeShell}
     LD_LIBRARY_PATH=.:${makeLibraryPath [ openal ]}:\$LD_LIBRARY_PATH
     cd "$out/opt/oilrush"
     exec ./launcher_$arch.sh "\$@"
@@ -66,7 +66,7 @@ stdenv.mkDerivation {
     longDescription = ''
       Oil Rush is a real-time naval strategy game based on group control. It
       combines the strategic challenge of a classical RTS with the sheer fun
-      of Tower Defense. 
+      of Tower Defense.
     '';
     homepage = http://oilrush-game.com/;
     license = stdenv.lib.licenses.unfree;
diff --git a/pkgs/games/openttd/default.nix b/pkgs/games/openttd/default.nix
index e5243aef2d3e5..237021e980104 100644
--- a/pkgs/games/openttd/default.nix
+++ b/pkgs/games/openttd/default.nix
@@ -1,7 +1,7 @@
 { stdenv, fetchurl, fetchzip, pkgconfig, SDL, libpng, zlib, xz, freetype, fontconfig
 , withOpenGFX ? true, withOpenSFX ? true, withOpenMSX ? true
 , withFluidSynth ? true, audioDriver ? "alsa", fluidsynth, soundfont-fluid, procps
-, writeScriptBin, makeWrapper
+, writeScriptBin, makeWrapper, runtimeShell
 }:
 
 let
@@ -21,7 +21,7 @@ let
   };
 
   playmidi = writeScriptBin "playmidi" ''
-    #!${stdenv.shell}
+    #!${runtimeShell}
     trap "${procps}/bin/pkill fluidsynth" EXIT
     ${fluidsynth}/bin/fluidsynth -a ${audioDriver} -i ${soundfont-fluid}/share/soundfonts/FluidR3_GM2-2.sf2 $*
   '';
diff --git a/pkgs/games/sauerbraten/default.nix b/pkgs/games/sauerbraten/default.nix
index f48736a56d601..3a9635f671245 100644
--- a/pkgs/games/sauerbraten/default.nix
+++ b/pkgs/games/sauerbraten/default.nix
@@ -1,5 +1,5 @@
 { stdenv, fetchsvn, libGLU_combined, SDL, SDL_image, SDL_mixer
-, libpng, zlib, libjpeg, imagemagick, libX11
+, libpng, zlib, libjpeg, imagemagick, libX11, runtimeShell
 }:
 
 stdenv.mkDerivation rec {
@@ -30,12 +30,12 @@ stdenv.mkDerivation rec {
     cp -rv packages $out/share/sauerbraten/
     cp -rv data $out/share/sauerbraten/
     cat > $out/bin/sauerbraten_server <<EOF
-    #!${stdenv.shell}
+    #!${runtimeShell}
     cd $out/share/sauerbraten
     ./sauer_server "\$@"
     EOF
     cat > $out/bin/sauerbraten_client <<EOF
-    #!${stdenv.shell}
+    #!${runtimeShell}
     cd $out/share/sauerbraten
     ./sauer_client "\$@"
     EOF
diff --git a/pkgs/games/scummvm/games.nix b/pkgs/games/scummvm/games.nix
index 1ccb351af4aba..a96250e7acb6d 100644
--- a/pkgs/games/scummvm/games.nix
+++ b/pkgs/games/scummvm/games.nix
@@ -1,5 +1,5 @@
 { stdenv, lib, fetchurl, makeDesktopItem, unzip, writeText
-, scummvm }:
+, scummvm, runtimeShell }:
 
 let
   desktopItem = name: short: long: description: makeDesktopItem {
@@ -13,7 +13,7 @@ let
   };
 
   run = name: short: code: writeText "${short}.sh" ''
-    #!${stdenv.shell} -eu
+    #!${runtimeShell} -eu
 
     exec ${scummvm}/bin/scummvm \
       --path=@out@/share/${name} \
diff --git a/pkgs/games/simutrans/default.nix b/pkgs/games/simutrans/default.nix
index ccece066cdc2b..a97338f6f204d 100644
--- a/pkgs/games/simutrans/default.nix
+++ b/pkgs/games/simutrans/default.nix
@@ -1,5 +1,5 @@
 { stdenv, fetchurl, pkgconfig, unzip, zlib, libpng, bzip2, SDL, SDL_mixer
-, buildEnv, config
+, buildEnv, config, runtimeShell
 }:
 
 let
@@ -95,7 +95,7 @@ let
     postBuild = ''
       rm "$out/bin" && mkdir "$out/bin"
       cat > "$out/bin/simutrans" <<EOF
-      #!${stdenv.shell}
+      #!${runtimeShell}
       cd "$out"/share/simutrans
       exec "${binaries}/bin/simutrans" -use_workdir "\''${extraFlagsArray[@]}" "\$@"
       EOF
@@ -167,4 +167,3 @@ let
   };
 
 in result
-
diff --git a/pkgs/games/speed-dreams/default.nix b/pkgs/games/speed-dreams/default.nix
index ad0c7441d7f4d..2556aa49b4c1e 100644
--- a/pkgs/games/speed-dreams/default.nix
+++ b/pkgs/games/speed-dreams/default.nix
@@ -1,6 +1,6 @@
 { fetchurl, stdenv, libGLU_combined, freeglut, libX11, plib, openal, freealut, libXrandr, xorgproto,
 libXext, libSM, libICE, libXi, libXt, libXrender, libXxf86vm, openscenegraph, expat,
-libpng, zlib, bash, SDL2, enet, libjpeg, cmake, pkgconfig, libvorbis}:
+libpng, zlib, bash, SDL2, enet, libjpeg, cmake, pkgconfig, libvorbis, runtimeShell }:
 
 stdenv.mkDerivation rec {
   version = "2.2.1-r6404";
@@ -52,7 +52,7 @@ stdenv.mkDerivation rec {
   postInstall = ''
     mkdir "$out/bin"
     for i in "$out"/games/*; do
-      echo '#!${stdenv.shell}' >> "$out/bin/$(basename "$i")"
+      echo '#!${runtimeShell}' >> "$out/bin/$(basename "$i")"
       echo "$i"' "$@"' >> "$out/bin/$(basename "$i")"
       chmod a+x "$out/bin/$(basename "$i")"
     done
diff --git a/pkgs/games/steam/chrootenv.nix b/pkgs/games/steam/chrootenv.nix
index 17f25e25e3f7e..4661cf7d80350 100644
--- a/pkgs/games/steam/chrootenv.nix
+++ b/pkgs/games/steam/chrootenv.nix
@@ -4,6 +4,7 @@
 , extraProfile ? "" # string to append to profile
 , nativeOnly ? false
 , runtimeOnly ? false
+, runtimeShell
 
 # DEPRECATED
 , withJava ? config.steam.java or false
@@ -35,7 +36,7 @@ let
            ++ lib.optionals (steam-runtime-wrapped-i686 != null) (map (x: "/steamrt/${steam-runtime-wrapped-i686.arch}/" + x) steam-runtime-wrapped-i686.libs);
 
   runSh = writeScript "run.sh" ''
-    #!${stdenv.shell}
+    #!${runtimeShell}
     runtime_paths="${lib.concatStringsSep ":" ldPath}"
     if [ "$1" == "--print-steam-runtime-library-paths" ]; then
       echo "$runtime_paths"
@@ -195,7 +196,7 @@ in buildFHSUserEnv rec {
   '' + extraProfile;
 
   runScript = writeScript "steam-wrapper.sh" ''
-    #!${stdenv.shell}
+    #!${runtimeShell}
     if [ -f /host/etc/NIXOS ]; then   # Check only useful on NixOS
       ${glxinfo-i686}/bin/glxinfo >/dev/null 2>&1
       # If there was an error running glxinfo, we know something is wrong with the configuration
@@ -204,7 +205,7 @@ in buildFHSUserEnv rec {
     **
     WARNING: Steam is not set up. Add the following options to /etc/nixos/configuration.nix
     and then run \`sudo nixos-rebuild switch\`:
-    { 
+    {
       hardware.opengl.driSupport32Bit = true;
       hardware.pulseaudio.support32Bit = true;
     }
@@ -226,7 +227,7 @@ in buildFHSUserEnv rec {
     inherit multiPkgs extraBuildCommands;
 
     runScript = writeScript "steam-run" ''
-      #!${stdenv.shell}
+      #!${runtimeShell}
       run="$1"
       if [ "$run" = "" ]; then
         echo "Usage: steam-run command-to-run args..." >&2
diff --git a/pkgs/games/steam/steam.nix b/pkgs/games/steam/steam.nix
index dd6e9a070b196..95493498f5e71 100644
--- a/pkgs/games/steam/steam.nix
+++ b/pkgs/games/steam/steam.nix
@@ -1,4 +1,4 @@
-{stdenv, fetchurl, traceDeps ? false}:
+{stdenv, fetchurl, runtimeShell, traceDeps ? false}:
 
 let
   traceLog = "/tmp/steam-trace-dependencies.log";
@@ -18,7 +18,7 @@ in stdenv.mkDerivation rec {
     rm $out/bin/steamdeps
     ${stdenv.lib.optionalString traceDeps ''
       cat > $out/bin/steamdeps <<EOF
-      #!${stdenv.shell}
+      #!${runtimeShell}
       echo \$1 >> ${traceLog}
       cat \$1 >> ${traceLog}
       echo >> ${traceLog}
diff --git a/pkgs/games/tcl2048/default.nix b/pkgs/games/tcl2048/default.nix
index 48fa0a3b51814..57e7217fcdbd2 100644
--- a/pkgs/games/tcl2048/default.nix
+++ b/pkgs/games/tcl2048/default.nix
@@ -1,4 +1,4 @@
-{ stdenv, fetchurl, tcl, tcllib }:
+{ stdenv, fetchurl, tcl, tcllib, runtimeShell }:
 
 stdenv.mkDerivation {
   name = "tcl2048-0.4.0";
@@ -14,7 +14,7 @@ stdenv.mkDerivation {
     mkdir -pv $out/bin
     cp $src $out/2048.tcl
     cat > $out/bin/2048 << EOF
-    #!${stdenv.shell}
+    #!${runtimeShell}
 
     # wrapper for tcl2048
     export TCLLIBPATH="${tcllib}/lib/tcllib${tcllib.version}"
diff --git a/pkgs/games/tibia/default.nix b/pkgs/games/tibia/default.nix
index cfef1ed0db2b1..02c55d7d06c90 100644
--- a/pkgs/games/tibia/default.nix
+++ b/pkgs/games/tibia/default.nix
@@ -1,4 +1,4 @@
-{ stdenv, fetchurl, glibc, libX11, libGLU_combined }:
+{ stdenv, fetchurl, glibc, libX11, runtimeShell, libGLU_combined }:
 
 with stdenv.lib;
 stdenv.mkDerivation {
@@ -38,7 +38,7 @@ stdenv.mkDerivation {
 
     # The wrapper script itself. We use $LD_LIBRARY_PATH for libGL.
     cat << EOF > "$out/bin/Tibia"
-    #!${stdenv.shell}
+    #!${runtimeShell}
     cd $out/res
     ${glibc.out}/lib/ld-linux.so.2 --library-path \$LD_LIBRARY_PATH ./Tibia "\$@"
     EOF
diff --git a/pkgs/games/tremulous/default.nix b/pkgs/games/tremulous/default.nix
index fd1a3e178d598..470856af90e69 100644
--- a/pkgs/games/tremulous/default.nix
+++ b/pkgs/games/tremulous/default.nix
@@ -1,4 +1,4 @@
-{ stdenv, fetchurl, unzip, libGLU_combined, libX11, SDL, openal }:
+{ stdenv, fetchurl, unzip, libGLU_combined, libX11, SDL, openal, runtimeShell }:
 stdenv.mkDerivation rec {
   name = "tremulous-${version}";
   version = "1.1.0";
@@ -49,7 +49,7 @@ stdenv.mkDerivation rec {
     for b in tremulous tremded
     do
         cat << EOF > $out/bin/$b
-    #!${stdenv.shell}
+    #!${runtimeShell}
     cd $out/opt/tremulous
     exec ./$b.$arch "\$@"
     EOF
diff --git a/pkgs/games/trigger/default.nix b/pkgs/games/trigger/default.nix
index 85157d8df189b..ae16510fdc536 100644
--- a/pkgs/games/trigger/default.nix
+++ b/pkgs/games/trigger/default.nix
@@ -1,4 +1,5 @@
-{ fetchurl, stdenv, SDL2, freealut, SDL2_image, openal, physfs, zlib, libGLU_combined, glew }:
+{ fetchurl, stdenv, runtimeShell
+, SDL2, freealut, SDL2_image, openal, physfs, zlib, libGLU_combined, glew }:
 
 stdenv.mkDerivation rec {
   name = "trigger-rally-0.6.5";
@@ -23,7 +24,7 @@ stdenv.mkDerivation rec {
   postInstall = ''
     mkdir -p $out/bin
     cat <<EOF > $out/bin/trigger-rally
-    #!${stdenv.shell}
+    #!${runtimeShell}
     exec $out/games/trigger-rally "$@"
     EOF
     chmod +x $out/bin/trigger-rally
diff --git a/pkgs/games/vessel/default.nix b/pkgs/games/vessel/default.nix
index 83fce64ca3295..483912bab45e9 100644
--- a/pkgs/games/vessel/default.nix
+++ b/pkgs/games/vessel/default.nix
@@ -1,14 +1,14 @@
-{ stdenv, requireFile, SDL, libpulseaudio, alsaLib }:
+{ stdenv, requireFile, SDL, libpulseaudio, alsaLib, runtimeShell }:
 
 stdenv.mkDerivation rec {
   name = "vessel-12082012";
 
-  goBuyItNow = '' 
+  goBuyItNow = ''
     We cannot download the full version automatically, as you require a license.
     Once you bought a license, you need to add your downloaded version to the nix store.
     You can do this by using "nix-prefetch-url file://\$PWD/${name}-bin" in the
     directory where you saved it.
-  ''; 
+  '';
 
   src = if (stdenv.isi686) then
     requireFile {
@@ -20,7 +20,7 @@ stdenv.mkDerivation rec {
   phases = "installPhase";
   ld_preload = ./isatty.c;
 
-  libPath = stdenv.lib.makeLibraryPath [ stdenv.cc.cc stdenv.cc.libc ] 
+  libPath = stdenv.lib.makeLibraryPath [ stdenv.cc.cc stdenv.cc.libc ]
     + ":" + stdenv.lib.makeLibraryPath [ SDL libpulseaudio alsaLib ] ;
 
   installPhase = ''
@@ -30,11 +30,11 @@ stdenv.mkDerivation rec {
     # allow scripting of the mojoinstaller
     gcc -fPIC -shared -o isatty.so $ld_preload
 
-    echo @@@ 
+    echo @@@
     echo @@@ this next step appears to hang for a while
-    echo @@@ 
+    echo @@@
 
-    # if we call ld.so $(bin) we don't need to set the ELF interpreter, and save a patchelf step. 
+    # if we call ld.so $(bin) we don't need to set the ELF interpreter, and save a patchelf step.
     LD_PRELOAD=./isatty.so $(cat $NIX_CC/nix-support/dynamic-linker) $src << IM_A_BOT
     n
     $out/libexec/strangeloop/vessel/
@@ -45,7 +45,7 @@ stdenv.mkDerivation rec {
     rm $out/libexec/strangeloop/vessel/x86/libstdc++*
 
     # props to Ethan Lee (the Vessel porter) for understanding
-    # how $ORIGIN works in rpath. There is hope for humanity. 
+    # how $ORIGIN works in rpath. There is hope for humanity.
     patchelf \
       --interpreter "$(cat $NIX_CC/nix-support/dynamic-linker)" \
       --set-rpath $libPath:$out/libexec/strangeloop/vessel/x86/ \
@@ -59,7 +59,7 @@ stdenv.mkDerivation rec {
     done
 
     cat > $out/bin/Vessel << EOW
-    #!${stdenv.shell}
+    #!${runtimeShell}
     cd $out/libexec/strangeloop/vessel/
     exec ./x86/vessel.x86
     EOW
diff --git a/pkgs/games/worldofgoo/default.nix b/pkgs/games/worldofgoo/default.nix
index 97bfd9e730c77..7d8380e9f7cea 100644
--- a/pkgs/games/worldofgoo/default.nix
+++ b/pkgs/games/worldofgoo/default.nix
@@ -1,25 +1,26 @@
 { stdenv, requireFile
 , libX11, libXext, libXau, libxcb, libXdmcp , SDL, SDL_mixer, libvorbis, libGLU_combined
+, runtimeShell
 , demo ? false }:
 
 # TODO: add i686 support
 
 stdenv.mkDerivation rec {
-  name = if demo 
+  name = if demo
     then "WorldOfGooDemo-1.41"
     else "WorldofGoo-1.41";
 
   arch = if stdenv.hostPlatform.system == "x86_64-linux" then "supported"
     else throw "Sorry. World of Goo only is only supported on x86_64 now.";
 
-  goBuyItNow = '' 
+  goBuyItNow = ''
     We cannot download the full version automatically, as you require a license.
     Once you bought a license, you need to add your downloaded version to the nix store.
     You can do this by using "nix-prefetch-url file://\$PWD/WorldOfGooSetup.1.41.tar.gz" in the
     directory where you saved it.
 
-    Or you can install the demo version: 'nix-env -i -A pkgs.worldofgoo_demo'. 
-  ''; 
+    Or you can install the demo version: 'nix-env -i -A pkgs.worldofgoo_demo'.
+  '';
 
   getTheDemo = ''
     We cannot download the demo version automatically. Please go to
@@ -28,8 +29,8 @@ stdenv.mkDerivation rec {
     directory where you saved it.
   '';
 
-  src = if demo 
-    then 
+  src = if demo
+    then
       requireFile {
          message = getTheDemo;
          name = "WorldOfGooDemo.1.41.tar.gz";
@@ -45,7 +46,7 @@ stdenv.mkDerivation rec {
   phases = "unpackPhase installPhase";
 
   # XXX: stdenv.lib.makeLibraryPath doesn't pick up /lib64
-  libPath = stdenv.lib.makeLibraryPath [ stdenv.cc.cc stdenv.cc.libc ] 
+  libPath = stdenv.lib.makeLibraryPath [ stdenv.cc.cc stdenv.cc.libc ]
     + ":" + stdenv.lib.makeLibraryPath [libX11 libXext libXau libxcb libXdmcp SDL SDL_mixer libvorbis libGLU_combined ]
     + ":" + stdenv.cc.cc + "/lib64";
 
@@ -60,7 +61,7 @@ stdenv.mkDerivation rec {
     #makeWrapper doesn't do cd. :(
 
     cat > $out/bin/WorldofGoo << EOF
-    #!${stdenv.shell}
+    #!${runtimeShell}
     cd $out/libexec/2dboy/WorldOfGoo
     exec ./WorldOfGoo.bin64
     EOF