diff --git a/doc/functions/dockertools.xml b/doc/functions/dockertools.xml index ff446cbfffd..2c8eb2cb774 100644 --- a/doc/functions/dockertools.xml +++ b/doc/functions/dockertools.xml @@ -47,7 +47,7 @@ buildImage { contents = pkgs.redis; 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 diff --git a/pkgs/applications/audio/spotifywm/default.nix b/pkgs/applications/audio/spotifywm/default.nix index f22340b6941..64ae9491535 100644 --- a/pkgs/applications/audio/spotifywm/default.nix +++ b/pkgs/applications/audio/spotifywm/default.nix @@ -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 diff --git a/pkgs/applications/editors/standardnotes/default.nix b/pkgs/applications/editors/standardnotes/default.nix index 5b0560e5831..454b7ad554b 100644 --- a/pkgs/applications/editors/standardnotes/default.nix +++ b/pkgs/applications/editors/standardnotes/default.nix @@ -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 ''; diff --git a/pkgs/applications/editors/sublime/3/common.nix b/pkgs/applications/editors/sublime/3/common.nix index 71bd3544feb..937764f0ab8 100644 --- a/pkgs/applications/editors/sublime/3/common.nix +++ b/pkgs/applications/editors/sublime/3/common.nix @@ -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 diff --git a/pkgs/applications/editors/vim/configurable.nix b/pkgs/applications/editors/vim/configurable.nix index 7ee28adfa47..3b75d08787e 100644 --- a/pkgs/applications/editors/vim/configurable.nix +++ b/pkgs/applications/editors/vim/configurable.nix @@ -7,6 +7,7 @@ , vimPlugins , makeWrapper , wrapGAppsHook +, runtimeShell # apple frameworks , CoreServices, CoreData, Cocoa, Foundation, libobjc, cf-private @@ -157,22 +158,22 @@ 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" } - rewrap ex -e - rewrap view -R - rewrap gvim -g - rewrap gex -eg - rewrap gview -Rg - rewrap rvim -Z - rewrap rview -RZ - rewrap rgvim -gZ + rewrap ex -e + rewrap view -R + rewrap gvim -g + rewrap gex -eg + rewrap gview -Rg + rewrap rvim -Z + rewrap rview -RZ + rewrap rgvim -gZ rewrap rgview -RgZ rewrap evim -y rewrap eview -yR - rewrap vimdiff -d + rewrap vimdiff -d rewrap gvimdiff -gd ''; diff --git a/pkgs/applications/graphics/alchemy/default.nix b/pkgs/applications/graphics/alchemy/default.nix index 30223658f53..09664889f35 100644 --- a/pkgs/applications/graphics/alchemy/default.nix +++ b/pkgs/applications/graphics/alchemy/default.nix @@ -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 diff --git a/pkgs/applications/graphics/autotrace/default.nix b/pkgs/applications/graphics/autotrace/default.nix index 7af7c8986f2..cc08dce906c 100644 --- a/pkgs/applications/graphics/autotrace/default.nix +++ b/pkgs/applications/graphics/autotrace/default.nix @@ -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[@]}" diff --git a/pkgs/applications/graphics/swingsane/default.nix b/pkgs/applications/graphics/swingsane/default.nix index ac3de4a4e14..d0f2a48c589 100644 --- a/pkgs/applications/graphics/swingsane/default.nix +++ b/pkgs/applications/graphics/swingsane/default.nix @@ -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 "$@" ''; diff --git a/pkgs/applications/graphics/wings/default.nix b/pkgs/applications/graphics/wings/default.nix index e27f074b21b..891f3586fa5 100644 --- a/pkgs/applications/graphics/wings/default.nix +++ b/pkgs/applications/graphics/wings/default.nix @@ -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; }; } - diff --git a/pkgs/applications/graphics/zgrviewer/default.nix b/pkgs/applications/graphics/zgrviewer/default.nix index c60d4b7b904..ac3d303a7a6 100644 --- a/pkgs/applications/graphics/zgrviewer/default.nix +++ b/pkgs/applications/graphics/zgrviewer/default.nix @@ -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" ''; diff --git a/pkgs/applications/misc/avrdudess/default.nix b/pkgs/applications/misc/avrdudess/default.nix index 1144d515284..4227b4155ac 100644 --- a/pkgs/applications/misc/avrdudess/default.nix +++ b/pkgs/applications/misc/avrdudess/default.nix @@ -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. diff --git a/pkgs/applications/misc/curabydagoma/default.nix b/pkgs/applications/misc/curabydagoma/default.nix index 1ea106d6a18..4e620425d5c 100644 --- a/pkgs/applications/misc/curabydagoma/default.nix +++ b/pkgs/applications/misc/curabydagoma/default.nix @@ -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 < $out/bin/hello-unfree << EOF - #!${stdenv.shell} + #!${runtimeShell} echo "Hello, you are running an unfree system!" EOF chmod +x $out/bin/hello-unfree diff --git a/pkgs/applications/misc/jbidwatcher/default.nix b/pkgs/applications/misc/jbidwatcher/default.nix index 2c46ea3ac9a..72a24026a89 100644 --- a/pkgs/applications/misc/jbidwatcher/default.nix +++ b/pkgs/applications/misc/jbidwatcher/default.nix @@ -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} diff --git a/pkgs/applications/misc/multibootusb/default.nix b/pkgs/applications/misc/multibootusb/default.nix index 88a7b94897d..a2678d6067f 100644 --- a/pkgs/applications/misc/multibootusb/default.nix +++ b/pkgs/applications/misc/multibootusb/default.nix @@ -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}" < $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 diff --git a/pkgs/applications/misc/openjump/default.nix b/pkgs/applications/misc/openjump/default.nix index 09ec3433862..c98defee57a 100644 --- a/pkgs/applications/misc/openjump/default.nix +++ b/pkgs/applications/misc/openjump/default.nix @@ -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 diff --git a/pkgs/applications/misc/terminal-notifier/default.nix b/pkgs/applications/misc/terminal-notifier/default.nix index b05c8a80399..3599bd0030b 100644 --- a/pkgs/applications/misc/terminal-notifier/default.nix +++ b/pkgs/applications/misc/terminal-notifier/default.nix @@ -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 <> $out/bin/thinkingrock << EOF - #!${stdenv.shell} + #!${runtimeShell} exec $out/nix-support/tr-files/bin/tr "$@" EOF chmod +x $out/bin/thinkingrock ''; - + installPhase = ":"; - meta = { + meta = { description = "Task management system"; homepage = http://www.thinkingrock.com.au/; license = "CDDL"; # Common Development and Distribution License diff --git a/pkgs/applications/misc/vue/default.nix b/pkgs/applications/misc/vue/default.nix index a448d35485a..1feec9e4550 100644 --- a/pkgs/applications/misc/vue/default.nix +++ b/pkgs/applications/misc/vue/default.nix @@ -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" ''; diff --git a/pkgs/applications/networking/browsers/firefox-bin/update.nix b/pkgs/applications/networking/browsers/firefox-bin/update.nix index ee022e329f9..97163ffa762 100644 --- a/pkgs/applications/networking/browsers/firefox-bin/update.nix +++ b/pkgs/applications/networking/browsers/firefox-bin/update.nix @@ -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} diff --git a/pkgs/applications/networking/browsers/firefox/update.nix b/pkgs/applications/networking/browsers/firefox/update.nix index 07ae2c040e6..b03720f988a 100644 --- a/pkgs/applications/networking/browsers/firefox/update.nix +++ b/pkgs/applications/networking/browsers/firefox/update.nix @@ -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} diff --git a/pkgs/applications/networking/instant-messengers/telegram/telegram-cli/default.nix b/pkgs/applications/networking/instant-messengers/telegram/telegram-cli/default.nix index 3c9157081d3..2b744c61ccb 100644 --- a/pkgs/applications/networking/instant-messengers/telegram/telegram-cli/default.nix +++ b/pkgs/applications/networking/instant-messengers/telegram/telegram-cli/default.nix @@ -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 < $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 diff --git a/pkgs/applications/networking/mailreaders/neomutt/default.nix b/pkgs/applications/networking/mailreaders/neomutt/default.nix index a8c322b42b8..0da451ed51e 100644 --- a/pkgs/applications/networking/mailreaders/neomutt/default.nix +++ b/pkgs/applications/networking/mailreaders/neomutt/default.nix @@ -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 "" diff --git a/pkgs/applications/office/mendeley/default.nix b/pkgs/applications/office/mendeley/default.nix index 9c4c22dabe9..892ebcee99f 100644 --- a/pkgs/applications/office/mendeley/default.nix +++ b/pkgs/applications/office/mendeley/default.nix @@ -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; diff --git a/pkgs/applications/office/mendeley/update.nix b/pkgs/applications/office/mendeley/update.nix index 147c95b8e7b..c174e7dc668 100644 --- a/pkgs/applications/office/mendeley/update.nix +++ b/pkgs/applications/office/mendeley/update.nix @@ -1,7 +1,7 @@ -{ stdenv, writeScript }: +{ stdenv, writeScript, runtimeShell }: writeScript "update-mendeley" '' - #!${stdenv.shell} + #!${runtimeShell} function follow() { local URL=$1 while true; do diff --git a/pkgs/applications/office/moneyplex/default.nix b/pkgs/applications/office/moneyplex/default.nix index 9f4ed80e6d8..ad621303d7d 100644 --- a/pkgs/applications/office/moneyplex/default.nix +++ b/pkgs/applications/office/moneyplex/default.nix @@ -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 < /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 d5720440f7c..69b111562ab 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 ffd25b6238b..099e2102c51 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 a3834dc70b6..dcea9c27acb 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 b9d0a9ef448..7302b5e337d 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). diff --git a/pkgs/applications/video/dvd-slideshow/default.nix b/pkgs/applications/video/dvd-slideshow/default.nix index a329321b70c..344c47eb934 100644 --- a/pkgs/applications/video/dvd-slideshow/default.nix +++ b/pkgs/applications/video/dvd-slideshow/default.nix @@ -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 diff --git a/pkgs/build-support/docker/default.nix b/pkgs/build-support/docker/default.nix index 4b20c562460..011ff368509 100644 --- a/pkgs/build-support/docker/default.nix +++ b/pkgs/build-support/docker/default.nix @@ -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} diff --git a/pkgs/build-support/release/ant-build.nix b/pkgs/build-support/release/ant-build.nix index 5ab24132290..2d24d5bd704 100644 --- a/pkgs/build-support/release/ant-build.nix +++ b/pkgs/build-support/release/ant-build.nix @@ -69,7 +69,7 @@ stdenv.mkDerivation ( mkdir -p $out/bin cat >> $out/bin/${w.name} < "$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 ''; diff --git a/pkgs/development/compilers/cmdstan/default.nix b/pkgs/development/compilers/cmdstan/default.nix index 3d9fe3a59cf..960a54489da 100644 --- a/pkgs/development/compilers/cmdstan/default.nix +++ b/pkgs/development/compilers/cmdstan/default.nix @@ -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 < 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 diff --git a/pkgs/development/libraries/safefile/default.nix b/pkgs/development/libraries/safefile/default.nix index d09e45a2d1e..daa499061c5 100644 --- a/pkgs/development/libraries/safefile/default.nix +++ b/pkgs/development/libraries/safefile/default.nix @@ -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 ''; diff --git a/pkgs/development/misc/avr8-burn-omat/default.nix b/pkgs/development/misc/avr8-burn-omat/default.nix index 4ddab380825..c88b780d164 100644 --- a/pkgs/development/misc/avr8-burn-omat/default.nix +++ b/pkgs/development/misc/avr8-burn-omat/default.nix @@ -1,4 +1,4 @@ -{ stdenv, fetchurl, unzip }: +{ stdenv, fetchurl, unzip, runtimeShell }: stdenv.mkDerivation { name = "avr8-burn-omat-2.1.2"; @@ -18,8 +18,8 @@ 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} - cd $out/nix-support; exec java -jar AVR8_Burn_O_Mat.jar + #!${runtimeShell} + cd $out/nix-support; exec java -jar AVR8_Burn_O_Mat.jar EOF chmod +x $out/bin/avr8-burn-omat ''; diff --git a/pkgs/development/pharo/vm/build-vm.nix b/pkgs/development/pharo/vm/build-vm.nix index 76e52692383..47773c20954 100644 --- a/pkgs/development/pharo/vm/build-vm.nix +++ b/pkgs/development/pharo/vm/build-vm.nix @@ -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}" < 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 ''; diff --git a/pkgs/development/python-modules/pandas/default.nix b/pkgs/development/python-modules/pandas/default.nix index 2562975e592..1944e23f4b4 100644 --- a/pkgs/development/python-modules/pandas/default.nix +++ b/pkgs/development/python-modules/pandas/default.nix @@ -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 '' + '' diff --git a/pkgs/development/tools/analysis/jdepend/default.nix b/pkgs/development/tools/analysis/jdepend/default.nix index d2c27b9f485..939ae10c089 100644 --- a/pkgs/development/tools/analysis/jdepend/default.nix +++ b/pkgs/development/tools/analysis/jdepend/default.nix @@ -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" < 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 diff --git a/pkgs/development/tools/build-managers/gup/default.nix b/pkgs/development/tools/build-managers/gup/default.nix index 7fd80148831..baa658b522a 100644 --- a/pkgs/development/tools/build-managers/gup/default.nix +++ b/pkgs/development/tools/build-managers/gup/default.nix @@ -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 ./.} diff --git a/pkgs/development/tools/haskell/hyper-haskell/default.nix b/pkgs/development/tools/haskell/hyper-haskell/default.nix index a2a049615b7..3b52c262c0c 100644 --- a/pkgs/development/tools/haskell/hyper-haskell/default.nix +++ b/pkgs/development/tools/haskell/hyper-haskell/default.nix @@ -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 < $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 diff --git a/pkgs/development/tools/misc/opengrok/default.nix b/pkgs/development/tools/misc/opengrok/default.nix index f7b77cdc418..874aa04157d 100644 --- a/pkgs/development/tools/misc/opengrok/default.nix +++ b/pkgs/development/tools/misc/opengrok/default.nix @@ -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}" \ diff --git a/pkgs/development/tools/misc/saleae-logic/default.nix b/pkgs/development/tools/misc/saleae-logic/default.nix index c89492287db..18ffc238f0d 100644 --- a/pkgs/development/tools/misc/saleae-logic/default.nix +++ b/pkgs/development/tools/misc/saleae-logic/default.nix @@ -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" diff --git a/pkgs/development/tools/rust/bindgen/default.nix b/pkgs/development/tools/rust/bindgen/default.nix index 5a1c2364a77..a1f5e5769ae 100644 --- a/pkgs/development/tools/rust/bindgen/default.nix +++ b/pkgs/development/tools/rust/bindgen/default.nix @@ -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 "$@" diff --git a/pkgs/development/tools/wp-cli/default.nix b/pkgs/development/tools/wp-cli/default.nix index e2250297c8e..211f7169397 100644 --- a/pkgs/development/tools/wp-cli/default.nix +++ b/pkgs/development/tools/wp-cli/default.nix @@ -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 diff --git a/pkgs/development/tools/xcbuild/wrapper.nix b/pkgs/development/tools/xcbuild/wrapper.nix index b2455095a01..959c79405e8 100644 --- a/pkgs/development/tools/xcbuild/wrapper.nix +++ b/pkgs/development/tools/xcbuild/wrapper.nix @@ -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 ;; diff --git a/pkgs/development/web/nodejs/update.nix b/pkgs/development/web/nodejs/update.nix index bf6951dc688..7b5a4710aa0 100644 --- a/pkgs/development/web/nodejs/update.nix +++ b/pkgs/development/web/nodejs/update.nix @@ -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` diff --git a/pkgs/games/andyetitmoves/default.nix b/pkgs/games/andyetitmoves/default.nix index 123d4296c97..d4ff86c424b 100644 --- a/pkgs/games/andyetitmoves/default.nix +++ b/pkgs/games/andyetitmoves/default.nix @@ -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 diff --git a/pkgs/games/astromenace/default.nix b/pkgs/games/astromenace/default.nix index 91959a1c942..b2c86222f2b 100644 --- a/pkgs/games/astromenace/default.nix +++ b/pkgs/games/astromenace/default.nix @@ -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 diff --git a/pkgs/games/cataclysm-dda/common.nix b/pkgs/games/cataclysm-dda/common.nix index 2c55911defc..b39eb987e00 100644 --- a/pkgs/games/cataclysm-dda/common.nix +++ b/pkgs/games/cataclysm-dda/common.nix @@ -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 diff --git a/pkgs/games/eduke32/default.nix b/pkgs/games/eduke32/default.nix index 859e503e101..c51f014b179 100644 --- a/pkgs/games/eduke32/default.nix +++ b/pkgs/games/eduke32/default.nix @@ -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 <$out/bin/fsg + echo -e '#!${runtimeShell}\nLC_ALL=C '$out'/libexec/sand "$@"' >$out/bin/fsg chmod a+x $out/bin/fsg ''; diff --git a/pkgs/games/oilrush/default.nix b/pkgs/games/oilrush/default.nix index 2d636064205..1d56d86f530 100644 --- a/pkgs/games/oilrush/default.nix +++ b/pkgs/games/oilrush/default.nix @@ -1,11 +1,11 @@ { stdenv, config, fetchurl, libX11, libXext, libXinerama, libXrandr -, libXrender, fontconfig, freetype, openal }: +, libXrender, fontconfig, freetype, openal, runtimeShell }: let inherit (stdenv.lib) makeLibraryPath; in stdenv.mkDerivation { name = "oilrush"; - src = + src = let url = config.oilrush.url or null; sha256 = config.oilrush.sha256 or null; @@ -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 "\$@" @@ -66,7 +66,7 @@ stdenv.mkDerivation { longDescription = '' Oil Rush is a real-time naval strategy game based on group control. It combines the strategic challenge of a classical RTS with the sheer fun - of Tower Defense. + of Tower Defense. ''; homepage = http://oilrush-game.com/; license = stdenv.lib.licenses.unfree; diff --git a/pkgs/games/openttd/default.nix b/pkgs/games/openttd/default.nix index e5243aef2d3..237021e9801 100644 --- a/pkgs/games/openttd/default.nix +++ b/pkgs/games/openttd/default.nix @@ -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 $* ''; diff --git a/pkgs/games/sauerbraten/default.nix b/pkgs/games/sauerbraten/default.nix index f48736a56d6..3a9635f6712 100644 --- a/pkgs/games/sauerbraten/default.nix +++ b/pkgs/games/sauerbraten/default.nix @@ -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 < $out/bin/sauerbraten_client < "$out/bin/simutrans" <> "$out/bin/$(basename "$i")" + echo '#!${runtimeShell}' >> "$out/bin/$(basename "$i")" echo "$i"' "$@"' >> "$out/bin/$(basename "$i")" chmod a+x "$out/bin/$(basename "$i")" done diff --git a/pkgs/games/steam/chrootenv.nix b/pkgs/games/steam/chrootenv.nix index 17f25e25e3f..4661cf7d803 100644 --- a/pkgs/games/steam/chrootenv.nix +++ b/pkgs/games/steam/chrootenv.nix @@ -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 @@ -204,7 +205,7 @@ in buildFHSUserEnv rec { ** WARNING: Steam is not set up. Add the following options to /etc/nixos/configuration.nix and then run \`sudo nixos-rebuild switch\`: - { + { hardware.opengl.driSupport32Bit = true; hardware.pulseaudio.support32Bit = true; } @@ -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 diff --git a/pkgs/games/steam/steam.nix b/pkgs/games/steam/steam.nix index dd6e9a070b1..95493498f5e 100644 --- a/pkgs/games/steam/steam.nix +++ b/pkgs/games/steam/steam.nix @@ -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 <> ${traceLog} cat \$1 >> ${traceLog} echo >> ${traceLog} diff --git a/pkgs/games/tcl2048/default.nix b/pkgs/games/tcl2048/default.nix index 48fa0a3b518..57e7217fcdb 100644 --- a/pkgs/games/tcl2048/default.nix +++ b/pkgs/games/tcl2048/default.nix @@ -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}" diff --git a/pkgs/games/tibia/default.nix b/pkgs/games/tibia/default.nix index cfef1ed0db2..02c55d7d06c 100644 --- a/pkgs/games/tibia/default.nix +++ b/pkgs/games/tibia/default.nix @@ -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 diff --git a/pkgs/games/tremulous/default.nix b/pkgs/games/tremulous/default.nix index fd1a3e178d5..470856af90e 100644 --- a/pkgs/games/tremulous/default.nix +++ b/pkgs/games/tremulous/default.nix @@ -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 diff --git a/pkgs/games/trigger/default.nix b/pkgs/games/trigger/default.nix index 85157d8df18..ae16510fdc5 100644 --- a/pkgs/games/trigger/default.nix +++ b/pkgs/games/trigger/default.nix @@ -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 < $out/bin/trigger-rally - #!${stdenv.shell} + #!${runtimeShell} exec $out/games/trigger-rally "$@" EOF chmod +x $out/bin/trigger-rally 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 diff --git a/pkgs/games/worldofgoo/default.nix b/pkgs/games/worldofgoo/default.nix index 97bfd9e730c..7d8380e9f7c 100644 --- a/pkgs/games/worldofgoo/default.nix +++ b/pkgs/games/worldofgoo/default.nix @@ -1,25 +1,26 @@ { stdenv, requireFile , libX11, libXext, libXau, libxcb, libXdmcp , SDL, SDL_mixer, libvorbis, libGLU_combined +, runtimeShell , demo ? false }: # TODO: add i686 support stdenv.mkDerivation rec { - name = if demo + name = if demo then "WorldOfGooDemo-1.41" else "WorldofGoo-1.41"; arch = if stdenv.hostPlatform.system == "x86_64-linux" then "supported" else throw "Sorry. World of Goo only is only supported on x86_64 now."; - 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/WorldOfGooSetup.1.41.tar.gz" in the directory where you saved it. - Or you can install the demo version: 'nix-env -i -A pkgs.worldofgoo_demo'. - ''; + Or you can install the demo version: 'nix-env -i -A pkgs.worldofgoo_demo'. + ''; getTheDemo = '' We cannot download the demo version automatically. Please go to @@ -28,8 +29,8 @@ stdenv.mkDerivation rec { directory where you saved it. ''; - src = if demo - then + src = if demo + then requireFile { message = getTheDemo; name = "WorldOfGooDemo.1.41.tar.gz"; @@ -45,7 +46,7 @@ stdenv.mkDerivation rec { phases = "unpackPhase installPhase"; # XXX: stdenv.lib.makeLibraryPath doesn't pick up /lib64 - libPath = stdenv.lib.makeLibraryPath [ stdenv.cc.cc stdenv.cc.libc ] + libPath = stdenv.lib.makeLibraryPath [ stdenv.cc.cc stdenv.cc.libc ] + ":" + stdenv.lib.makeLibraryPath [libX11 libXext libXau libxcb libXdmcp SDL SDL_mixer libvorbis libGLU_combined ] + ":" + stdenv.cc.cc + "/lib64"; @@ -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 diff --git a/pkgs/misc/cups/drivers/mfcj6510dwlpr/default.nix b/pkgs/misc/cups/drivers/mfcj6510dwlpr/default.nix index 607e3c2c57f..e22a159c428 100644 --- a/pkgs/misc/cups/drivers/mfcj6510dwlpr/default.nix +++ b/pkgs/misc/cups/drivers/mfcj6510dwlpr/default.nix @@ -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 diff --git a/pkgs/misc/emulators/higan/default.nix b/pkgs/misc/emulators/higan/default.nix index 45b2f79146c..1349fa0f0b6 100644 --- a/pkgs/misc/emulators/higan/default.nix +++ b/pkgs/misc/emulators/higan/default.nix @@ -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 < $out/bin/higan-init.sh - #!${stdenv.shell} + #!${runtimeShell} cp --recursive --update $out/share/higan/*.sys \$HOME/.local/share/higan/ @@ -69,8 +70,8 @@ stdenv.mkDerivation rec { longDescription = '' higan (formerly bsnes) is a multi-system game console emulator. It currently supports the following systems: - - Nintendo's Famicom, Super Famicom (with subsystems: - Super Game Boy, BS-X Satellaview, Sufami Turbo); + - Nintendo's Famicom, Super Famicom (with subsystems: + Super Game Boy, BS-X Satellaview, Sufami Turbo); Game Boy, Game Boy Color, Game Boy Advance; - Sega's Master System, Game Gear, Mega Drive; - NEC's PC Engine, SuperGrafx; diff --git a/pkgs/misc/emulators/kega-fusion/default.nix b/pkgs/misc/emulators/kega-fusion/default.nix index bdc372c7ca2..4f40c10b037 100644 --- a/pkgs/misc/emulators/kega-fusion/default.nix +++ b/pkgs/misc/emulators/kega-fusion/default.nix @@ -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" diff --git a/pkgs/misc/emulators/retroarch/kodi-advanced-launchers.nix b/pkgs/misc/emulators/retroarch/kodi-advanced-launchers.nix index 6b708cccc8f..1072a66e0ea 100644 --- a/pkgs/misc/emulators/retroarch/kodi-advanced-launchers.nix +++ b/pkgs/misc/emulators/retroarch/kodi-advanced-launchers.nix @@ -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" diff --git a/pkgs/misc/emulators/retrofe/default.nix b/pkgs/misc/emulators/retrofe/default.nix index fa2121f5bc1..2537669bbc4 100644 --- a/pkgs/misc/emulators/retrofe/default.nix +++ b/pkgs/misc/emulators/retrofe/default.nix @@ -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/" diff --git a/pkgs/misc/vim-plugins/vim-utils.nix b/pkgs/misc/vim-plugins/vim-utils.nix index 3e9fb7facf7..14332c70078 100644 --- a/pkgs/misc/vim-plugins/vim-utils.nix +++ b/pkgs/misc/vim-plugins/vim-utils.nix @@ -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 '' diff --git a/pkgs/misc/vscode-extensions/cpptools/default.nix b/pkgs/misc/vscode-extensions/cpptools/default.nix index e5b83511e72..2a9eeae3d57 100644 --- a/pkgs/misc/vscode-extensions/cpptools/default.nix +++ b/pkgs/misc/vscode-extensions/cpptools/default.nix @@ -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 '' diff --git a/pkgs/os-specific/darwin/stubs/default.nix b/pkgs/os-specific/darwin/stubs/default.nix index ec8f948a00b..6fedf0a451e 100644 --- a/pkgs/os-specific/darwin/stubs/default.nix +++ b/pkgs/os-specific/darwin/stubs/default.nix @@ -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: { diff --git a/pkgs/os-specific/linux/bbswitch/default.nix b/pkgs/os-specific/linux/bbswitch/default.nix index f5bc7458240..4b914860068 100644 --- a/pkgs/os-specific/linux/bbswitch/default.nix +++ b/pkgs/os-specific/linux/bbswitch/default.nix @@ -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 diff --git a/pkgs/os-specific/linux/pam_usb/default.nix b/pkgs/os-specific/linux/pam_usb/default.nix index baf24b27562..9b915725514 100644 --- a/pkgs/os-specific/linux/pam_usb/default.nix +++ b/pkgs/os-specific/linux/pam_usb/default.nix @@ -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 diff --git a/pkgs/os-specific/linux/rfkill/udev.nix b/pkgs/os-specific/linux/rfkill/udev.nix index de23071f026..6ba4f8d4b06 100644 --- a/pkgs/os-specific/linux/rfkill/udev.nix +++ b/pkgs/os-specific/linux/rfkill/udev.nix @@ -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 @@ -39,7 +39,7 @@ in stdenv.mkDerivation { installPhase = '' mkdir -p "$out/etc/udev/rules.d/"; cat > "$out/etc/udev/rules.d/90-rfkill.rules" << EOF - SUBSYSTEM=="rfkill", ATTR{type}=="wlan", RUN+="$out/bin/rfkill-hook.sh" + SUBSYSTEM=="rfkill", ATTR{type}=="wlan", RUN+="$out/bin/rfkill-hook.sh" EOF mkdir -p "$out/bin/"; diff --git a/pkgs/os-specific/linux/tp_smapi/update.nix b/pkgs/os-specific/linux/tp_smapi/update.nix index 1b6dfd90b1e..b89912434ec 100644 --- a/pkgs/os-specific/linux/tp_smapi/update.nix +++ b/pkgs/os-specific/linux/tp_smapi/update.nix @@ -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` diff --git a/pkgs/servers/mail/system-sendmail/default.nix b/pkgs/servers/mail/system-sendmail/default.nix index fe0aeb5b3af..7bd7df84924 100644 --- a/pkgs/servers/mail/system-sendmail/default.nix +++ b/pkgs/servers/mail/system-sendmail/default.nix @@ -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 "$@" diff --git a/pkgs/servers/meteor/default.nix b/pkgs/servers/meteor/default.nix index 132f812bf46..b677b6080d1 100644 --- a/pkgs/servers/meteor/default.nix +++ b/pkgs/servers/meteor/default.nix @@ -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 diff --git a/pkgs/servers/monitoring/plugins/default.nix b/pkgs/servers/monitoring/plugins/default.nix index a0f7341571c..3e6eaa4766e 100644 --- a/pkgs/servers/monitoring/plugins/default.nix +++ b/pkgs/servers/monitoring/plugins/default.nix @@ -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 diff --git a/pkgs/servers/nosql/eventstore/default.nix b/pkgs/servers/nosql/eventstore/default.nix index 1d3240fae71..7880c6db7fd 100644 --- a/pkgs/servers/nosql/eventstore/default.nix +++ b/pkgs/servers/nosql/eventstore/default.nix @@ -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 diff --git a/pkgs/servers/web-apps/codimd/default.nix b/pkgs/servers/web-apps/codimd/default.nix index c48a9f938bd..d5e84cce984 100644 --- a/pkgs/servers/web-apps/codimd/default.nix +++ b/pkgs/servers/web-apps/codimd/default.nix @@ -1,5 +1,5 @@ { stdenv, pkgs, buildEnv, fetchFromGitHub, makeWrapper -, fetchpatch, nodejs-6_x, phantomjs2 }: +, fetchpatch, nodejs-6_x, phantomjs2, runtimeShell }: let nodePackages = import ./node.nix { inherit pkgs; @@ -126,7 +126,7 @@ stdenv.mkDerivation rec { installPhase = '' mkdir -p $out/bin cat > $out/bin/codimd < $out/bin/pyIRCt < $out/bin/pyMAILt < $out/bin/zooInspector.sh - #!${stdenv.shell} + #!${runtimeShell} cd $out/share/zooinspector exec ${jre}/bin/java -cp $classpath org.apache.zookeeper.inspector.ZooInspector EOF diff --git a/pkgs/tools/X11/primus/default.nix b/pkgs/tools/X11/primus/default.nix index 669cb4b4844..bf3ff7c6528 100644 --- a/pkgs/tools/X11/primus/default.nix +++ b/pkgs/tools/X11/primus/default.nix @@ -8,6 +8,7 @@ , lib , primusLib , writeScriptBin +, runtimeShell , primusLib_i686 ? null , useNvidia ? true }: @@ -25,7 +26,7 @@ let )); in writeScriptBin "primusrun" '' - #!${stdenv.shell} + #!${runtimeShell} export LD_LIBRARY_PATH=${ldPath}:$LD_LIBRARY_PATH exec "$@" '' diff --git a/pkgs/tools/audio/beets/default.nix b/pkgs/tools/audio/beets/default.nix index 8d2bf5e634c..c9a369ce4f7 100644 --- a/pkgs/tools/audio/beets/default.nix +++ b/pkgs/tools/audio/beets/default.nix @@ -1,5 +1,6 @@ { stdenv, fetchFromGitHub, writeScript, glibcLocales, diffPlugins , pythonPackages, imagemagick, gobject-introspection, gst_all_1 +, runtimeShell , fetchpatch # Attributes needed for tests of the external plugins @@ -227,7 +228,7 @@ in pythonPackages.buildPythonApplication rec { tmphome="$(mktemp -d)" EDITOR="${writeScript "beetconfig.sh" '' - #!${stdenv.shell} + #!${runtimeShell} cat > "$1" < $out/bin/flockit diff --git a/pkgs/tools/compression/mozlz4a/default.nix b/pkgs/tools/compression/mozlz4a/default.nix index ce2aa9520d6..19c160c62f5 100644 --- a/pkgs/tools/compression/mozlz4a/default.nix +++ b/pkgs/tools/compression/mozlz4a/default.nix @@ -1,4 +1,4 @@ -{ stdenv, fetchurl, python3 }: +{ stdenv, fetchurl, python3, runtimeShell }: stdenv.mkDerivation rec { name = "${pname}-${version}"; @@ -16,7 +16,7 @@ stdenv.mkDerivation rec { mkdir -p "$out/bin" "$out/${python3.sitePackages}/" cp "${src}" "$out/${python3.sitePackages}/mozlz4a.py" - echo "#!${stdenv.shell}" >> "$out/bin/mozlz4a" + echo "#!${runtimeShell}" >> "$out/bin/mozlz4a" echo "export PYTHONPATH='$PYTHONPATH'" >> "$out/bin/mozlz4a" echo "'${python3}/bin/python' '$out/${python3.sitePackages}/mozlz4a.py' \"\$@\"" >> "$out/bin/mozlz4a" chmod a+x "$out/bin/mozlz4a" diff --git a/pkgs/tools/graphics/briss/default.nix b/pkgs/tools/graphics/briss/default.nix index fb9b7cae488..a6b3ba01bfa 100644 --- a/pkgs/tools/graphics/briss/default.nix +++ b/pkgs/tools/graphics/briss/default.nix @@ -1,6 +1,6 @@ # The releases of this project are apparently precompiled to .jar files. -{ stdenv, fetchurl, jre }: +{ stdenv, fetchurl, jre, runtimeShell }: let @@ -18,7 +18,7 @@ in stdenv.mkDerivation { mkdir -p "$out/bin"; mkdir -p "$out/share"; install -D -m444 -t "$out/share" *.jar - echo "#!${stdenv.shell}" > "$out/bin/briss" + echo "#!${runtimeShell}" > "$out/bin/briss" echo "${jre}/bin/java -Xms128m -Xmx1024m -cp \"$out/share/\" -jar \"$out/share/briss-${version}.jar\"" >> "$out/bin/briss" chmod +x "$out/bin/briss" ''; diff --git a/pkgs/tools/graphics/mscgen/default.nix b/pkgs/tools/graphics/mscgen/default.nix index e9301731e85..666cdae131e 100644 --- a/pkgs/tools/graphics/mscgen/default.nix +++ b/pkgs/tools/graphics/mscgen/default.nix @@ -1,4 +1,4 @@ -{ stdenv, fetchurl, flex, bison, gd, libpng, libjpeg, freetype, zlib, libwebp }: +{ stdenv, fetchurl, flex, bison, gd, libpng, libjpeg, freetype, zlib, libwebp, runtimeShell }: let version = "0.20"; @@ -15,7 +15,7 @@ stdenv.mkDerivation { doCheck = true; preCheck = '' - sed -i -e "s|#!/bin/bash|#!${stdenv.shell}|" test/renderercheck.sh + sed -i -e "s|#!/bin/bash|#!${runtimeShell}|" test/renderercheck.sh ''; meta = { diff --git a/pkgs/tools/inputmethods/ibus/default.nix b/pkgs/tools/inputmethods/ibus/default.nix index 16580aac955..b561fb626e0 100644 --- a/pkgs/tools/inputmethods/ibus/default.nix +++ b/pkgs/tools/inputmethods/ibus/default.nix @@ -2,7 +2,7 @@ , vala, wrapGAppsHook, dbus, dconf ? null, glib, gdk_pixbuf, gobject-introspection, gtk2 , gtk3, gtk-doc, isocodes, python3, json-glib, libnotify ? null, enablePythonLibrary ? true , enableUI ? true, withWayland ? false, libxkbcommon ? null, wayland ? null -, buildPackages }: +, buildPackages, runtimeShell }: assert withWayland -> wayland != null && libxkbcommon != null; @@ -76,7 +76,7 @@ stdenv.mkDerivation rec { substituteInPlace setup/ibus-setup.in --subst-var-by PYTHON ${python3Runtime.interpreter} substituteInPlace data/dconf/Makefile.am --replace "dconf update" true substituteInPlace configure.ac --replace '$python2dir/ibus' $out/${python3.sitePackages}/ibus - echo \#!${stdenv.shell} > data/dconf/make-dconf-override-db.sh + echo \#!${runtimeShell} > data/dconf/make-dconf-override-db.sh cp ${buildPackages.gtk-doc}/share/gtk-doc/data/gtk-doc.make . ''; 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 <