From dadc7eb3297e6c2fb0c0e01149c8fcebd80770c1 Mon Sep 17 00:00:00 2001 From: Jörg Thalheim Date: Tue, 26 Feb 2019 11:45:54 +0000 Subject: treewide: use runtimeShell instead of stdenv.shell whenever possible Whenever we create scripts that are installed to $out, we must use runtimeShell in order to get the shell that can be executed on the machine we create the package for. This is relevant for cross-compiling. The only use case for stdenv.shell are scripts that are executed as part of the build system. Usages in checkPhase are borderline however to decrease the likelyhood of people copying the wrong examples, I decided to use runtimeShell as well. --- pkgs/applications/audio/spotifywm/default.nix | 4 ++-- pkgs/applications/editors/standardnotes/default.nix | 4 ++-- pkgs/applications/editors/sublime/3/common.nix | 4 ++-- pkgs/applications/editors/vim/configurable.nix | 21 +++++++++++---------- pkgs/applications/graphics/alchemy/default.nix | 4 ++-- pkgs/applications/graphics/autotrace/default.nix | 7 ++++--- pkgs/applications/graphics/swingsane/default.nix | 4 ++-- pkgs/applications/graphics/wings/default.nix | 5 ++--- pkgs/applications/graphics/zgrviewer/default.nix | 4 ++-- pkgs/applications/misc/avrdudess/default.nix | 4 ++-- pkgs/applications/misc/curabydagoma/default.nix | 4 ++-- pkgs/applications/misc/glava/default.nix | 4 ++-- pkgs/applications/misc/hello-unfree/default.nix | 4 ++-- pkgs/applications/misc/jbidwatcher/default.nix | 4 ++-- pkgs/applications/misc/multibootusb/default.nix | 4 ++-- pkgs/applications/misc/nix-tour/default.nix | 4 ++-- pkgs/applications/misc/openjump/default.nix | 4 ++-- .../applications/misc/terminal-notifier/default.nix | 4 ++-- pkgs/applications/misc/thinking-rock/default.nix | 10 +++++----- pkgs/applications/misc/vue/default.nix | 4 ++-- .../networking/browsers/firefox-bin/update.nix | 3 ++- .../networking/browsers/firefox/update.nix | 3 ++- .../telegram/telegram-cli/default.nix | 7 ++++--- .../applications/networking/irc/weechat/wrapper.nix | 4 ++-- .../networking/mailreaders/msgviewer/default.nix | 4 ++-- .../networking/mailreaders/neomutt/default.nix | 4 ++-- pkgs/applications/office/mendeley/default.nix | 3 ++- pkgs/applications/office/mendeley/update.nix | 4 ++-- pkgs/applications/office/moneyplex/default.nix | 5 +++-- .../science/electronics/alliance/default.nix | 6 +++--- .../science/electronics/eagle/eagle7.nix | 4 ++-- .../science/logic/hol_light/default.nix | 4 ++-- pkgs/applications/science/logic/leo3/binary.nix | 4 ++-- pkgs/applications/science/math/sage/sage-src.nix | 3 ++- pkgs/applications/video/dvd-slideshow/default.nix | 4 ++-- 35 files changed, 88 insertions(+), 81 deletions(-) (limited to 'pkgs/applications') diff --git a/pkgs/applications/audio/spotifywm/default.nix b/pkgs/applications/audio/spotifywm/default.nix index f22340b69412f..64ae9491535ae 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 5b0560e5831d5..454b7ad554ba6 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 71bd3544febbf..937764f0ab8bc 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 7ee28adfa47fd..3b75d08787e8c 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 30223658f5356..09664889f35bc 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 7af7c8986f2fd..cc08dce906c3a 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 ac3de4a4e1419..d0f2a48c589d2 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 e27f074b21baf..891f3586fa596 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 c60d4b7b904d6..ac3d303a7a60c 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 1144d51528473..4227b4155acfe 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 1ea106d6a18b4..4e620425d5c34 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 2c46ea3ac9a6e..72a24026a89d7 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 88a7b94897dc2..a2678d6067f95 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 09ec343386287..c98defee57a09 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 b05c8a8039966..3599bd0030b9b 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 a448d35485a7d..1feec9e455098 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 ee022e329f9fc..97163ffa76208 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 07ae2c040e6e8..b03720f988a6c 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 3c9157081d3dc..2b744c61ccb5d 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 a8c322b42b831..0da451ed51e22 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 9c4c22dabe978..892ebcee99f9e 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 147c95b8e7bd9..c174e7dc668d4 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 9f4ed80e6d80a..ad621303d7d3b 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 d5720440f7cca..69b111562ab2b 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 ffd25b6238b76..099e2102c517f 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 a3834dc70b6d8..dcea9c27acb41 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 b9d0a9ef4486d..7302b5e337d0a 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 a329321b70c65..344c47eb934aa 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 -- cgit 1.4.1