summary refs log tree commit diff
path: root/pkgs/games/vessel
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/vessel
parent1233c8d9e9bc463899ed6a8cf0232e6bf36475ee (diff)
downloadnixpkgs-dadc7eb3297e6c2fb0c0e01149c8fcebd80770c1.tar
nixpkgs-dadc7eb3297e6c2fb0c0e01149c8fcebd80770c1.tar.gz
nixpkgs-dadc7eb3297e6c2fb0c0e01149c8fcebd80770c1.tar.bz2
nixpkgs-dadc7eb3297e6c2fb0c0e01149c8fcebd80770c1.tar.lz
nixpkgs-dadc7eb3297e6c2fb0c0e01149c8fcebd80770c1.tar.xz
nixpkgs-dadc7eb3297e6c2fb0c0e01149c8fcebd80770c1.tar.zst
nixpkgs-dadc7eb3297e6c2fb0c0e01149c8fcebd80770c1.zip
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/vessel')
-rw-r--r--pkgs/games/vessel/default.nix18
1 files changed, 9 insertions, 9 deletions
diff --git a/pkgs/games/vessel/default.nix b/pkgs/games/vessel/default.nix
index 83fce64ca32..483912bab45 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