about summary refs log tree commit diff
path: root/pkgs/applications/science
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/applications/science
parent1233c8d9e9bc463899ed6a8cf0232e6bf36475ee (diff)
downloadnixlib-dadc7eb3297e6c2fb0c0e01149c8fcebd80770c1.tar
nixlib-dadc7eb3297e6c2fb0c0e01149c8fcebd80770c1.tar.gz
nixlib-dadc7eb3297e6c2fb0c0e01149c8fcebd80770c1.tar.bz2
nixlib-dadc7eb3297e6c2fb0c0e01149c8fcebd80770c1.tar.lz
nixlib-dadc7eb3297e6c2fb0c0e01149c8fcebd80770c1.tar.xz
nixlib-dadc7eb3297e6c2fb0c0e01149c8fcebd80770c1.tar.zst
nixlib-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/applications/science')
-rw-r--r--pkgs/applications/science/electronics/alliance/default.nix6
-rw-r--r--pkgs/applications/science/electronics/eagle/eagle7.nix4
-rw-r--r--pkgs/applications/science/logic/hol_light/default.nix4
-rw-r--r--pkgs/applications/science/logic/leo3/binary.nix4
-rw-r--r--pkgs/applications/science/math/sage/sage-src.nix3
5 files changed, 11 insertions, 10 deletions
diff --git a/pkgs/applications/science/electronics/alliance/default.nix b/pkgs/applications/science/electronics/alliance/default.nix
index 57e1e219b9aa..63bc0911d251 100644
--- a/pkgs/applications/science/electronics/alliance/default.nix
+++ b/pkgs/applications/science/electronics/alliance/default.nix
@@ -1,6 +1,6 @@
 { stdenv, fetchurl
 , xorgproto, motif, libX11, libXt, libXpm, bison
-, flex, automake, autoconf, libtool
+, flex, automake, autoconf, libtool, runtimeShell
 }:
 
 stdenv.mkDerivation rec {
@@ -39,12 +39,12 @@ stdenv.mkDerivation rec {
   '';
 
   allianceInstaller = ''
-    #!${stdenv.shell}
+    #!${runtimeShell}
     cp -v -r -n --no-preserve=mode  $out/etc/* /etc/ > /etc/alliance-install.log
   '';
 
   allianceUnInstaller = ''
-    #!${stdenv.shell}
+    #!${runtimeShell}
     awk '{print \$3}' /etc/alliance-install.log | xargs rm
     awk '{print \$3}' /etc/alliance-install.log | xargs rmdir
     rm /etc/alliance-install.log
diff --git a/pkgs/applications/science/electronics/eagle/eagle7.nix b/pkgs/applications/science/electronics/eagle/eagle7.nix
index d5720440f7cc..69b111562ab2 100644
--- a/pkgs/applications/science/electronics/eagle/eagle7.nix
+++ b/pkgs/applications/science/electronics/eagle/eagle7.nix
@@ -1,6 +1,6 @@
 { stdenv, fetchurl, makeDesktopItem, patchelf, zlib, freetype, fontconfig
 , openssl, libXrender, libXrandr, libXcursor, libX11, libXext, libXi
-, libxcb, cups, xkeyboardconfig
+, libxcb, cups, xkeyboardconfig, runtimeShell
 }:
 
 let
@@ -72,7 +72,7 @@ stdenv.mkDerivation rec {
     dynlinker="$(cat $NIX_CC/nix-support/dynamic-linker)"
     mkdir -p "$out"/bin
     cat > "$out"/bin/eagle << EOF
-    #!${stdenv.shell}
+    #!${runtimeShell}
     export LD_LIBRARY_PATH="${stdenv.cc.cc.lib}/lib:${libPath}"
     export LD_PRELOAD="$out/lib/eagle_fixer.so"
     export QT_XKB_CONFIG_ROOT="${xkeyboardconfig}/share/X11/xkb"
diff --git a/pkgs/applications/science/logic/hol_light/default.nix b/pkgs/applications/science/logic/hol_light/default.nix
index ffd25b6238b7..099e2102c517 100644
--- a/pkgs/applications/science/logic/hol_light/default.nix
+++ b/pkgs/applications/science/logic/hol_light/default.nix
@@ -1,4 +1,4 @@
-{ stdenv, fetchFromGitHub, ocaml, num, camlp5 }:
+{ stdenv, runtimeShell, fetchFromGitHub, ocaml, num, camlp5 }:
 
 let
   load_num =
@@ -11,7 +11,7 @@ let
 
   start_script =
     ''
-      #!${stdenv.shell}
+      #!${runtimeShell}
       cd $out/lib/hol_light
       exec ${ocaml}/bin/ocaml \
         -I \`${camlp5}/bin/camlp5 -where\` \
diff --git a/pkgs/applications/science/logic/leo3/binary.nix b/pkgs/applications/science/logic/leo3/binary.nix
index a3834dc70b6d..dcea9c27acb4 100644
--- a/pkgs/applications/science/logic/leo3/binary.nix
+++ b/pkgs/applications/science/logic/leo3/binary.nix
@@ -1,4 +1,4 @@
-{stdenv, fetchurl, openjdk}:
+{stdenv, fetchurl, openjdk, runtimeShell}:
 stdenv.mkDerivation rec {
   pname = "leo3";
   version = "1.2";
@@ -13,7 +13,7 @@ stdenv.mkDerivation rec {
   installPhase = ''
     mkdir -p "$out"/{bin,lib/java/leo3}
     cp "${jar}" "$out/lib/java/leo3/leo3.jar"
-    echo "#!${stdenv.shell}" > "$out/bin/leo3"
+    echo "#!${runtimeShell}" > "$out/bin/leo3"
     echo "'${openjdk}/bin/java' -jar '$out/lib/java/leo3/leo3.jar' \"\$@\""  > "$out/bin/leo3"
     chmod a+x "$out/bin/leo3"
   '';
diff --git a/pkgs/applications/science/math/sage/sage-src.nix b/pkgs/applications/science/math/sage/sage-src.nix
index b9d0a9ef4486..7302b5e337d0 100644
--- a/pkgs/applications/science/math/sage/sage-src.nix
+++ b/pkgs/applications/science/math/sage/sage-src.nix
@@ -1,6 +1,7 @@
 { stdenv
 , fetchFromGitHub
 , fetchpatch
+, runtimeShell
 }:
 
 # This file is responsible for fetching the sage source and adding necessary patches.
@@ -121,7 +122,7 @@ stdenv.mkDerivation rec {
       -e 's/sage-python23/python/g' \
       -i {} \;
 
-    echo '#!${stdenv.shell}
+    echo '#!${runtimeShell}
     python "$@"' > build/bin/sage-python23
 
     # Do not use sage-env-config (generated by ./configure).