summary refs log tree commit diff
path: root/pkgs/tools/misc
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/tools/misc
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/tools/misc')
-rw-r--r--pkgs/tools/misc/fzf/default.nix4
-rw-r--r--pkgs/tools/misc/odroid-xu3-bootloader/default.nix4
-rw-r--r--pkgs/tools/misc/smc/default.nix4
-rw-r--r--pkgs/tools/misc/umlet/default.nix4
-rw-r--r--pkgs/tools/misc/xdummy/default.nix4
-rw-r--r--pkgs/tools/misc/xfstests/default.nix4
-rw-r--r--pkgs/tools/misc/zsh-autoenv/default.nix4
7 files changed, 14 insertions, 14 deletions
diff --git a/pkgs/tools/misc/fzf/default.nix b/pkgs/tools/misc/fzf/default.nix
index 08efe3e6e18..de211d1d1c4 100644
--- a/pkgs/tools/misc/fzf/default.nix
+++ b/pkgs/tools/misc/fzf/default.nix
@@ -1,4 +1,4 @@
-{ stdenv, ncurses, buildGoPackage, fetchFromGitHub, writeText }:
+{ stdenv, ncurses, buildGoPackage, fetchFromGitHub, writeText, runtimeShell }:
 
 buildGoPackage rec {
   name = "fzf-${version}";
@@ -47,7 +47,7 @@ buildGoPackage rec {
 
     cp -R $src/shell $bin/share/fzf
     cat <<SCRIPT > $bin/bin/fzf-share
-    #!${stdenv.shell}
+    #!${runtimeShell}
     # Run this script to find the fzf shared folder where all the shell
     # integration scripts are living.
     echo $bin/share/fzf
diff --git a/pkgs/tools/misc/odroid-xu3-bootloader/default.nix b/pkgs/tools/misc/odroid-xu3-bootloader/default.nix
index 3cce28df4f3..3896ca77a16 100644
--- a/pkgs/tools/misc/odroid-xu3-bootloader/default.nix
+++ b/pkgs/tools/misc/odroid-xu3-bootloader/default.nix
@@ -1,4 +1,4 @@
-{ stdenv, lib, fetchFromGitHub, coreutils, ubootOdroidXU3 }:
+{ stdenv, lib, fetchFromGitHub, coreutils, ubootOdroidXU3, runtimeShell }:
 
 stdenv.mkDerivation {
   name = "odroid-xu3-bootloader-2015-12-04";
@@ -17,7 +17,7 @@ stdenv.mkDerivation {
 
     install -Dm755 $src/sd_fuse/hardkernel_1mb_uboot/sd_fusing.1M.sh $out/bin/sd_fuse-xu3
     sed -i \
-      -e '1i#!${stdenv.shell}' \
+      -e '1i#!${runtimeShell}' \
       -e '1iPATH=${lib.makeBinPath [ coreutils ]}:$PATH' \
       -e '/set -x/d' \
       -e 's,.\/sd_fusing\.sh,sd_fuse-xu3,g' \
diff --git a/pkgs/tools/misc/smc/default.nix b/pkgs/tools/misc/smc/default.nix
index e0d1ff20835..0e84f738e80 100644
--- a/pkgs/tools/misc/smc/default.nix
+++ b/pkgs/tools/misc/smc/default.nix
@@ -1,4 +1,4 @@
-{ stdenv, fetchurl, jre }:
+{ stdenv, fetchurl, jre, runtimeShell }:
 
 stdenv.mkDerivation rec {
   name = "smc-6.6.3";
@@ -22,7 +22,7 @@ stdenv.mkDerivation rec {
     cp misc/smc.ico "$out/share/icons/"
 
     cat > "$out/bin/smc" << EOF
-    #!${stdenv.shell}
+    #!${runtimeShell}
     ${jre}/bin/java -jar "$out/share/java/Smc.jar" "\$@"
     EOF
     chmod a+x "$out/bin/smc"
diff --git a/pkgs/tools/misc/umlet/default.nix b/pkgs/tools/misc/umlet/default.nix
index c04c16ae1cc..9ac60ca8b13 100644
--- a/pkgs/tools/misc/umlet/default.nix
+++ b/pkgs/tools/misc/umlet/default.nix
@@ -1,4 +1,4 @@
-{ stdenv, fetchurl, jre, unzip }:
+{ stdenv, fetchurl, jre, unzip, runtimeShell }:
 
 stdenv.mkDerivation rec {
   major = "14";
@@ -20,7 +20,7 @@ stdenv.mkDerivation rec {
     cp -R * "$out/lib"
 
     cat > "$out/bin/umlet" << EOF
-    #!${stdenv.shell}
+    #!${runtimeShell}
 
     programDir="$out/lib"
     cd "\$programDir"
diff --git a/pkgs/tools/misc/xdummy/default.nix b/pkgs/tools/misc/xdummy/default.nix
index 8a411d89da5..bdcdc47ea13 100644
--- a/pkgs/tools/misc/xdummy/default.nix
+++ b/pkgs/tools/misc/xdummy/default.nix
@@ -1,4 +1,4 @@
-{ stdenv, writeText, writeScriptBin, xorg, xkeyboard_config }:
+{ stdenv, writeText, writeScriptBin, xorg, xkeyboard_config, runtimeShell }:
 
 let
   xorgConfig = writeText "dummy-xorg.conf" ''
@@ -73,7 +73,7 @@ let
   '';
 
 in writeScriptBin "xdummy" ''
-  #!${stdenv.shell}
+  #!${runtimeShell}
   exec ${xorg.xorgserver.out}/bin/Xorg \
     -noreset \
     -logfile /dev/null \
diff --git a/pkgs/tools/misc/xfstests/default.nix b/pkgs/tools/misc/xfstests/default.nix
index 7305013eb8b..3be931a362b 100644
--- a/pkgs/tools/misc/xfstests/default.nix
+++ b/pkgs/tools/misc/xfstests/default.nix
@@ -1,7 +1,7 @@
 { stdenv, acl, attr, autoconf, automake, bash, bc, coreutils, e2fsprogs
 , fetchgit, fio, gawk, keyutils, killall, lib, libaio, libcap, libtool
 , libuuid, libxfs, lvm2, openssl, perl, procps, quota
-, time, utillinux, which, writeScript, xfsprogs }:
+, time, utillinux, which, writeScript, xfsprogs, runtimeShell }:
 
 stdenv.mkDerivation {
   name = "xfstests-2018-04-11";
@@ -78,7 +78,7 @@ stdenv.mkDerivation {
   # wants to write temporary files there. So create a temporary
   # to run from and symlink the runtime files to it.
   wrapperScript = writeScript "xfstests-check" ''
-    #!${stdenv.shell}
+    #!${runtimeShell}
     set -e
     export RESULT_BASE="$(pwd)/results"
 
diff --git a/pkgs/tools/misc/zsh-autoenv/default.nix b/pkgs/tools/misc/zsh-autoenv/default.nix
index 589e6717c7d..61945266e13 100644
--- a/pkgs/tools/misc/zsh-autoenv/default.nix
+++ b/pkgs/tools/misc/zsh-autoenv/default.nix
@@ -1,4 +1,4 @@
-{ stdenv, fetchFromGitHub }:
+{ stdenv, fetchFromGitHub, runtimeShell }:
 
 stdenv.mkDerivation rec {
   name = "zsh-autoenv-${version}";
@@ -18,7 +18,7 @@ stdenv.mkDerivation rec {
     cp -R $src $out/share/zsh-autoenv
 
     cat <<SCRIPT > $out/bin/zsh-autoenv-share
-    #!${stdenv.shell}
+    #!${runtimeShell}
     # Run this script to find the fzf shared folder where all the shell
     # integration scripts are living.
     echo $out/share/zsh-autoenv