Merge pull request #56408 from Mic92/runtime-shell

treewide: use runtimeShell instead of stdenv.shell whenever possible
This commit is contained in:
John Ericson 2019-02-26 18:04:27 -05:00 committed by GitHub
commit 8293ab8461
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
131 changed files with 326 additions and 294 deletions

View File

@ -47,7 +47,7 @@ buildImage {
contents = pkgs.redis; <co xml:id='ex-dockerTools-buildImage-6' />
runAsRoot = '' <co xml:id='ex-dockerTools-buildImage-runAsRoot' />
#!${stdenv.shell}
#!${pkgs.runtimeShell}
mkdir -p /data
'';
@ -544,7 +544,7 @@ buildImage {
name = "shadow-basic";
runAsRoot = ''
#!${stdenv.shell}
#!${pkgs.runtimeShell}
${shadowSetup}
groupadd -r redis
useradd -r -g redis redis

View File

@ -1,4 +1,4 @@
{ stdenv, fetchFromGitHub, spotify, xorg }:
{ stdenv, fetchFromGitHub, spotify, xorg, runtimeShell }:
stdenv.mkDerivation rec {
name = "spotifywm-unstable-${version}";
version = "2016-11-28";
@ -15,7 +15,7 @@ stdenv.mkDerivation rec {
propagatedBuildInputs = [ spotify ];
installPhase = ''
echo "#!${stdenv.shell}" > spotifywm
echo "#!${runtimeShell}" > spotifywm
echo "LD_PRELOAD="$out/lib/spotifywm.so" ${spotify}/bin/spotify \$*" >> spotifywm
install -Dm644 spotifywm.so $out/lib/spotifywm.so
install -Dm755 spotifywm $out/bin/spotifywm

View File

@ -1,4 +1,4 @@
{ stdenv, appimage-run, fetchurl }:
{ stdenv, appimage-run, fetchurl, runtimeShell }:
let
version = "3.0.6";
@ -29,7 +29,7 @@ stdenv.mkDerivation rec {
installPhase = ''
mkdir -p $out/{bin,share}
cp $src $out/share/standardNotes.AppImage
echo "#!${stdenv.shell}" > $out/bin/standardnotes
echo "#!${runtimeShell}" > $out/bin/standardnotes
echo "${appimage-run}/bin/appimage-run $out/share/standardNotes.AppImage" >> $out/bin/standardnotes
chmod +x $out/bin/standardnotes $out/share/standardNotes.AppImage
'';

View File

@ -1,6 +1,6 @@
{buildVersion, x32sha256, x64sha256}:
{ fetchurl, stdenv, glib, xorg, cairo, gtk2, gtk3, pango, makeWrapper, wrapGAppsHook, openssl, bzip2,
{ fetchurl, stdenv, glib, xorg, cairo, gtk2, gtk3, pango, makeWrapper, wrapGAppsHook, openssl, bzip2, runtimeShell,
pkexecPath ? "/run/wrappers/bin/pkexec", libredirect,
gksuSupport ? false, gksu, unzip, zip, bash}:
@ -115,7 +115,7 @@ in stdenv.mkDerivation (rec {
mkdir -p $out/bin
cat > $out/bin/subl <<-EOF
#!${stdenv.shell}
#!${runtimeShell}
exec $sublime/sublime_text "\$@"
EOF
chmod +x $out/bin/subl

View File

@ -7,6 +7,7 @@
, vimPlugins
, makeWrapper
, wrapGAppsHook
, runtimeShell
# apple frameworks
, CoreServices, CoreData, Cocoa, Foundation, libobjc, cf-private
@ -157,7 +158,7 @@ in stdenv.mkDerivation rec {
rewrap () {
rm -f "$out/bin/$1"
echo -e '#!${stdenv.shell}\n"'"$out/bin/vim"'" '"$2"' "$@"' > "$out/bin/$1"
echo -e '#!${runtimeShell}\n"'"$out/bin/vim"'" '"$2"' "$@"' > "$out/bin/$1"
chmod a+x "$out/bin/$1"
}

View File

@ -1,4 +1,4 @@
{stdenv, fetchurl, jre}:
{ stdenv, fetchurl, jre, runtimeShell }:
stdenv.mkDerivation rec {
name = "alchemy-${version}";
@ -15,7 +15,7 @@ stdenv.mkDerivation rec {
mkdir -p $out/bin $out/share
cp -a . $out/share/alchemy
cat >> $out/bin/alchemy << EOF
#!${stdenv.shell}
#!${runtimeShell}
cd $out/share/alchemy
${jre}/bin/java -jar Alchemy.jar "$@"
EOF

View File

@ -1,5 +1,6 @@
{ stdenv, fetchurl, callPackage, libpng12, imagemagick,
autoreconfHook, glib, pstoedit, pkgconfig, gettext, gd, darwin }:
{ stdenv, fetchurl, callPackage, libpng12, imagemagick
, autoreconfHook, glib, pstoedit, pkgconfig, gettext, gd, darwin
, runtimeShell }:
# TODO: Figure out why the resultant binary is somehow linked against
# libpng16.so.16 rather than libpng12.
@ -51,7 +52,7 @@ stdenv.mkDerivation rec {
# pstoedit-config no longer exists, it was replaced with pkg-config
mkdir wrappers
cat >wrappers/pstoedit-config <<'EOF'
#!${stdenv.shell}
#!${runtimeShell}
# replace --version with --modversion for pkg-config
args=''${@/--version/--modversion}
exec pkg-config pstoedit "''${args[@]}"

View File

@ -1,4 +1,4 @@
{ stdenv, fetchurl, makeDesktopItem, unzip, jre }:
{ stdenv, fetchurl, makeDesktopItem, unzip, jre, runtimeShell }:
stdenv.mkDerivation rec {
name = "swingsane-${version}";
@ -16,7 +16,7 @@ stdenv.mkDerivation rec {
installPhase = let
execWrapper = ''
#!${stdenv.shell}
#!${runtimeShell}
exec ${jre}/bin/java -jar $out/share/java/swingsane/swingsane-${version}.jar "$@"
'';

View File

@ -1,4 +1,4 @@
{ fetchurl, stdenv, erlang, cl, libGL, libGLU }:
{ fetchurl, stdenv, erlang, cl, libGL, libGLU, runtimeShell }:
stdenv.mkDerivation rec {
name = "wings-2.2.1";
@ -28,7 +28,7 @@ stdenv.mkDerivation rec {
cp ebin/* $out/lib/${name}/ebin
cp -R textures shaders plugins $out/lib/$name
cat << EOF > $out/bin/wings
#!${stdenv.shell}
#!${runtimeShell}
${erlang}/bin/erl \
-pa $out/lib/${name}/ebin -run wings_start start_halt "$@"
EOF
@ -43,4 +43,3 @@ stdenv.mkDerivation rec {
platforms = with stdenv.lib.platforms; linux;
};
}

View File

@ -1,4 +1,4 @@
{stdenv, fetchurl, jre, unzip}:
{ stdenv, fetchurl, jre, unzip, runtimeShell }:
stdenv.mkDerivation rec {
version = "0.9.0";
pname = "zgrviewer";
@ -16,7 +16,7 @@ stdenv.mkDerivation rec {
cp -r target/* "$out/share/java/zvtm/"
echo '#!${stdenv.shell}' > "$out/bin/zgrviewer"
echo '#!${runtimeShell}' > "$out/bin/zgrviewer"
echo "${jre}/lib/openjdk/jre/bin/java -jar '$out/share/java/zvtm/zgrviewer-${version}.jar' \"\$@\"" >> "$out/bin/zgrviewer"
chmod a+x "$out/bin/zgrviewer"
'';

View File

@ -1,4 +1,4 @@
{ stdenv, fetchurl, unzip, mono, avrdude, gtk2, xdg_utils }:
{ stdenv, runtimeShell, fetchurl, unzip, mono, avrdude, gtk2, xdg_utils }:
stdenv.mkDerivation rec {
name = "avrdudess-2.2.20140102";
@ -19,7 +19,7 @@ stdenv.mkDerivation rec {
unzip "$src" -d "$out/avrdudess"
cat >> "$out/bin/avrdudess" << __EOF__
#!${stdenv.shell}
#!${runtimeShell}
export LD_LIBRARY_PATH="${stdenv.lib.makeLibraryPath [gtk2 mono]}"
# We need PATH from user env for xdg-open to find its tools, which
# typically depend on the currently running desktop environment.

View File

@ -1,4 +1,4 @@
{ stdenv, lib, fetchurl, python, pythonPackages, unzip }:
{ stdenv, runtimeShell, lib, fetchurl, python, pythonPackages, unzip }:
# This package uses a precompiled "binary" distribution of CuraByDagoma,
# distributed by the editor.
@ -44,7 +44,7 @@ stdenv.mkDerivation rec {
mkdir $out/bin
cat > $out/bin/curabydago <<EOF
#!${stdenv.shell}
#!${runtimeShell}
export PYTHONPATH=$PYTHONPATH
${python.out}/bin/python $out/curabydago/cura.py
EOF

View File

@ -1,12 +1,12 @@
{ stdenv, writeScript, fetchFromGitHub
, libGL, libX11, libXext, python3, libXrandr, libXrender, libpulseaudio, libXcomposite
, enableGlfw ? false, glfw }:
, enableGlfw ? false, glfw, runtimeShell }:
let
inherit (stdenv.lib) optional makeLibraryPath;
wrapperScript = writeScript "glava" ''
#!${stdenv.shell}
#!${runtimeShell}
case "$1" in
--copy-config)
# The binary would symlink it, which won't work in Nix because the

View File

@ -1,4 +1,4 @@
{ stdenv }:
{ stdenv, runtimeShell }:
stdenv.mkDerivation rec {
name = "example-unfree-package-${version}";
@ -9,7 +9,7 @@ stdenv.mkDerivation rec {
installPhase = ''
mkdir -p $out/bin
cat > $out/bin/hello-unfree << EOF
#!${stdenv.shell}
#!${runtimeShell}
echo "Hello, you are running an unfree system!"
EOF
chmod +x $out/bin/hello-unfree

View File

@ -1,4 +1,4 @@
{ stdenv, fetchurl, java }:
{ stdenv, fetchurl, java, runtimeShell }:
stdenv.mkDerivation rec {
pname = "jbidwatcher";
@ -21,7 +21,7 @@ stdenv.mkDerivation rec {
installPhase = ''
mkdir -p "$out/bin"
echo > "$out/bin/${pname}" "#!${stdenv.shell}"
echo > "$out/bin/${pname}" "#!${runtimeShell}"
echo >>"$out/bin/${pname}" "${java}/bin/java -Xmx512m -jar ${jarfile}"
chmod +x "$out/bin/${pname}"
install -D -m644 ${src} ${jarfile}

View File

@ -1,4 +1,4 @@
{ stdenv, python36Packages, fetchFromGitHub, libxcb, mtools, p7zip, parted, procps, utillinux, qt5 }:
{ stdenv, python36Packages, fetchFromGitHub, libxcb, mtools, p7zip, parted, procps, utillinux, qt5, runtimeShell }:
python36Packages.buildPythonApplication rec {
pname = "multibootusb";
name = "${pname}-${version}";
@ -40,7 +40,7 @@ python36Packages.buildPythonApplication rec {
mkdir "$out/bin"
cat > "$out/bin/${pname}" <<EOF
#!${stdenv.shell}
#!${runtimeShell}
cd "$share"
export PYTHONPATH="$PYTHONPATH:$share"
export PATH="$PATH:${parted}/bin:${procps}/bin"

View File

@ -1,4 +1,4 @@
{ stdenv, fetchgit, electron } :
{ stdenv, fetchgit, electron, runtimeShell } :
stdenv.mkDerivation rec {
name = "nix-tour-${version}";
@ -19,7 +19,7 @@ stdenv.mkDerivation rec {
mkdir -p $out/share
cp -R * $out/share
chmod 0755 $out/share/ -R
echo "#!${stdenv.shell}" > $out/bin/nix-tour
echo "#!${runtimeShell}" > $out/bin/nix-tour
echo "cd $out/share/" >> $out/bin/nix-tour
echo "${electron}/bin/electron $out/share/electron-main.js" >> $out/bin/nix-tour
chmod 0755 $out/bin/nix-tour

View File

@ -1,4 +1,4 @@
{stdenv, fetchurl, unzip}:
{ stdenv, fetchurl, unzip, runtimeShell }:
stdenv.mkDerivation {
name = "openjump-1.3.1";
@ -17,7 +17,7 @@ stdenv.mkDerivation {
s=$out/bin/OpenJump
dir=$(echo $out/openjump-*)
cat >> $s << EOF
#!${stdenv.shell}
#!${runtimeShell}
cd $dir/bin
exec ${stdenv.shell} openjump.sh
EOF

View File

@ -1,4 +1,4 @@
{ stdenv, lib, fetchzip }:
{ stdenv, runtimeShell, lib, fetchzip }:
stdenv.mkDerivation rec {
name = "terminal-notifier-${version}";
@ -18,7 +18,7 @@ stdenv.mkDerivation rec {
mkdir -p $out/bin
cp -r terminal-notifier.app $out/Applications
cat >$out/bin/terminal-notifier <<EOF
#!${stdenv.shell}
#!${runtimeShell}
cd $out/Applications/terminal-notifier.app
exec ./Contents/MacOS/terminal-notifier "\$@"
EOF

View File

@ -1,4 +1,4 @@
{ stdenv, fetchurl }:
{ stdenv, fetchurl, runtimeShell }:
stdenv.mkDerivation {
name = "thinkingrock-binary-2.2.1";
@ -24,7 +24,7 @@ stdenv.mkDerivation {
mkdir -p $out/{nix-support/tr-files,bin}
cp -r . $out/nix-support/tr-files
cat >> $out/bin/thinkingrock << EOF
#!${stdenv.shell}
#!${runtimeShell}
exec $out/nix-support/tr-files/bin/tr "$@"
EOF
chmod +x $out/bin/thinkingrock

View File

@ -1,4 +1,4 @@
{ stdenv, fetchurl, jre }:
{ stdenv, fetchurl, jre, runtimeShell }:
stdenv.mkDerivation rec {
name = "vue-${version}";
@ -13,7 +13,7 @@ stdenv.mkDerivation rec {
installPhase = ''
mkdir -p "$out"/{share/vue,bin}
cp ${src} "$out/share/vue/vue.jar"
echo '#!${stdenv.shell}' >> "$out/bin/vue"
echo '#!${runtimeShell}' >> "$out/bin/vue"
echo '${jre}/bin/java -jar "'"$out/share/vue/vue.jar"'" "$@"' >> "$out/bin/vue"
chmod a+x "$out/bin/vue"
'';

View File

@ -8,6 +8,7 @@
, gnugrep
, curl
, gnupg
, runtimeShell
, baseName ? "firefox"
, basePath ? "pkgs/applications/networking/browsers/firefox-bin"
, baseUrl
@ -18,7 +19,7 @@ let
channel != "release";
in writeScript "update-${name}" ''
#!${stdenv.shell}
#!${runtimeShell}
PATH=${coreutils}/bin:${gnused}/bin:${gnugrep}/bin:${xidel}/bin:${curl}/bin:${gnupg}/bin
set -eux
pushd ${basePath}

View File

@ -8,13 +8,14 @@
, gnugrep
, curl
, attrPath
, runtimeShell
, baseUrl ? "http://archive.mozilla.org/pub/firefox/releases/"
, versionSuffix ? ""
, versionKey ? "version"
}:
writeScript "update-${attrPath}" ''
#!${stdenv.shell}
#!${runtimeShell}
PATH=${lib.makeBinPath [ common-updater-scripts coreutils curl gnugrep gnused xidel ]}
url=${baseUrl}

View File

@ -1,5 +1,6 @@
{ stdenv, fetchgit, bash, libconfig, libevent, openssl,
readline, zlib, lua5_2, python, pkgconfig, jansson
{ stdenv, fetchgit, bash, libconfig, libevent, openssl
, readline, zlib, lua5_2, python, pkgconfig, jansson
, runtimeShell
}:
stdenv.mkDerivation rec {
@ -20,7 +21,7 @@ stdenv.mkDerivation rec {
cp ./bin/telegram-cli $out/bin/telegram-wo-key
cp ./tg-server.pub $out/
cat > $out/bin/telegram-cli <<EOF
#!${stdenv.shell}
#!${runtimeShell}
$out/bin/telegram-wo-key -k $out/tg-server.pub "\$@"
EOF
chmod +x $out/bin/telegram-cli

View File

@ -1,5 +1,5 @@
{ stdenv, lib, runCommand, writeScriptBin, buildEnv
, pythonPackages, perlPackages
, pythonPackages, perlPackages, runtimeShell
}:
weechat:
@ -60,7 +60,7 @@ let
in "${scripts};${init}";
mkWeechat = bin: (writeScriptBin bin ''
#!${stdenv.shell}
#!${runtimeShell}
export WEECHAT_EXTRA_LIBDIR=${pluginsDir}
${lib.concatMapStringsSep "\n" (p: lib.optionalString (p ? extraEnv) p.extraEnv) plugins}
exec ${weechat}/bin/${bin} "$@" --run-command ${lib.escapeShellArg init}

View File

@ -1,4 +1,4 @@
{ stdenv, fetchurl, makeWrapper, unzip, jre }:
{ stdenv, fetchurl, makeWrapper, unzip, jre, runtimeShell }:
let
version = "1.9";
@ -20,7 +20,7 @@ in stdenv.mkDerivation rec {
mv $dir/${uname}/* $dir
rmdir $dir/${uname}
cat <<_EOF > $out/bin/msgviewer
#!${stdenv.shell} -eu
#!${runtimeShell} -eu
exec ${stdenv.lib.getBin jre}/bin/java -jar $dir/MSGViewer.jar "\$@"
_EOF
chmod 755 $out/bin/msgviewer

View File

@ -1,11 +1,11 @@
{ stdenv, fetchFromGitHub, gettext, makeWrapper, tcl, which, writeScript
, ncurses, perl , cyrus_sasl, gss, gpgme, kerberos, libidn, libxml2, notmuch, openssl
, lmdb, libxslt, docbook_xsl, docbook_xml_dtd_42, mailcap
, lmdb, libxslt, docbook_xsl, docbook_xml_dtd_42, mailcap, runtimeShell
}:
let
muttWrapper = writeScript "mutt" ''
#!${stdenv.shell} -eu
#!${runtimeShell} -eu
echo 'The neomutt project has renamed the main binary from `mutt` to `neomutt`.'
echo ""

View File

@ -32,6 +32,7 @@
, autorunLinkHandler ? true
# Update script
, writeScript
, runtimeShell
}:
let
@ -130,7 +131,7 @@ stdenv.mkDerivation {
dontStrip = true;
dontPatchElf = true;
updateScript = import ./update.nix { inherit stdenv writeScript; };
updateScript = import ./update.nix { inherit stdenv writeScript runtimeShell; };
meta = with stdenv.lib; {
homepage = http://www.mendeley.com;

View File

@ -1,7 +1,7 @@
{ stdenv, writeScript }:
{ stdenv, writeScript, runtimeShell }:
writeScript "update-mendeley" ''
#!${stdenv.shell}
#!${runtimeShell}
function follow() {
local URL=$1
while true; do

View File

@ -1,5 +1,6 @@
{ stdenv, fetchurl, patchelf, coreutils, pcsclite
, zlib, glib, gdk_pixbuf, gtk2, cairo, pango, libX11, atk, openssl }:
, zlib, glib, gdk_pixbuf, gtk2, cairo, pango, libX11, atk, openssl
, runtimeShell }:
let
libPath = stdenv.lib.makeLibraryPath [
@ -38,7 +39,7 @@ stdenv.mkDerivation rec {
mkdir "$out/bin"
cat > $out/bin/moneyplex <<EOF
#!${stdenv.shell}
#!${runtimeShell}
if [ -z "\$XDG_DATA_HOME" ]; then
MDIR=\$HOME/.local/share/moneyplex

View File

@ -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

View File

@ -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"

View File

@ -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\` \

View File

@ -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"
'';

View File

@ -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).

View File

@ -1,10 +1,10 @@
{ stdenv, lib, fetchurl, writeScript, cdrtools, dvdauthor, ffmpeg, imagemagick, lame, mjpegtools, sox, transcode, vorbis-tools }:
{ stdenv, lib, fetchurl, writeScript, cdrtools, dvdauthor, ffmpeg, imagemagick, lame, mjpegtools, sox, transcode, vorbis-tools, runtimeShell }:
let
binPath = lib.makeBinPath [ cdrtools dvdauthor ffmpeg imagemagick lame mjpegtools sox transcode vorbis-tools ];
wrapper = writeScript "dvd-slideshow.sh" ''
#!${stdenv.shell}
#!${runtimeShell}
# wrapper script for dvd-slideshow programs
export PATH=${binPath}:$PATH

View File

@ -23,7 +23,8 @@
writeScript,
writeText,
closureInfo,
substituteAll
substituteAll,
runtimeShell
}:
# WARNING: this API is unstable and may be subject to backwards-incompatible changes in the future.
@ -119,7 +120,7 @@ rec {
export PATH=${shadow}/bin:$PATH
mkdir -p /etc/pam.d
if [[ ! -f /etc/passwd ]]; then
echo "root:x:0:0::/root:${stdenv.shell}" > /etc/passwd
echo "root:x:0:0::/root:${runtimeShell}" > /etc/passwd
echo "root:!x:::::::" > /etc/shadow
fi
if [[ ! -f /etc/group ]]; then
@ -261,7 +262,7 @@ rec {
# things like `ls` or `echo` will be missing.
shellScript = name: text:
writeScript name ''
#!${stdenv.shell}
#!${runtimeShell}
set -e
export PATH=${coreutils}/bin:/bin
${text}

View File

@ -69,7 +69,7 @@ stdenv.mkDerivation (
mkdir -p $out/bin
cat >> $out/bin/${w.name} <<EOF
#!${stdenv.shell}
#!${pkgs.runtimeShell}
export JAVA_HOME=$jre
$jre/bin/java ${cp w} ${if w ? mainClass then w.mainClass else "-jar ${w.jar}"} \$@
EOF

View File

@ -8,12 +8,13 @@
, vmTools
, gawk
, utillinux
, runtimeShell
, e2fsprogs }:
rec {
shellScript = name: text:
writeScript name ''
#!${stdenv.shell}
#!${runtimeShell}
set -e
${text}
'';

View File

@ -1,4 +1,4 @@
{ lib, stdenv, stdenvNoCC, lndir }:
{ lib, stdenv, stdenvNoCC, lndir, runtimeShell }:
let
@ -145,11 +145,11 @@ rec {
executable = true;
destination = "/bin/${name}";
text = ''
#!${stdenv.shell}
#!${runtimeShell}
${text}
'';
checkPhase = ''
${stdenv.shell} -n $out/bin/${name}
${runtimeShell} -n $out/bin/${name}
'';
};

View File

@ -1,5 +1,6 @@
{ stdenv, writeScript, vmTools, makeInitrd
, samba, vde2, openssh, socat, netcat-gnu, coreutils, gnugrep, gzip
, runtimeShell
}:
{ sshKey
@ -74,7 +75,7 @@ let
loopForever = "while :; do ${coreutils}/bin/sleep 1; done";
initScript = writeScript "init.sh" (''
#!${stdenv.shell}
#!${runtimeShell}
${coreutils}/bin/cp -L "${sshKey}" /ssh.key
${coreutils}/bin/chmod 600 /ssh.key
'' + (if installMode then ''

View File

@ -1,4 +1,4 @@
{ stdenv, fetchFromGitHub, substituteAll, writeScript, pantheon, gnome-keyring, gnome-session, wingpanel, orca, at-spi2-core, elementary-default-settings, writeTextFile, writeShellScriptBin, elementary-settings-daemon }:
{ stdenv, fetchFromGitHub, substituteAll, writeScript, pantheon, gnome-keyring, gnome-session, wingpanel, orca, at-spi2-core, elementary-default-settings, writeTextFile, writeShellScriptBin, elementary-settings-daemon, runtimeShell }:
let
@ -15,7 +15,7 @@ let
#
dockitems-script = writeScript "dockitems-script" ''
#!${stdenv.shell}
#!${runtimeShell}
elementary_default_settings="${elementary-default-settings}"
dock_items="$elementary_default_settings/share/elementary/config/plank/dock1/launchers"/*

View File

@ -1,4 +1,4 @@
{ stdenv, fetchurl, bootstrap_cmds, coreutils, glibc, m4 }:
{ stdenv, fetchurl, bootstrap_cmds, coreutils, glibc, m4, runtimeShell }:
let
options = rec {
@ -76,7 +76,7 @@ stdenv.mkDerivation rec {
cp -r . "$out/share/ccl-installation"
mkdir -p "$out/bin"
echo -e '#!${stdenv.shell}\n'"$out/share/ccl-installation/${CCL_RUNTIME}"' "$@"\n' > "$out"/bin/"${CCL_RUNTIME}"
echo -e '#!${runtimeShell}\n'"$out/share/ccl-installation/${CCL_RUNTIME}"' "$@"\n' > "$out"/bin/"${CCL_RUNTIME}"
chmod a+x "$out"/bin/"${CCL_RUNTIME}"
ln -s "$out"/bin/"${CCL_RUNTIME}" "$out"/bin/ccl
'';

View File

@ -1,4 +1,4 @@
{ stdenv, fetchurl, python }:
{ stdenv, fetchurl, python, runtimeShell }:
stdenv.mkDerivation rec {
name = "cmdstan-2.17.1";
@ -21,7 +21,7 @@ stdenv.mkDerivation rec {
ln -s $out/opt/cmdstan/bin/stanc $out/bin/stanc
ln -s $out/opt/cmdstan/bin/stansummary $out/bin/stansummary
cat > $out/bin/stan <<EOF
#!${stdenv.shell}
#!${runtimeShell}
make -C $out/opt/cmdstan "\$(realpath "\$1")"
EOF
chmod a+x $out/bin/stan

View File

@ -1,6 +1,6 @@
{ stdenv, fetchFromGitHub, tzdata, iana-etc, go_bootstrap, runCommand, writeScriptBin
, perl, which, pkgconfig, patch, procps, pcre, cacert, llvm, Security, Foundation
, mailcap
, mailcap, runtimeShell
, buildPackages, targetPackages }:
let
@ -55,7 +55,7 @@ stdenv.mkDerivation rec {
# This source produces shell script at run time,
# and thus it is not corrected by patchShebangs.
substituteInPlace misc/cgo/testcarchive/carchive_test.go \
--replace '#!/usr/bin/env bash' '#!${stdenv.shell}'
--replace '#!/usr/bin/env bash' '#!${runtimeShell}'
# Patch the mimetype database location which is missing on NixOS.
substituteInPlace src/mime/type_unix.go \
@ -100,7 +100,7 @@ stdenv.mkDerivation rec {
'' + optionalString stdenv.isLinux ''
sed -i 's,/usr/share/zoneinfo/,${tzdata}/share/zoneinfo/,' src/time/zoneinfo_unix.go
'' + optionalString stdenv.isAarch32 ''
echo '#!${stdenv.shell}' > misc/cgo/testplugin/test.bash
echo '#!${runtimeShell}' > misc/cgo/testplugin/test.bash
'' + optionalString stdenv.isDarwin ''
substituteInPlace src/race.bash --replace \
"sysctl machdep.cpu.extfeatures | grep -qv EM64T" true

View File

@ -1,4 +1,4 @@
{ stdenv, fetchurl, path }:
{ stdenv, fetchurl, path, runtimeShell }:
stdenv.mkDerivation rec {
name = "${pname}-${version}";
pname = "safefile";
@ -13,7 +13,7 @@ stdenv.mkDerivation rec {
passthru = {
updateScript = ''
#!${stdenv.shell}
#!${runtimeShell}
cd ${toString ./.}
${toString path}/pkgs/build-support/upstream-updater/update-walker.sh default.nix
'';

View File

@ -1,4 +1,4 @@
{ stdenv, fetchurl, unzip }:
{ stdenv, fetchurl, unzip, runtimeShell }:
stdenv.mkDerivation {
name = "avr8-burn-omat-2.1.2";
@ -18,7 +18,7 @@ stdenv.mkDerivation {
mkdir -p $out/{nix-support,bin}
mv *.jar license_gpl-3.0.txt lib *.xml *.png $out/nix-support
cat >> $out/bin/avr8-burn-omat << EOF
#!${stdenv.shell}
#!${runtimeShell}
cd $out/nix-support; exec java -jar AVR8_Burn_O_Mat.jar
EOF
chmod +x $out/bin/avr8-burn-omat

View File

@ -13,6 +13,7 @@
, libuuid
, autoreconfHook
, gcc48
, runtimeShell
, ... }:
{ name, src, version, source-date, source-url, ... }:
@ -114,7 +115,7 @@ stdenv.mkDerivation rec {
# Create the script
cat > "$out/bin/${cmd}" <<EOF
#!${stdenv.shell}
#!${runtimeShell}
set -f
LD_LIBRARY_PATH="\$LD_LIBRARY_PATH:$libs" exec $out/pharo "\$@"
EOF

View File

@ -17,6 +17,7 @@
, gcc48
, fetchFromGitHub
, makeWrapper
, runtimeShell
} @args:
let
@ -62,4 +63,3 @@ rec {
};
}

View File

@ -2,6 +2,7 @@
, pyperclip, six, pyparsing, vim
, contextlib2 ? null, subprocess32 ? null
, pytest, mock, which, fetchFromGitHub, glibcLocales
, runtimeShell
}:
buildPythonPackage rec {
pname = "cmd2";
@ -19,8 +20,8 @@ buildPythonPackage rec {
postPatch = stdenv.lib.optional stdenv.isDarwin ''
# Fake the impure dependencies pbpaste and pbcopy
mkdir bin
echo '#${stdenv.shell}' > bin/pbpaste
echo '#${stdenv.shell}' > bin/pbcopy
echo '#${runtimeShell}' > bin/pbpaste
echo '#${runtimeShell}' > bin/pbcopy
chmod +x bin/{pbcopy,pbpaste}
export PATH=$(realpath bin):$PATH
'';

View File

@ -20,6 +20,7 @@
, openpyxl
, tables
, xlwt
, runtimeShell
, libcxx ? null
}:
@ -97,8 +98,8 @@ in buildPythonPackage rec {
# Until then we disable the tests.
+ optionalString isDarwin ''
# Fake the impure dependencies pbpaste and pbcopy
echo "#!${stdenv.shell}" > pbcopy
echo "#!${stdenv.shell}" > pbpaste
echo "#!${runtimeShell}" > pbcopy
echo "#!${runtimeShell}" > pbpaste
chmod a+x pbcopy pbpaste
export PATH=$(pwd):$PATH
'' + ''

View File

@ -1,4 +1,4 @@
{ stdenv, fetchFromGitHub, ant, jdk }:
{ stdenv, fetchFromGitHub, ant, jdk, runtimeShell }:
stdenv.mkDerivation rec {
name = "jdepend-${version}";
@ -19,7 +19,7 @@ stdenv.mkDerivation rec {
install dist/${name}.jar $out/share
cat > "$out/bin/jdepend" <<EOF
#!${stdenv.shell}
#!${runtimeShell}
exec ${jdk.jre}/bin/java -classpath "$out/share/*" "\$@"
EOF
chmod a+x $out/bin/jdepend

View File

@ -6,6 +6,7 @@
# Allow to independently override the jdks used to build and run respectively
, buildJdk, runJdk
, buildJdkName
, runtimeShell
# Always assume all markers valid (don't redownload dependencies).
# Also, don't clean up environment variables.
, enableNixHacks ? false
@ -281,7 +282,7 @@ stdenv.mkDerivation rec {
mkdir -p tools
cat > tools/bazel <<"EOF"
#!${stdenv.shell} -e
#!${runtimeShell} -e
exit 1
EOF
chmod +x tools/bazel
@ -290,7 +291,7 @@ stdenv.mkDerivation rec {
! hello_test
cat > tools/bazel <<"EOF"
#!${stdenv.shell} -e
#!${runtimeShell} -e
exec "$BAZEL_REAL" "$@"
EOF

View File

@ -1,4 +1,5 @@
{ stdenv, fetchFromGitHub, nix-update-source, lib, python, which, pychecker ? null }:
{ stdenv, fetchFromGitHub, nix-update-source, lib, python
, which, runtimeShell, pychecker ? null }:
stdenv.mkDerivation rec {
version = "0.7.0";
src = fetchFromGitHub {
@ -16,7 +17,7 @@ stdenv.mkDerivation rec {
cp -r python/bin $out/bin
'';
passthru.updateScript = ''
#!${stdenv.shell}
#!${runtimeShell}
set -e
echo
cd ${toString ./.}

View File

@ -1,4 +1,5 @@
{ stdenv, fetchFromGitHub, jshon, electron, hyper-haskell-server, extra-packages ? [] }:
{ stdenv, fetchFromGitHub, jshon, electron
, runtimeShell, hyper-haskell-server, extra-packages ? [] }:
let
binPath = stdenv.lib.makeBinPath ([ hyper-haskell-server ] ++ extra-packages);
@ -34,7 +35,7 @@ in stdenv.mkDerivation rec {
# install electron wrapper script
cat > $out/bin/hyper-haskell <<EOF
#!${stdenv.shell}
#!${runtimeShell}
export PATH="${binPath}:\$PATH"
exec ${electron}/bin/electron $out/app "\$@"
EOF

View File

@ -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.

View File

@ -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.

View File

@ -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 [

View File

@ -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

View File

@ -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}" \

View File

@ -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"

View File

@ -1,4 +1,5 @@
{ stdenv, fetchFromGitHub, rustPlatform, clang, llvmPackages, rustfmt, writeScriptBin }:
{ stdenv, fetchFromGitHub, rustPlatform, clang, llvmPackages, rustfmt, writeScriptBin,
runtimeShell }:
rustPlatform.buildRustPackage rec {
name = "rust-bindgen-${version}";
@ -32,7 +33,7 @@ rustPlatform.buildRustPackage rec {
doCheck = true;
checkInputs =
let fakeRustup = writeScriptBin "rustup" ''
#!${stdenv.shell}
#!${runtimeShell}
shift
shift
exec "$@"

View File

@ -1,4 +1,4 @@
{ stdenv, lib, fetchurl, writeScript, writeText, php }:
{ stdenv, lib, fetchurl, writeScript, writeText, php, runtimeShell }:
let
version = "2.0.1";
@ -22,7 +22,7 @@ in stdenv.mkDerivation rec {
mkdir -p $out/bin $dir
cat <<_EOF > $out/bin/wp
#!${stdenv.shell}
#!${runtimeShell}
set -euo pipefail

View File

@ -1,5 +1,6 @@
{ stdenv, lib, buildPackages, makeWrapper, writeText, runCommand
, CoreServices, ImageIO, CoreGraphics
, runtimeShell
, xcodePlatform ? stdenv.targetPlatform.xcodePlatform or "MacOSX"
, xcodeVer ? stdenv.targetPlatform.xcodeVer or "9.4.1"
, sdkVer ? stdenv.targetPlatform.sdkVer or "10.10" }:
@ -35,7 +36,7 @@ let
'';
xcode-select = writeText "xcode-select" ''
#!${stdenv.shell}
#!${runtimeShell}
while [ $# -gt 0 ]; do
case "$1" in
-h | --help) ;; # noop
@ -50,7 +51,7 @@ done
'';
xcrun = writeText "xcrun" ''
#!${stdenv.shell}
#!${runtimeShell}
while [ $# -gt 0 ]; do
case "$1" in
--sdk | -sdk) shift ;;

View File

@ -9,10 +9,11 @@
, common-updater-scripts
, majorVersion
, nix
, runtimeShell
}:
writeScript "update-nodejs" ''
#!${stdenv.shell}
#!${runtimeShell}
PATH=${lib.makeBinPath [ common-updater-scripts coreutils curl gnugrep jq gnupg nix ]}
HOME=`mktemp -d`

View File

@ -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

View File

@ -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

View File

@ -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

View File

@ -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

View File

@ -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
'';

View File

@ -1,5 +1,5 @@
{ stdenv, config, fetchurl, libX11, libXext, libXinerama, libXrandr
, libXrender, fontconfig, freetype, openal }:
, libXrender, fontconfig, freetype, openal, runtimeShell }:
let inherit (stdenv.lib) makeLibraryPath; in
@ -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 "\$@"

View File

@ -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 $*
'';

View File

@ -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

View File

@ -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} \

View File

@ -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

View File

@ -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

View File

@ -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
@ -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

View File

@ -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}

View File

@ -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}"

View File

@ -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

View File

@ -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

View File

@ -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

View File

@ -1,4 +1,4 @@
{ stdenv, requireFile, SDL, libpulseaudio, alsaLib }:
{ stdenv, requireFile, SDL, libpulseaudio, alsaLib, runtimeShell }:
stdenv.mkDerivation rec {
name = "vessel-12082012";
@ -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

View File

@ -1,5 +1,6 @@
{ stdenv, requireFile
, libX11, libXext, libXau, libxcb, libXdmcp , SDL, SDL_mixer, libvorbis, libGLU_combined
, runtimeShell
, demo ? false }:
# TODO: add i686 support
@ -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

View File

@ -1,4 +1,4 @@
{ stdenv, fetchurl, pkgsi686Linux, dpkg, makeWrapper, coreutils, gnused, gawk, file, cups, utillinux, xxd
{ stdenv, fetchurl, pkgsi686Linux, dpkg, makeWrapper, coreutils, gnused, gawk, file, cups, utillinux, xxd, runtimeShell
, ghostscript, a2ps }:
# Why:
@ -34,7 +34,7 @@ stdenv.mkDerivation rec {
unpackPhase = "true";
brprintconf_mfcj6510dw_script = ''
#!${stdenv.shell}
#!${runtimeShell}
cd $(mktemp -d)
ln -s @out@/usr/bin/brprintconf_mfcj6510dw_patched brprintconf_mfcj6510dw_patched
ln -s @out@/opt/brother/Printers/mfcj6510dw/inf/brmfcj6510dwfunc brmfcj6510dwfunc

View File

@ -4,7 +4,8 @@
, udev
, libGLU_combined, SDL
, libao, openal, libpulseaudio
, gtk2, gtksourceview }:
, gtk2, gtksourceview
, runtimeShell }:
with stdenv.lib;
stdenv.mkDerivation rec {
@ -55,7 +56,7 @@ stdenv.mkDerivation rec {
# stuff needed by higan at runtime
cat <<EOF > $out/bin/higan-init.sh
#!${stdenv.shell}
#!${runtimeShell}
cp --recursive --update $out/share/higan/*.sys \$HOME/.local/share/higan/

View File

@ -1,4 +1,4 @@
{ stdenv, lib, writeText, fetchurl, upx, libGLU, glib, gtk2, alsaLib, libSM, libX11, gdk_pixbuf, pango, libXinerama, mpg123 }:
{ stdenv, lib, writeText, fetchurl, upx, libGLU, glib, gtk2, alsaLib, libSM, libX11, gdk_pixbuf, pango, libXinerama, mpg123, runtimeShell }:
let
libPath = lib.makeLibraryPath [ stdenv.cc.cc libGLU glib gtk2 alsaLib libSM libX11 gdk_pixbuf pango libXinerama ];
@ -18,7 +18,7 @@ in stdenv.mkDerivation rec {
};
runner = writeText "kega-fusion" ''
#!${stdenv.shell} -ex
#!${runtimeShell} -ex
kega_libdir="@out@/lib/kega-fusion"
kega_localdir="$HOME/.Kega Fusion"

View File

@ -1,4 +1,4 @@
{ stdenv, pkgs, cores }:
{ stdenv, pkgs, cores, runtimeShell }:
assert cores != [];
@ -7,7 +7,7 @@ with pkgs.lib;
let
script = exec: ''
#!${stdenv.shell}
#!${runtimeShell}
nohup sh -c "pkill -SIGTSTP kodi" &
# https://forum.kodi.tv/showthread.php?tid=185074&pid=1622750#pid1622750
nohup sh -c "sleep 10 && ${exec} '$@' -f;pkill -SIGCONT kodi"

View File

@ -1,5 +1,5 @@
{ stdenv, fetchhg, cmake, glib, gst_all_1, makeWrapper, pkgconfig
, python, SDL2, SDL2_image, SDL2_mixer, SDL2_ttf, sqlite, zlib
, python, SDL2, SDL2_image, SDL2_mixer, SDL2_ttf, sqlite, zlib, runtimeShell
}:
stdenv.mkDerivation rec {
@ -38,7 +38,7 @@ stdenv.mkDerivation rec {
mv $out/share/retrofe/example/retrofe $out/bin/
cat > $out/bin/retrofe-init << EOF
#!${stdenv.shell}
#!${runtimeShell}
echo "This will install retrofe's example files into this directory"
echo "Example files location: $out/share/retrofe/example/"

View File

@ -1,6 +1,6 @@
{ stdenv, vim, vimPlugins, vim_configurable, neovim, buildEnv, writeText, writeScriptBin
, nix-prefetch-hg, nix-prefetch-git
, fetchFromGitHub
, fetchFromGitHub, runtimeShell
}:
/*
@ -374,7 +374,7 @@ rec {
let
rcOption = o: file: stdenv.lib.optionalString (file != null) "-${o} ${file}";
vimWrapperScript = writeScriptBin vimExecutableName ''
#!${stdenv.shell}
#!${runtimeShell}
exec ${vimExecutable} ${rcOption "u" vimrcFile} ${rcOption "U" gvimrcFile} "$@"
'';
gvimWrapperScript = writeScriptBin gvimExecutableName ''

View File

@ -1,4 +1,4 @@
{ stdenv, fetchzip, vscode-utils, jq, mono, clang-tools, writeScript
{ stdenv, fetchzip, vscode-utils, jq, mono, clang-tools, writeScript, runtimeShell
, gdbUseFixed ? true, gdb # The gdb default setting will be fixed to specified. Use version from `PATH` otherwise.
}:
@ -53,7 +53,7 @@ let
};
openDebugAD7Script = writeScript "OpenDebugAD7" ''
#!${stdenv.shell}
#!${runtimeShell}
BIN_DIR="$(cd "$(dirname "$0")" && pwd -P)"
${if gdbUseFixed
then ''

View File

@ -1,7 +1,7 @@
{ stdenv, writeScriptBin }:
{ stdenv, writeScriptBin, runtimeShell }:
let fake = name: stdenv.lib.overrideDerivation (writeScriptBin name ''
#!${stdenv.shell}
#!${runtimeShell}
echo >&2 "Faking call to ${name} with arguments:"
echo >&2 "$@"
'') (drv: {

View File

@ -1,4 +1,4 @@
{ stdenv, fetchurl, fetchpatch, kernel }:
{ stdenv, fetchurl, fetchpatch, kernel, runtimeShell }:
let
baseName = "bbswitch";
@ -36,12 +36,12 @@ stdenv.mkDerivation {
mkdir -p $out/bin
tee $out/bin/discrete_vga_poweroff << EOF
#!${stdenv.shell}
#!${runtimeShell}
echo -n OFF > /proc/acpi/bbswitch
EOF
tee $out/bin/discrete_vga_poweron << EOF
#!${stdenv.shell}
#!${runtimeShell}
echo -n ON > /proc/acpi/bbswitch
EOF

View File

@ -1,4 +1,4 @@
{ stdenv, fetchurl, makeWrapper, dbus, libxml2, pam, pkgconfig, pmount, pythonPackages, writeScript }:
{ stdenv, fetchurl, makeWrapper, dbus, libxml2, pam, pkgconfig, pmount, pythonPackages, writeScript, runtimeShell }:
let
@ -11,7 +11,7 @@ let
bin = "${drv}${path}";
in assert name != "";
writeScript "setUID-${name}" ''
#!${stdenv.shell}
#!${runtimeShell}
inode=$(stat -Lc %i ${bin})
for file in $(type -ap ${name}); do
case $(stat -Lc %a $file) in

View File

@ -10,7 +10,7 @@
# Add a hook script in the managed etc directory, e.g.:
# etc = [
# { source = pkgs.writeScript "rtfkill.hook" ''
# #!${stdenv.shell}
# #!${pkgs.runtimeShell}
#
# if [ "$RFKILL_STATE" -eq "1" ]; then
# exec ${config.system.build.upstart}/sbin/initctl emit -n antenna-on

View File

@ -1,7 +1,7 @@
{ stdenv, lib, writeScript, coreutils, curl, gnugrep, jq, common-updater-scripts }:
{ stdenv, lib, writeScript, coreutils, curl, gnugrep, jq, common-updater-scripts, runtimeShell }:
writeScript "update-tp_smapi" ''
#!${stdenv.shell}
#!${runtimeShell}
PATH=${lib.makeBinPath [ common-updater-scripts coreutils curl gnugrep jq ]}
tags=`curl -s https://api.github.com/repos/evgeni/tp_smapi/tags`

View File

@ -1,7 +1,7 @@
{ stdenv, writeText }:
{ stdenv, writeText, runtimeShell }:
let script = writeText "script" ''
#!${stdenv.shell}
#!${runtimeShell}
if command -v sendmail > /dev/null 2>&1 && [ "$(command -v sendmail)" != "{{MYPATH}}" ]; then
exec sendmail "$@"

View File

@ -1,4 +1,4 @@
{ stdenv, lib, fetchurl, zlib, patchelf }:
{ stdenv, lib, fetchurl, zlib, patchelf, runtimeShell }:
let
bootstrap = fetchurl {
@ -69,7 +69,7 @@ stdenv.mkDerivation rec {
# otherwise it fails spectacularly.
mkdir -p $out/bin
cat << EOF > $out/bin/meteor
#!${stdenv.shell}
#!${runtimeShell}
if [[ ! -f \$HOME/.meteor/package-metadata/v2.0.1/packages.data.db ]]; then
mkdir -p \$HOME/.meteor/package-metadata/v2.0.1

View File

@ -1,5 +1,6 @@
{ stdenv, fetchFromGitHub, autoreconfHook
, coreutils, gnugrep, gnused, lm_sensors, net_snmp, openssh, openssl, perl }:
, coreutils, gnugrep, gnused, lm_sensors, net_snmp, openssh, openssl, perl
, runtimeShell }:
with stdenv.lib;
@ -50,7 +51,7 @@ in stdenv.mkDerivation rec {
preBuild = ''
mkdir -p $out
cat <<_EOF > $out/share
#!${stdenv.shell}
#!${runtimeShell}
exit 0
_EOF
chmod 755 $out/share

View File

@ -1,4 +1,4 @@
{ stdenv, fetchFromGitHub, git, mono, v8 }:
{ stdenv, fetchFromGitHub, git, mono, v8, runtimeShell }:
# There are some similarities with the pinta derivation. We should
# have a helper to make it easy to package these Mono apps.
@ -27,7 +27,7 @@ stdenv.mkDerivation rec {
mkdir -p $out/{bin,lib/eventstore/clusternode}
cp -r bin/clusternode/* $out/lib/eventstore/clusternode/
cat > $out/bin/clusternode << EOF
#!${stdenv.shell}
#!${runtimeShell}
exec ${mono}/bin/mono $out/lib/eventstore/clusternode/EventStore.ClusterNode.exe "\$@"
EOF
chmod +x $out/bin/clusternode

Some files were not shown because too many files have changed in this diff Show More