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.
This commit is contained in:
@@ -1,5 +1,5 @@
|
||||
{ stdenv, fetchFromGitHub, makeWrapper
|
||||
, cmake, llvmPackages, rapidjson }:
|
||||
, cmake, llvmPackages, rapidjson, runtimeShell }:
|
||||
|
||||
stdenv.mkDerivation rec {
|
||||
name = "ccls-${version}";
|
||||
@@ -17,7 +17,7 @@ stdenv.mkDerivation rec {
|
||||
|
||||
cmakeFlags = [ "-DSYSTEM_CLANG=ON" ];
|
||||
|
||||
shell = stdenv.shell;
|
||||
shell = runtimeShell;
|
||||
postFixup = ''
|
||||
# We need to tell ccls where to find the standard library headers.
|
||||
|
||||
|
||||
@@ -1,5 +1,6 @@
|
||||
{ fetchFromGitHub, makeWrapper
|
||||
, cmake, llvmPackages, ncurses }:
|
||||
, cmake, llvmPackages, ncurses
|
||||
, runtimeShell }:
|
||||
|
||||
let
|
||||
src = fetchFromGitHub {
|
||||
@@ -28,7 +29,7 @@ stdenv.mkDerivation rec {
|
||||
"-DCMAKE_OSX_DEPLOYMENT_TARGET=10.12"
|
||||
];
|
||||
|
||||
shell = stdenv.shell;
|
||||
shell = runtimeShell;
|
||||
postFixup = ''
|
||||
# We need to tell cquery where to find the standard library headers.
|
||||
|
||||
|
||||
@@ -14,7 +14,7 @@ with pkgs.stdenv.lib;
|
||||
|
||||
# the derivation. use language extensions specified by args
|
||||
ctagsWrapped = makeOverridable ( {args, name} : pkgs.writeScriptBin name ''
|
||||
#!${stdenv.shell}
|
||||
#!${pkgs.runtimeShell}
|
||||
exec ${pkgs.ctags}/bin/ctags ${concatStringsSep " " (map escapeShellArg args)} "$@"
|
||||
'') {
|
||||
args = let x = pkgs.ctagsWrapped; in concatLists [
|
||||
|
||||
@@ -1,5 +1,6 @@
|
||||
{ stdenv, fetchFromGitHub, popt, avahi, pkgconfig, python, gtk2, runCommand
|
||||
, gcc, autoconf, automake, which, procps, libiberty_static
|
||||
, runtimeShell
|
||||
, sysconfDir ? "" # set this parameter to override the default value $out/etc
|
||||
, static ? false
|
||||
}:
|
||||
@@ -53,7 +54,7 @@ let
|
||||
mkdir -p $out/bin
|
||||
if [ -x "${gcc.cc}/bin/gcc" ]; then
|
||||
cat > $out/bin/gcc << EOF
|
||||
#!${stdenv.shell}
|
||||
#!${runtimeShell}
|
||||
${extraConfig}
|
||||
exec ${distcc}/bin/distcc gcc "\$@"
|
||||
EOF
|
||||
@@ -61,7 +62,7 @@ let
|
||||
fi
|
||||
if [ -x "${gcc.cc}/bin/g++" ]; then
|
||||
cat > $out/bin/g++ << EOF
|
||||
#!${stdenv.shell}
|
||||
#!${runtimeShell}
|
||||
${extraConfig}
|
||||
exec ${distcc}/bin/distcc g++ "\$@"
|
||||
EOF
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
{ stdenv, fetchurl, jre, ctags, makeWrapper, coreutils, git }:
|
||||
{ stdenv, fetchurl, jre, ctags, makeWrapper, coreutils, git, runtimeShell }:
|
||||
|
||||
stdenv.mkDerivation rec {
|
||||
name = "opengrok-${version}";
|
||||
@@ -16,7 +16,7 @@ stdenv.mkDerivation rec {
|
||||
mkdir -p $out
|
||||
cp -a * $out/
|
||||
substituteInPlace $out/bin/OpenGrok --replace "/bin/uname" "${coreutils}/bin/uname"
|
||||
substituteInPlace $out/bin/Messages --replace "#!/bin/ksh" "#!${stdenv.shell}"
|
||||
substituteInPlace $out/bin/Messages --replace "#!/bin/ksh" "#!${runtimeShell}"
|
||||
wrapProgram $out/bin/OpenGrok \
|
||||
--prefix PATH : "${stdenv.lib.makeBinPath [ ctags git ]}" \
|
||||
--set JAVA_HOME "${jre}" \
|
||||
|
||||
@@ -9,7 +9,7 @@
|
||||
{ stdenv, fetchurl, unzip, glib, libSM, libICE, gtk2, libXext, libXft
|
||||
, fontconfig, libXrender, libXfixes, libX11, libXi, libXrandr, libXcursor
|
||||
, freetype, libXinerama, libxcb, zlib, pciutils
|
||||
, makeDesktopItem, xkeyboardconfig
|
||||
, makeDesktopItem, xkeyboardconfig, runtimeShell
|
||||
}:
|
||||
|
||||
let
|
||||
@@ -70,7 +70,7 @@ stdenv.mkDerivation rec {
|
||||
# Make wrapper script that uses the LD_PRELOAD library
|
||||
mkdir -p "$out/bin"
|
||||
cat > "$out/bin/saleae-logic" << EOF
|
||||
#!${stdenv.shell}
|
||||
#!${runtimeShell}
|
||||
export LD_PRELOAD="$out/lib/preload.so"
|
||||
export QT_XKB_CONFIG_ROOT="${xkeyboardconfig}/share/X11/xkb"
|
||||
export PATH="${pciutils}/bin:\$PATH"
|
||||
|
||||
Reference in New Issue
Block a user