treewide: use runtimeShell instead of stdenv.shell whenever possible

Whenever we create scripts that are installed to $out, we must use runtimeShell
in order to get the shell that can be executed on the machine we create the
package for. This is relevant for cross-compiling. The only use case for
stdenv.shell are scripts that are executed as part of the build system.
Usages in checkPhase are borderline however to decrease the likelyhood
of people copying the wrong examples, I decided to use runtimeShell as well.
This commit is contained in:
Jörg Thalheim 2019-02-26 11:45:54 +00:00
parent 1233c8d9e9
commit dadc7eb329
No known key found for this signature in database
GPG key ID: B3F5D81B0C6967C4
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' /> contents = pkgs.redis; <co xml:id='ex-dockerTools-buildImage-6' />
runAsRoot = '' <co xml:id='ex-dockerTools-buildImage-runAsRoot' /> runAsRoot = '' <co xml:id='ex-dockerTools-buildImage-runAsRoot' />
#!${stdenv.shell} #!${pkgs.runtimeShell}
mkdir -p /data mkdir -p /data
''; '';
@ -544,7 +544,7 @@ buildImage {
name = "shadow-basic"; name = "shadow-basic";
runAsRoot = '' runAsRoot = ''
#!${stdenv.shell} #!${pkgs.runtimeShell}
${shadowSetup} ${shadowSetup}
groupadd -r redis groupadd -r redis
useradd -r -g redis redis useradd -r -g redis redis

View file

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

View file

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

View file

@ -1,6 +1,6 @@
{buildVersion, x32sha256, x64sha256}: {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, pkexecPath ? "/run/wrappers/bin/pkexec", libredirect,
gksuSupport ? false, gksu, unzip, zip, bash}: gksuSupport ? false, gksu, unzip, zip, bash}:
@ -115,7 +115,7 @@ in stdenv.mkDerivation (rec {
mkdir -p $out/bin mkdir -p $out/bin
cat > $out/bin/subl <<-EOF cat > $out/bin/subl <<-EOF
#!${stdenv.shell} #!${runtimeShell}
exec $sublime/sublime_text "\$@" exec $sublime/sublime_text "\$@"
EOF EOF
chmod +x $out/bin/subl chmod +x $out/bin/subl

View file

@ -7,6 +7,7 @@
, vimPlugins , vimPlugins
, makeWrapper , makeWrapper
, wrapGAppsHook , wrapGAppsHook
, runtimeShell
# apple frameworks # apple frameworks
, CoreServices, CoreData, Cocoa, Foundation, libobjc, cf-private , CoreServices, CoreData, Cocoa, Foundation, libobjc, cf-private
@ -157,22 +158,22 @@ in stdenv.mkDerivation rec {
rewrap () { rewrap () {
rm -f "$out/bin/$1" 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" chmod a+x "$out/bin/$1"
} }
rewrap ex -e rewrap ex -e
rewrap view -R rewrap view -R
rewrap gvim -g rewrap gvim -g
rewrap gex -eg rewrap gex -eg
rewrap gview -Rg rewrap gview -Rg
rewrap rvim -Z rewrap rvim -Z
rewrap rview -RZ rewrap rview -RZ
rewrap rgvim -gZ rewrap rgvim -gZ
rewrap rgview -RgZ rewrap rgview -RgZ
rewrap evim -y rewrap evim -y
rewrap eview -yR rewrap eview -yR
rewrap vimdiff -d rewrap vimdiff -d
rewrap gvimdiff -gd rewrap gvimdiff -gd
''; '';

View file

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

View file

@ -1,5 +1,6 @@
{ stdenv, fetchurl, callPackage, libpng12, imagemagick, { stdenv, fetchurl, callPackage, libpng12, imagemagick
autoreconfHook, glib, pstoedit, pkgconfig, gettext, gd, darwin }: , autoreconfHook, glib, pstoedit, pkgconfig, gettext, gd, darwin
, runtimeShell }:
# TODO: Figure out why the resultant binary is somehow linked against # TODO: Figure out why the resultant binary is somehow linked against
# libpng16.so.16 rather than libpng12. # libpng16.so.16 rather than libpng12.
@ -51,7 +52,7 @@ stdenv.mkDerivation rec {
# pstoedit-config no longer exists, it was replaced with pkg-config # pstoedit-config no longer exists, it was replaced with pkg-config
mkdir wrappers mkdir wrappers
cat >wrappers/pstoedit-config <<'EOF' cat >wrappers/pstoedit-config <<'EOF'
#!${stdenv.shell} #!${runtimeShell}
# replace --version with --modversion for pkg-config # replace --version with --modversion for pkg-config
args=''${@/--version/--modversion} args=''${@/--version/--modversion}
exec pkg-config pstoedit "''${args[@]}" 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 { stdenv.mkDerivation rec {
name = "swingsane-${version}"; name = "swingsane-${version}";
@ -16,7 +16,7 @@ stdenv.mkDerivation rec {
installPhase = let installPhase = let
execWrapper = '' execWrapper = ''
#!${stdenv.shell} #!${runtimeShell}
exec ${jre}/bin/java -jar $out/share/java/swingsane/swingsane-${version}.jar "$@" 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 { stdenv.mkDerivation rec {
name = "wings-2.2.1"; name = "wings-2.2.1";
@ -28,7 +28,7 @@ stdenv.mkDerivation rec {
cp ebin/* $out/lib/${name}/ebin cp ebin/* $out/lib/${name}/ebin
cp -R textures shaders plugins $out/lib/$name cp -R textures shaders plugins $out/lib/$name
cat << EOF > $out/bin/wings cat << EOF > $out/bin/wings
#!${stdenv.shell} #!${runtimeShell}
${erlang}/bin/erl \ ${erlang}/bin/erl \
-pa $out/lib/${name}/ebin -run wings_start start_halt "$@" -pa $out/lib/${name}/ebin -run wings_start start_halt "$@"
EOF EOF
@ -43,4 +43,3 @@ stdenv.mkDerivation rec {
platforms = with stdenv.lib.platforms; linux; platforms = with stdenv.lib.platforms; linux;
}; };
} }

View file

@ -1,4 +1,4 @@
{stdenv, fetchurl, jre, unzip}: { stdenv, fetchurl, jre, unzip, runtimeShell }:
stdenv.mkDerivation rec { stdenv.mkDerivation rec {
version = "0.9.0"; version = "0.9.0";
pname = "zgrviewer"; pname = "zgrviewer";
@ -16,7 +16,7 @@ stdenv.mkDerivation rec {
cp -r target/* "$out/share/java/zvtm/" 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" echo "${jre}/lib/openjdk/jre/bin/java -jar '$out/share/java/zvtm/zgrviewer-${version}.jar' \"\$@\"" >> "$out/bin/zgrviewer"
chmod a+x "$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 { stdenv.mkDerivation rec {
name = "avrdudess-2.2.20140102"; name = "avrdudess-2.2.20140102";
@ -19,7 +19,7 @@ stdenv.mkDerivation rec {
unzip "$src" -d "$out/avrdudess" unzip "$src" -d "$out/avrdudess"
cat >> "$out/bin/avrdudess" << __EOF__ cat >> "$out/bin/avrdudess" << __EOF__
#!${stdenv.shell} #!${runtimeShell}
export LD_LIBRARY_PATH="${stdenv.lib.makeLibraryPath [gtk2 mono]}" export LD_LIBRARY_PATH="${stdenv.lib.makeLibraryPath [gtk2 mono]}"
# We need PATH from user env for xdg-open to find its tools, which # We need PATH from user env for xdg-open to find its tools, which
# typically depend on the currently running desktop environment. # 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, # This package uses a precompiled "binary" distribution of CuraByDagoma,
# distributed by the editor. # distributed by the editor.
@ -44,7 +44,7 @@ stdenv.mkDerivation rec {
mkdir $out/bin mkdir $out/bin
cat > $out/bin/curabydago <<EOF cat > $out/bin/curabydago <<EOF
#!${stdenv.shell} #!${runtimeShell}
export PYTHONPATH=$PYTHONPATH export PYTHONPATH=$PYTHONPATH
${python.out}/bin/python $out/curabydago/cura.py ${python.out}/bin/python $out/curabydago/cura.py
EOF EOF

View file

@ -1,12 +1,12 @@
{ stdenv, writeScript, fetchFromGitHub { stdenv, writeScript, fetchFromGitHub
, libGL, libX11, libXext, python3, libXrandr, libXrender, libpulseaudio, libXcomposite , libGL, libX11, libXext, python3, libXrandr, libXrender, libpulseaudio, libXcomposite
, enableGlfw ? false, glfw }: , enableGlfw ? false, glfw, runtimeShell }:
let let
inherit (stdenv.lib) optional makeLibraryPath; inherit (stdenv.lib) optional makeLibraryPath;
wrapperScript = writeScript "glava" '' wrapperScript = writeScript "glava" ''
#!${stdenv.shell} #!${runtimeShell}
case "$1" in case "$1" in
--copy-config) --copy-config)
# The binary would symlink it, which won't work in Nix because the # 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 { stdenv.mkDerivation rec {
name = "example-unfree-package-${version}"; name = "example-unfree-package-${version}";
@ -9,7 +9,7 @@ stdenv.mkDerivation rec {
installPhase = '' installPhase = ''
mkdir -p $out/bin mkdir -p $out/bin
cat > $out/bin/hello-unfree << EOF cat > $out/bin/hello-unfree << EOF
#!${stdenv.shell} #!${runtimeShell}
echo "Hello, you are running an unfree system!" echo "Hello, you are running an unfree system!"
EOF EOF
chmod +x $out/bin/hello-unfree chmod +x $out/bin/hello-unfree

View file

@ -1,4 +1,4 @@
{ stdenv, fetchurl, java }: { stdenv, fetchurl, java, runtimeShell }:
stdenv.mkDerivation rec { stdenv.mkDerivation rec {
pname = "jbidwatcher"; pname = "jbidwatcher";
@ -21,7 +21,7 @@ stdenv.mkDerivation rec {
installPhase = '' installPhase = ''
mkdir -p "$out/bin" 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}" echo >>"$out/bin/${pname}" "${java}/bin/java -Xmx512m -jar ${jarfile}"
chmod +x "$out/bin/${pname}" chmod +x "$out/bin/${pname}"
install -D -m644 ${src} ${jarfile} 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 { python36Packages.buildPythonApplication rec {
pname = "multibootusb"; pname = "multibootusb";
name = "${pname}-${version}"; name = "${pname}-${version}";
@ -40,7 +40,7 @@ python36Packages.buildPythonApplication rec {
mkdir "$out/bin" mkdir "$out/bin"
cat > "$out/bin/${pname}" <<EOF cat > "$out/bin/${pname}" <<EOF
#!${stdenv.shell} #!${runtimeShell}
cd "$share" cd "$share"
export PYTHONPATH="$PYTHONPATH:$share" export PYTHONPATH="$PYTHONPATH:$share"
export PATH="$PATH:${parted}/bin:${procps}/bin" export PATH="$PATH:${parted}/bin:${procps}/bin"

View file

@ -1,4 +1,4 @@
{ stdenv, fetchgit, electron } : { stdenv, fetchgit, electron, runtimeShell } :
stdenv.mkDerivation rec { stdenv.mkDerivation rec {
name = "nix-tour-${version}"; name = "nix-tour-${version}";
@ -19,7 +19,7 @@ stdenv.mkDerivation rec {
mkdir -p $out/share mkdir -p $out/share
cp -R * $out/share cp -R * $out/share
chmod 0755 $out/share/ -R 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 "cd $out/share/" >> $out/bin/nix-tour
echo "${electron}/bin/electron $out/share/electron-main.js" >> $out/bin/nix-tour echo "${electron}/bin/electron $out/share/electron-main.js" >> $out/bin/nix-tour
chmod 0755 $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 { stdenv.mkDerivation {
name = "openjump-1.3.1"; name = "openjump-1.3.1";
@ -17,7 +17,7 @@ stdenv.mkDerivation {
s=$out/bin/OpenJump s=$out/bin/OpenJump
dir=$(echo $out/openjump-*) dir=$(echo $out/openjump-*)
cat >> $s << EOF cat >> $s << EOF
#!${stdenv.shell} #!${runtimeShell}
cd $dir/bin cd $dir/bin
exec ${stdenv.shell} openjump.sh exec ${stdenv.shell} openjump.sh
EOF EOF

View file

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

View file

@ -1,4 +1,4 @@
{ stdenv, fetchurl }: { stdenv, fetchurl, runtimeShell }:
stdenv.mkDerivation { stdenv.mkDerivation {
name = "thinkingrock-binary-2.2.1"; name = "thinkingrock-binary-2.2.1";
@ -11,7 +11,7 @@ stdenv.mkDerivation {
/* it would be a really bad idea to put thinkingrock tr executable in PATH! /* it would be a really bad idea to put thinkingrock tr executable in PATH!
the tr.sh script does use the coreutils tr itself the tr.sh script does use the coreutils tr itself
That's why I've renamed the wrapper and called it thinkingrock That's why I've renamed the wrapper and called it thinkingrock
However you may not rename the bin/tr script cause it will notice and throw an However you may not rename the bin/tr script cause it will notice and throw an
"java.lang.IllegalArgumentException: Malformed branding token: thinkingrock" "java.lang.IllegalArgumentException: Malformed branding token: thinkingrock"
exception. I hope that's fine exception. I hope that's fine
*/ */
@ -24,15 +24,15 @@ stdenv.mkDerivation {
mkdir -p $out/{nix-support/tr-files,bin} mkdir -p $out/{nix-support/tr-files,bin}
cp -r . $out/nix-support/tr-files cp -r . $out/nix-support/tr-files
cat >> $out/bin/thinkingrock << EOF cat >> $out/bin/thinkingrock << EOF
#!${stdenv.shell} #!${runtimeShell}
exec $out/nix-support/tr-files/bin/tr "$@" exec $out/nix-support/tr-files/bin/tr "$@"
EOF EOF
chmod +x $out/bin/thinkingrock chmod +x $out/bin/thinkingrock
''; '';
installPhase = ":"; installPhase = ":";
meta = { meta = {
description = "Task management system"; description = "Task management system";
homepage = http://www.thinkingrock.com.au/; homepage = http://www.thinkingrock.com.au/;
license = "CDDL"; # Common Development and Distribution License license = "CDDL"; # Common Development and Distribution License

View file

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

View file

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

View file

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

View file

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

View file

@ -1,5 +1,5 @@
{ stdenv, lib, runCommand, writeScriptBin, buildEnv { stdenv, lib, runCommand, writeScriptBin, buildEnv
, pythonPackages, perlPackages , pythonPackages, perlPackages, runtimeShell
}: }:
weechat: weechat:
@ -60,7 +60,7 @@ let
in "${scripts};${init}"; in "${scripts};${init}";
mkWeechat = bin: (writeScriptBin bin '' mkWeechat = bin: (writeScriptBin bin ''
#!${stdenv.shell} #!${runtimeShell}
export WEECHAT_EXTRA_LIBDIR=${pluginsDir} export WEECHAT_EXTRA_LIBDIR=${pluginsDir}
${lib.concatMapStringsSep "\n" (p: lib.optionalString (p ? extraEnv) p.extraEnv) plugins} ${lib.concatMapStringsSep "\n" (p: lib.optionalString (p ? extraEnv) p.extraEnv) plugins}
exec ${weechat}/bin/${bin} "$@" --run-command ${lib.escapeShellArg init} 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 let
version = "1.9"; version = "1.9";
@ -20,7 +20,7 @@ in stdenv.mkDerivation rec {
mv $dir/${uname}/* $dir mv $dir/${uname}/* $dir
rmdir $dir/${uname} rmdir $dir/${uname}
cat <<_EOF > $out/bin/msgviewer cat <<_EOF > $out/bin/msgviewer
#!${stdenv.shell} -eu #!${runtimeShell} -eu
exec ${stdenv.lib.getBin jre}/bin/java -jar $dir/MSGViewer.jar "\$@" exec ${stdenv.lib.getBin jre}/bin/java -jar $dir/MSGViewer.jar "\$@"
_EOF _EOF
chmod 755 $out/bin/msgviewer chmod 755 $out/bin/msgviewer

View file

@ -1,11 +1,11 @@
{ stdenv, fetchFromGitHub, gettext, makeWrapper, tcl, which, writeScript { stdenv, fetchFromGitHub, gettext, makeWrapper, tcl, which, writeScript
, ncurses, perl , cyrus_sasl, gss, gpgme, kerberos, libidn, libxml2, notmuch, openssl , 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 let
muttWrapper = writeScript "mutt" '' muttWrapper = writeScript "mutt" ''
#!${stdenv.shell} -eu #!${runtimeShell} -eu
echo 'The neomutt project has renamed the main binary from `mutt` to `neomutt`.' echo 'The neomutt project has renamed the main binary from `mutt` to `neomutt`.'
echo "" echo ""

View file

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

View file

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

View file

@ -1,5 +1,6 @@
{ stdenv, fetchurl, patchelf, coreutils, pcsclite { 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 let
libPath = stdenv.lib.makeLibraryPath [ libPath = stdenv.lib.makeLibraryPath [
@ -38,7 +39,7 @@ stdenv.mkDerivation rec {
mkdir "$out/bin" mkdir "$out/bin"
cat > $out/bin/moneyplex <<EOF cat > $out/bin/moneyplex <<EOF
#!${stdenv.shell} #!${runtimeShell}
if [ -z "\$XDG_DATA_HOME" ]; then if [ -z "\$XDG_DATA_HOME" ]; then
MDIR=\$HOME/.local/share/moneyplex MDIR=\$HOME/.local/share/moneyplex

View file

@ -1,6 +1,6 @@
{ stdenv, fetchurl { stdenv, fetchurl
, xorgproto, motif, libX11, libXt, libXpm, bison , xorgproto, motif, libX11, libXt, libXpm, bison
, flex, automake, autoconf, libtool , flex, automake, autoconf, libtool, runtimeShell
}: }:
stdenv.mkDerivation rec { stdenv.mkDerivation rec {
@ -39,12 +39,12 @@ stdenv.mkDerivation rec {
''; '';
allianceInstaller = '' allianceInstaller = ''
#!${stdenv.shell} #!${runtimeShell}
cp -v -r -n --no-preserve=mode $out/etc/* /etc/ > /etc/alliance-install.log cp -v -r -n --no-preserve=mode $out/etc/* /etc/ > /etc/alliance-install.log
''; '';
allianceUnInstaller = '' allianceUnInstaller = ''
#!${stdenv.shell} #!${runtimeShell}
awk '{print \$3}' /etc/alliance-install.log | xargs rm awk '{print \$3}' /etc/alliance-install.log | xargs rm
awk '{print \$3}' /etc/alliance-install.log | xargs rmdir awk '{print \$3}' /etc/alliance-install.log | xargs rmdir
rm /etc/alliance-install.log rm /etc/alliance-install.log

View file

@ -1,6 +1,6 @@
{ stdenv, fetchurl, makeDesktopItem, patchelf, zlib, freetype, fontconfig { stdenv, fetchurl, makeDesktopItem, patchelf, zlib, freetype, fontconfig
, openssl, libXrender, libXrandr, libXcursor, libX11, libXext, libXi , openssl, libXrender, libXrandr, libXcursor, libX11, libXext, libXi
, libxcb, cups, xkeyboardconfig , libxcb, cups, xkeyboardconfig, runtimeShell
}: }:
let let
@ -72,7 +72,7 @@ stdenv.mkDerivation rec {
dynlinker="$(cat $NIX_CC/nix-support/dynamic-linker)" dynlinker="$(cat $NIX_CC/nix-support/dynamic-linker)"
mkdir -p "$out"/bin mkdir -p "$out"/bin
cat > "$out"/bin/eagle << EOF cat > "$out"/bin/eagle << EOF
#!${stdenv.shell} #!${runtimeShell}
export LD_LIBRARY_PATH="${stdenv.cc.cc.lib}/lib:${libPath}" export LD_LIBRARY_PATH="${stdenv.cc.cc.lib}/lib:${libPath}"
export LD_PRELOAD="$out/lib/eagle_fixer.so" export LD_PRELOAD="$out/lib/eagle_fixer.so"
export QT_XKB_CONFIG_ROOT="${xkeyboardconfig}/share/X11/xkb" 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 let
load_num = load_num =
@ -11,7 +11,7 @@ let
start_script = start_script =
'' ''
#!${stdenv.shell} #!${runtimeShell}
cd $out/lib/hol_light cd $out/lib/hol_light
exec ${ocaml}/bin/ocaml \ exec ${ocaml}/bin/ocaml \
-I \`${camlp5}/bin/camlp5 -where\` \ -I \`${camlp5}/bin/camlp5 -where\` \

View file

@ -1,4 +1,4 @@
{stdenv, fetchurl, openjdk}: {stdenv, fetchurl, openjdk, runtimeShell}:
stdenv.mkDerivation rec { stdenv.mkDerivation rec {
pname = "leo3"; pname = "leo3";
version = "1.2"; version = "1.2";
@ -13,7 +13,7 @@ stdenv.mkDerivation rec {
installPhase = '' installPhase = ''
mkdir -p "$out"/{bin,lib/java/leo3} mkdir -p "$out"/{bin,lib/java/leo3}
cp "${jar}" "$out/lib/java/leo3/leo3.jar" 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" echo "'${openjdk}/bin/java' -jar '$out/lib/java/leo3/leo3.jar' \"\$@\"" > "$out/bin/leo3"
chmod a+x "$out/bin/leo3" chmod a+x "$out/bin/leo3"
''; '';

View file

@ -1,6 +1,7 @@
{ stdenv { stdenv
, fetchFromGitHub , fetchFromGitHub
, fetchpatch , fetchpatch
, runtimeShell
}: }:
# This file is responsible for fetching the sage source and adding necessary patches. # 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' \ -e 's/sage-python23/python/g' \
-i {} \; -i {} \;
echo '#!${stdenv.shell} echo '#!${runtimeShell}
python "$@"' > build/bin/sage-python23 python "$@"' > build/bin/sage-python23
# Do not use sage-env-config (generated by ./configure). # 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 let
binPath = lib.makeBinPath [ cdrtools dvdauthor ffmpeg imagemagick lame mjpegtools sox transcode vorbis-tools ]; binPath = lib.makeBinPath [ cdrtools dvdauthor ffmpeg imagemagick lame mjpegtools sox transcode vorbis-tools ];
wrapper = writeScript "dvd-slideshow.sh" '' wrapper = writeScript "dvd-slideshow.sh" ''
#!${stdenv.shell} #!${runtimeShell}
# wrapper script for dvd-slideshow programs # wrapper script for dvd-slideshow programs
export PATH=${binPath}:$PATH export PATH=${binPath}:$PATH

View file

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

View file

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

View file

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

View file

@ -1,4 +1,4 @@
{ lib, stdenv, stdenvNoCC, lndir }: { lib, stdenv, stdenvNoCC, lndir, runtimeShell }:
let let
@ -15,12 +15,12 @@ rec {
/* Run the shell command `buildCommand' to produce a store path named /* Run the shell command `buildCommand' to produce a store path named
* `name'. The attributes in `env' are added to the environment * `name'. The attributes in `env' are added to the environment
* prior to running the command. By default `runCommand' runs using * prior to running the command. By default `runCommand' runs using
* stdenv with no compiler environment. `runCommandCC` * stdenv with no compiler environment. `runCommandCC`
* *
* Examples: * Examples:
* runCommand "name" {envVariable = true;} ''echo hello'' * runCommand "name" {envVariable = true;} ''echo hello''
* runCommandNoCC "name" {envVariable = true;} ''echo hello'' # equivalent to prior * runCommandNoCC "name" {envVariable = true;} ''echo hello'' # equivalent to prior
* runCommandCC "name" {} ''gcc -o myfile myfile.c; cp myfile $out''; * runCommandCC "name" {} ''gcc -o myfile myfile.c; cp myfile $out'';
*/ */
runCommand = runCommandNoCC; runCommand = runCommandNoCC;
runCommandNoCC = runCommand' stdenvNoCC; runCommandNoCC = runCommand' stdenvNoCC;
@ -145,11 +145,11 @@ rec {
executable = true; executable = true;
destination = "/bin/${name}"; destination = "/bin/${name}";
text = '' text = ''
#!${stdenv.shell} #!${runtimeShell}
${text} ${text}
''; '';
checkPhase = '' checkPhase = ''
${stdenv.shell} -n $out/bin/${name} ${runtimeShell} -n $out/bin/${name}
''; '';
}; };
@ -215,7 +215,7 @@ rec {
* myhellohook = makeSetupHook { deps = [ hello ]; } ./myscript.sh; * myhellohook = makeSetupHook { deps = [ hello ]; } ./myscript.sh;
* *
* # wrotes a setup hook where @bash@ myscript.sh is substituted for the * # wrotes a setup hook where @bash@ myscript.sh is substituted for the
* # bash interpreter. * # bash interpreter.
* myhellohookSub = makeSetupHook { * myhellohookSub = makeSetupHook {
* deps = [ hello ]; * deps = [ hello ];
* substitutions = { bash = "${pkgs.bash}/bin/bash"; }; * substitutions = { bash = "${pkgs.bash}/bin/bash"; };
@ -278,7 +278,7 @@ rec {
* packages that cannot be built automatically. * packages that cannot be built automatically.
* *
* Examples: * Examples:
* *
* requireFile { * requireFile {
* name = "my-file"; * name = "my-file";
* url = "http://example.com/download/"; * url = "http://example.com/download/";

View file

@ -1,5 +1,6 @@
{ stdenv, writeScript, vmTools, makeInitrd { stdenv, writeScript, vmTools, makeInitrd
, samba, vde2, openssh, socat, netcat-gnu, coreutils, gnugrep, gzip , samba, vde2, openssh, socat, netcat-gnu, coreutils, gnugrep, gzip
, runtimeShell
}: }:
{ sshKey { sshKey
@ -74,7 +75,7 @@ let
loopForever = "while :; do ${coreutils}/bin/sleep 1; done"; loopForever = "while :; do ${coreutils}/bin/sleep 1; done";
initScript = writeScript "init.sh" ('' initScript = writeScript "init.sh" (''
#!${stdenv.shell} #!${runtimeShell}
${coreutils}/bin/cp -L "${sshKey}" /ssh.key ${coreutils}/bin/cp -L "${sshKey}" /ssh.key
${coreutils}/bin/chmod 600 /ssh.key ${coreutils}/bin/chmod 600 /ssh.key
'' + (if installMode then '' '' + (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 let
@ -15,7 +15,7 @@ let
# #
dockitems-script = writeScript "dockitems-script" '' dockitems-script = writeScript "dockitems-script" ''
#!${stdenv.shell} #!${runtimeShell}
elementary_default_settings="${elementary-default-settings}" elementary_default_settings="${elementary-default-settings}"
dock_items="$elementary_default_settings/share/elementary/config/plank/dock1/launchers"/* 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 let
options = rec { options = rec {
@ -76,7 +76,7 @@ stdenv.mkDerivation rec {
cp -r . "$out/share/ccl-installation" cp -r . "$out/share/ccl-installation"
mkdir -p "$out/bin" 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}" chmod a+x "$out"/bin/"${CCL_RUNTIME}"
ln -s "$out"/bin/"${CCL_RUNTIME}" "$out"/bin/ccl 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 { stdenv.mkDerivation rec {
name = "cmdstan-2.17.1"; 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/stanc $out/bin/stanc
ln -s $out/opt/cmdstan/bin/stansummary $out/bin/stansummary ln -s $out/opt/cmdstan/bin/stansummary $out/bin/stansummary
cat > $out/bin/stan <<EOF cat > $out/bin/stan <<EOF
#!${stdenv.shell} #!${runtimeShell}
make -C $out/opt/cmdstan "\$(realpath "\$1")" make -C $out/opt/cmdstan "\$(realpath "\$1")"
EOF EOF
chmod a+x $out/bin/stan chmod a+x $out/bin/stan

View file

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

View file

@ -1,4 +1,4 @@
{ stdenv, fetchurl, path }: { stdenv, fetchurl, path, runtimeShell }:
stdenv.mkDerivation rec { stdenv.mkDerivation rec {
name = "${pname}-${version}"; name = "${pname}-${version}";
pname = "safefile"; pname = "safefile";
@ -13,7 +13,7 @@ stdenv.mkDerivation rec {
passthru = { passthru = {
updateScript = '' updateScript = ''
#!${stdenv.shell} #!${runtimeShell}
cd ${toString ./.} cd ${toString ./.}
${toString path}/pkgs/build-support/upstream-updater/update-walker.sh default.nix ${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 { stdenv.mkDerivation {
name = "avr8-burn-omat-2.1.2"; name = "avr8-burn-omat-2.1.2";
@ -18,8 +18,8 @@ stdenv.mkDerivation {
mkdir -p $out/{nix-support,bin} mkdir -p $out/{nix-support,bin}
mv *.jar license_gpl-3.0.txt lib *.xml *.png $out/nix-support mv *.jar license_gpl-3.0.txt lib *.xml *.png $out/nix-support
cat >> $out/bin/avr8-burn-omat << EOF cat >> $out/bin/avr8-burn-omat << EOF
#!${stdenv.shell} #!${runtimeShell}
cd $out/nix-support; exec java -jar AVR8_Burn_O_Mat.jar cd $out/nix-support; exec java -jar AVR8_Burn_O_Mat.jar
EOF EOF
chmod +x $out/bin/avr8-burn-omat chmod +x $out/bin/avr8-burn-omat
''; '';

View file

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

View file

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

View file

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

View file

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

View file

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

View file

@ -6,6 +6,7 @@
# Allow to independently override the jdks used to build and run respectively # Allow to independently override the jdks used to build and run respectively
, buildJdk, runJdk , buildJdk, runJdk
, buildJdkName , buildJdkName
, runtimeShell
# Always assume all markers valid (don't redownload dependencies). # Always assume all markers valid (don't redownload dependencies).
# Also, don't clean up environment variables. # Also, don't clean up environment variables.
, enableNixHacks ? false , enableNixHacks ? false
@ -281,7 +282,7 @@ stdenv.mkDerivation rec {
mkdir -p tools mkdir -p tools
cat > tools/bazel <<"EOF" cat > tools/bazel <<"EOF"
#!${stdenv.shell} -e #!${runtimeShell} -e
exit 1 exit 1
EOF EOF
chmod +x tools/bazel chmod +x tools/bazel
@ -290,7 +291,7 @@ stdenv.mkDerivation rec {
! hello_test ! hello_test
cat > tools/bazel <<"EOF" cat > tools/bazel <<"EOF"
#!${stdenv.shell} -e #!${runtimeShell} -e
exec "$BAZEL_REAL" "$@" exec "$BAZEL_REAL" "$@"
EOF 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 { stdenv.mkDerivation rec {
version = "0.7.0"; version = "0.7.0";
src = fetchFromGitHub { src = fetchFromGitHub {
@ -16,7 +17,7 @@ stdenv.mkDerivation rec {
cp -r python/bin $out/bin cp -r python/bin $out/bin
''; '';
passthru.updateScript = '' passthru.updateScript = ''
#!${stdenv.shell} #!${runtimeShell}
set -e set -e
echo echo
cd ${toString ./.} 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 let
binPath = stdenv.lib.makeBinPath ([ hyper-haskell-server ] ++ extra-packages); binPath = stdenv.lib.makeBinPath ([ hyper-haskell-server ] ++ extra-packages);
@ -34,7 +35,7 @@ in stdenv.mkDerivation rec {
# install electron wrapper script # install electron wrapper script
cat > $out/bin/hyper-haskell <<EOF cat > $out/bin/hyper-haskell <<EOF
#!${stdenv.shell} #!${runtimeShell}
export PATH="${binPath}:\$PATH" export PATH="${binPath}:\$PATH"
exec ${electron}/bin/electron $out/app "\$@" exec ${electron}/bin/electron $out/app "\$@"
EOF EOF

View file

@ -1,5 +1,5 @@
{ stdenv, fetchFromGitHub, makeWrapper { stdenv, fetchFromGitHub, makeWrapper
, cmake, llvmPackages, rapidjson }: , cmake, llvmPackages, rapidjson, runtimeShell }:
stdenv.mkDerivation rec { stdenv.mkDerivation rec {
name = "ccls-${version}"; name = "ccls-${version}";
@ -17,7 +17,7 @@ stdenv.mkDerivation rec {
cmakeFlags = [ "-DSYSTEM_CLANG=ON" ]; cmakeFlags = [ "-DSYSTEM_CLANG=ON" ];
shell = stdenv.shell; shell = runtimeShell;
postFixup = '' postFixup = ''
# We need to tell ccls where to find the standard library headers. # We need to tell ccls where to find the standard library headers.

View file

@ -1,5 +1,6 @@
{ fetchFromGitHub, makeWrapper { fetchFromGitHub, makeWrapper
, cmake, llvmPackages, ncurses }: , cmake, llvmPackages, ncurses
, runtimeShell }:
let let
src = fetchFromGitHub { src = fetchFromGitHub {
@ -28,7 +29,7 @@ stdenv.mkDerivation rec {
"-DCMAKE_OSX_DEPLOYMENT_TARGET=10.12" "-DCMAKE_OSX_DEPLOYMENT_TARGET=10.12"
]; ];
shell = stdenv.shell; shell = runtimeShell;
postFixup = '' postFixup = ''
# We need to tell cquery where to find the standard library headers. # 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 # the derivation. use language extensions specified by args
ctagsWrapped = makeOverridable ( {args, name} : pkgs.writeScriptBin name '' ctagsWrapped = makeOverridable ( {args, name} : pkgs.writeScriptBin name ''
#!${stdenv.shell} #!${pkgs.runtimeShell}
exec ${pkgs.ctags}/bin/ctags ${concatStringsSep " " (map escapeShellArg args)} "$@" exec ${pkgs.ctags}/bin/ctags ${concatStringsSep " " (map escapeShellArg args)} "$@"
'') { '') {
args = let x = pkgs.ctagsWrapped; in concatLists [ args = let x = pkgs.ctagsWrapped; in concatLists [

View file

@ -1,5 +1,6 @@
{ stdenv, fetchFromGitHub, popt, avahi, pkgconfig, python, gtk2, runCommand { stdenv, fetchFromGitHub, popt, avahi, pkgconfig, python, gtk2, runCommand
, gcc, autoconf, automake, which, procps, libiberty_static , gcc, autoconf, automake, which, procps, libiberty_static
, runtimeShell
, sysconfDir ? "" # set this parameter to override the default value $out/etc , sysconfDir ? "" # set this parameter to override the default value $out/etc
, static ? false , static ? false
}: }:
@ -53,7 +54,7 @@ let
mkdir -p $out/bin mkdir -p $out/bin
if [ -x "${gcc.cc}/bin/gcc" ]; then if [ -x "${gcc.cc}/bin/gcc" ]; then
cat > $out/bin/gcc << EOF cat > $out/bin/gcc << EOF
#!${stdenv.shell} #!${runtimeShell}
${extraConfig} ${extraConfig}
exec ${distcc}/bin/distcc gcc "\$@" exec ${distcc}/bin/distcc gcc "\$@"
EOF EOF
@ -61,7 +62,7 @@ let
fi fi
if [ -x "${gcc.cc}/bin/g++" ]; then if [ -x "${gcc.cc}/bin/g++" ]; then
cat > $out/bin/g++ << EOF cat > $out/bin/g++ << EOF
#!${stdenv.shell} #!${runtimeShell}
${extraConfig} ${extraConfig}
exec ${distcc}/bin/distcc g++ "\$@" exec ${distcc}/bin/distcc g++ "\$@"
EOF 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 { stdenv.mkDerivation rec {
name = "opengrok-${version}"; name = "opengrok-${version}";
@ -16,7 +16,7 @@ stdenv.mkDerivation rec {
mkdir -p $out mkdir -p $out
cp -a * $out/ cp -a * $out/
substituteInPlace $out/bin/OpenGrok --replace "/bin/uname" "${coreutils}/bin/uname" 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 \ wrapProgram $out/bin/OpenGrok \
--prefix PATH : "${stdenv.lib.makeBinPath [ ctags git ]}" \ --prefix PATH : "${stdenv.lib.makeBinPath [ ctags git ]}" \
--set JAVA_HOME "${jre}" \ --set JAVA_HOME "${jre}" \

View file

@ -9,7 +9,7 @@
{ stdenv, fetchurl, unzip, glib, libSM, libICE, gtk2, libXext, libXft { stdenv, fetchurl, unzip, glib, libSM, libICE, gtk2, libXext, libXft
, fontconfig, libXrender, libXfixes, libX11, libXi, libXrandr, libXcursor , fontconfig, libXrender, libXfixes, libX11, libXi, libXrandr, libXcursor
, freetype, libXinerama, libxcb, zlib, pciutils , freetype, libXinerama, libxcb, zlib, pciutils
, makeDesktopItem, xkeyboardconfig , makeDesktopItem, xkeyboardconfig, runtimeShell
}: }:
let let
@ -70,7 +70,7 @@ stdenv.mkDerivation rec {
# Make wrapper script that uses the LD_PRELOAD library # Make wrapper script that uses the LD_PRELOAD library
mkdir -p "$out/bin" mkdir -p "$out/bin"
cat > "$out/bin/saleae-logic" << EOF cat > "$out/bin/saleae-logic" << EOF
#!${stdenv.shell} #!${runtimeShell}
export LD_PRELOAD="$out/lib/preload.so" export LD_PRELOAD="$out/lib/preload.so"
export QT_XKB_CONFIG_ROOT="${xkeyboardconfig}/share/X11/xkb" export QT_XKB_CONFIG_ROOT="${xkeyboardconfig}/share/X11/xkb"
export PATH="${pciutils}/bin:\$PATH" 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 { rustPlatform.buildRustPackage rec {
name = "rust-bindgen-${version}"; name = "rust-bindgen-${version}";
@ -32,7 +33,7 @@ rustPlatform.buildRustPackage rec {
doCheck = true; doCheck = true;
checkInputs = checkInputs =
let fakeRustup = writeScriptBin "rustup" '' let fakeRustup = writeScriptBin "rustup" ''
#!${stdenv.shell} #!${runtimeShell}
shift shift
shift shift
exec "$@" exec "$@"

View file

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

View file

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

View file

@ -9,10 +9,11 @@
, common-updater-scripts , common-updater-scripts
, majorVersion , majorVersion
, nix , nix
, runtimeShell
}: }:
writeScript "update-nodejs" '' writeScript "update-nodejs" ''
#!${stdenv.shell} #!${runtimeShell}
PATH=${lib.makeBinPath [ common-updater-scripts coreutils curl gnugrep jq gnupg nix ]} PATH=${lib.makeBinPath [ common-updater-scripts coreutils curl gnugrep jq gnupg nix ]}
HOME=`mktemp -d` 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"; let plainName = "andyetitmoves";
version = "1.2.2"; 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 patchelf --set-interpreter $(cat $NIX_CC/nix-support/dynamic-linker) --set-rpath $fullPath $out/opt/andyetitmoves/lib/$binName
cat > $out/bin/$binName << EOF cat > $out/bin/$binName << EOF
#!${stdenv.shell} #!${runtimeShell}
cd $out/opt/andyetitmoves cd $out/opt/andyetitmoves
exec ./lib/$binName exec ./lib/$binName
EOF 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 { stdenv.mkDerivation rec {
version = "1.3.2"; version = "1.3.2";
@ -21,7 +21,7 @@ stdenv.mkDerivation rec {
cp AstroMenace $out cp AstroMenace $out
cp gamedata.vfs $out cp gamedata.vfs $out
cat > $out/bin/AstroMenace << EOF cat > $out/bin/AstroMenace << EOF
#!${stdenv.shell} #!${runtimeShell}
$out/AstroMenace --dir=$out $out/AstroMenace --dir=$out
EOF EOF
chmod 755 $out/bin/AstroMenace chmod 755 $out/bin/AstroMenace

View file

@ -1,6 +1,6 @@
{ stdenv, fetchFromGitHub, pkgconfig, gettext, lua, ncurses { stdenv, fetchFromGitHub, pkgconfig, gettext, lua, ncurses
, tiles, SDL2, SDL2_image, SDL2_mixer, SDL2_ttf, freetype, Cocoa , tiles, SDL2, SDL2_image, SDL2_mixer, SDL2_ttf, freetype, Cocoa
, debug , debug, runtimeShell
}: }:
let let
@ -86,7 +86,7 @@ let
mkdir $app/Contents/MacOS mkdir $app/Contents/MacOS
launcher=$app/Contents/MacOS/Cataclysm.sh launcher=$app/Contents/MacOS/Cataclysm.sh
cat << EOF > $launcher cat << EOF > $launcher
#!${stdenv.shell} #!${runtimeShell}
$out/bin/cataclysm-tiles $out/bin/cataclysm-tiles
EOF EOF
chmod 555 $launcher chmod 555 $launcher

View file

@ -1,5 +1,5 @@
{ stdenv, fetchurl, flac, gtk2, libvorbis, libvpx, makeDesktopItem, libGLU_combined, nasm { stdenv, fetchurl, flac, gtk2, libvorbis, libvpx, makeDesktopItem, libGLU_combined, nasm
, pkgconfig, SDL2, SDL2_mixer }: , pkgconfig, SDL2, SDL2_mixer, runtimeShell }:
let let
year = "2015"; year = "2015";
@ -45,7 +45,7 @@ in stdenv.mkDerivation rec {
installPhase = '' installPhase = ''
# Make wrapper script # Make wrapper script
cat > eduke32-wrapper <<EOF cat > eduke32-wrapper <<EOF
#!${stdenv.shell} #!${runtimeShell}
if [ "$EDUKE32_DATA_DIR" = "" ]; then if [ "$EDUKE32_DATA_DIR" = "" ]; then
EDUKE32_DATA_DIR=/var/lib/games/eduke32 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 { stdenv.mkDerivation {
name = "fsg-4.4"; name = "fsg-4.4";
@ -24,7 +25,7 @@ stdenv.mkDerivation {
installPhase = '' installPhase = ''
mkdir -p $out/bin $out/libexec mkdir -p $out/bin $out/libexec
cp sand $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 chmod a+x $out/bin/fsg
''; '';

View file

@ -1,11 +1,11 @@
{ stdenv, config, fetchurl, libX11, libXext, libXinerama, libXrandr { stdenv, config, fetchurl, libX11, libXext, libXinerama, libXrandr
, libXrender, fontconfig, freetype, openal }: , libXrender, fontconfig, freetype, openal, runtimeShell }:
let inherit (stdenv.lib) makeLibraryPath; in let inherit (stdenv.lib) makeLibraryPath; in
stdenv.mkDerivation { stdenv.mkDerivation {
name = "oilrush"; name = "oilrush";
src = src =
let let
url = config.oilrush.url or null; url = config.oilrush.url or null;
sha256 = config.oilrush.sha256 or null; sha256 = config.oilrush.sha256 or null;
@ -54,7 +54,7 @@ stdenv.mkDerivation {
cp -r * "$out/opt/oilrush" cp -r * "$out/opt/oilrush"
mkdir -p "$out/bin" mkdir -p "$out/bin"
cat << EOF > "$out/bin/oilrush" cat << EOF > "$out/bin/oilrush"
#!${stdenv.shell} #!${runtimeShell}
LD_LIBRARY_PATH=.:${makeLibraryPath [ openal ]}:\$LD_LIBRARY_PATH LD_LIBRARY_PATH=.:${makeLibraryPath [ openal ]}:\$LD_LIBRARY_PATH
cd "$out/opt/oilrush" cd "$out/opt/oilrush"
exec ./launcher_$arch.sh "\$@" exec ./launcher_$arch.sh "\$@"
@ -66,7 +66,7 @@ stdenv.mkDerivation {
longDescription = '' longDescription = ''
Oil Rush is a real-time naval strategy game based on group control. It 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 combines the strategic challenge of a classical RTS with the sheer fun
of Tower Defense. of Tower Defense.
''; '';
homepage = http://oilrush-game.com/; homepage = http://oilrush-game.com/;
license = stdenv.lib.licenses.unfree; license = stdenv.lib.licenses.unfree;

View file

@ -1,7 +1,7 @@
{ stdenv, fetchurl, fetchzip, pkgconfig, SDL, libpng, zlib, xz, freetype, fontconfig { stdenv, fetchurl, fetchzip, pkgconfig, SDL, libpng, zlib, xz, freetype, fontconfig
, withOpenGFX ? true, withOpenSFX ? true, withOpenMSX ? true , withOpenGFX ? true, withOpenSFX ? true, withOpenMSX ? true
, withFluidSynth ? true, audioDriver ? "alsa", fluidsynth, soundfont-fluid, procps , withFluidSynth ? true, audioDriver ? "alsa", fluidsynth, soundfont-fluid, procps
, writeScriptBin, makeWrapper , writeScriptBin, makeWrapper, runtimeShell
}: }:
let let
@ -21,7 +21,7 @@ let
}; };
playmidi = writeScriptBin "playmidi" '' playmidi = writeScriptBin "playmidi" ''
#!${stdenv.shell} #!${runtimeShell}
trap "${procps}/bin/pkill fluidsynth" EXIT trap "${procps}/bin/pkill fluidsynth" EXIT
${fluidsynth}/bin/fluidsynth -a ${audioDriver} -i ${soundfont-fluid}/share/soundfonts/FluidR3_GM2-2.sf2 $* ${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 { stdenv, fetchsvn, libGLU_combined, SDL, SDL_image, SDL_mixer
, libpng, zlib, libjpeg, imagemagick, libX11 , libpng, zlib, libjpeg, imagemagick, libX11, runtimeShell
}: }:
stdenv.mkDerivation rec { stdenv.mkDerivation rec {
@ -30,12 +30,12 @@ stdenv.mkDerivation rec {
cp -rv packages $out/share/sauerbraten/ cp -rv packages $out/share/sauerbraten/
cp -rv data $out/share/sauerbraten/ cp -rv data $out/share/sauerbraten/
cat > $out/bin/sauerbraten_server <<EOF cat > $out/bin/sauerbraten_server <<EOF
#!${stdenv.shell} #!${runtimeShell}
cd $out/share/sauerbraten cd $out/share/sauerbraten
./sauer_server "\$@" ./sauer_server "\$@"
EOF EOF
cat > $out/bin/sauerbraten_client <<EOF cat > $out/bin/sauerbraten_client <<EOF
#!${stdenv.shell} #!${runtimeShell}
cd $out/share/sauerbraten cd $out/share/sauerbraten
./sauer_client "\$@" ./sauer_client "\$@"
EOF EOF

View file

@ -1,5 +1,5 @@
{ stdenv, lib, fetchurl, makeDesktopItem, unzip, writeText { stdenv, lib, fetchurl, makeDesktopItem, unzip, writeText
, scummvm }: , scummvm, runtimeShell }:
let let
desktopItem = name: short: long: description: makeDesktopItem { desktopItem = name: short: long: description: makeDesktopItem {
@ -13,7 +13,7 @@ let
}; };
run = name: short: code: writeText "${short}.sh" '' run = name: short: code: writeText "${short}.sh" ''
#!${stdenv.shell} -eu #!${runtimeShell} -eu
exec ${scummvm}/bin/scummvm \ exec ${scummvm}/bin/scummvm \
--path=@out@/share/${name} \ --path=@out@/share/${name} \

View file

@ -1,5 +1,5 @@
{ stdenv, fetchurl, pkgconfig, unzip, zlib, libpng, bzip2, SDL, SDL_mixer { stdenv, fetchurl, pkgconfig, unzip, zlib, libpng, bzip2, SDL, SDL_mixer
, buildEnv, config , buildEnv, config, runtimeShell
}: }:
let let
@ -95,7 +95,7 @@ let
postBuild = '' postBuild = ''
rm "$out/bin" && mkdir "$out/bin" rm "$out/bin" && mkdir "$out/bin"
cat > "$out/bin/simutrans" <<EOF cat > "$out/bin/simutrans" <<EOF
#!${stdenv.shell} #!${runtimeShell}
cd "$out"/share/simutrans cd "$out"/share/simutrans
exec "${binaries}/bin/simutrans" -use_workdir "\''${extraFlagsArray[@]}" "\$@" exec "${binaries}/bin/simutrans" -use_workdir "\''${extraFlagsArray[@]}" "\$@"
EOF EOF
@ -167,4 +167,3 @@ let
}; };
in result in result

View file

@ -1,6 +1,6 @@
{ fetchurl, stdenv, libGLU_combined, freeglut, libX11, plib, openal, freealut, libXrandr, xorgproto, { fetchurl, stdenv, libGLU_combined, freeglut, libX11, plib, openal, freealut, libXrandr, xorgproto,
libXext, libSM, libICE, libXi, libXt, libXrender, libXxf86vm, openscenegraph, expat, 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 { stdenv.mkDerivation rec {
version = "2.2.1-r6404"; version = "2.2.1-r6404";
@ -52,7 +52,7 @@ stdenv.mkDerivation rec {
postInstall = '' postInstall = ''
mkdir "$out/bin" mkdir "$out/bin"
for i in "$out"/games/*; do 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")" echo "$i"' "$@"' >> "$out/bin/$(basename "$i")"
chmod a+x "$out/bin/$(basename "$i")" chmod a+x "$out/bin/$(basename "$i")"
done done

View file

@ -4,6 +4,7 @@
, extraProfile ? "" # string to append to profile , extraProfile ? "" # string to append to profile
, nativeOnly ? false , nativeOnly ? false
, runtimeOnly ? false , runtimeOnly ? false
, runtimeShell
# DEPRECATED # DEPRECATED
, withJava ? config.steam.java or false , 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); ++ 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" '' runSh = writeScript "run.sh" ''
#!${stdenv.shell} #!${runtimeShell}
runtime_paths="${lib.concatStringsSep ":" ldPath}" runtime_paths="${lib.concatStringsSep ":" ldPath}"
if [ "$1" == "--print-steam-runtime-library-paths" ]; then if [ "$1" == "--print-steam-runtime-library-paths" ]; then
echo "$runtime_paths" echo "$runtime_paths"
@ -195,7 +196,7 @@ in buildFHSUserEnv rec {
'' + extraProfile; '' + extraProfile;
runScript = writeScript "steam-wrapper.sh" '' runScript = writeScript "steam-wrapper.sh" ''
#!${stdenv.shell} #!${runtimeShell}
if [ -f /host/etc/NIXOS ]; then # Check only useful on NixOS if [ -f /host/etc/NIXOS ]; then # Check only useful on NixOS
${glxinfo-i686}/bin/glxinfo >/dev/null 2>&1 ${glxinfo-i686}/bin/glxinfo >/dev/null 2>&1
# If there was an error running glxinfo, we know something is wrong with the configuration # 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 WARNING: Steam is not set up. Add the following options to /etc/nixos/configuration.nix
and then run \`sudo nixos-rebuild switch\`: and then run \`sudo nixos-rebuild switch\`:
{ {
hardware.opengl.driSupport32Bit = true; hardware.opengl.driSupport32Bit = true;
hardware.pulseaudio.support32Bit = true; hardware.pulseaudio.support32Bit = true;
} }
@ -226,7 +227,7 @@ in buildFHSUserEnv rec {
inherit multiPkgs extraBuildCommands; inherit multiPkgs extraBuildCommands;
runScript = writeScript "steam-run" '' runScript = writeScript "steam-run" ''
#!${stdenv.shell} #!${runtimeShell}
run="$1" run="$1"
if [ "$run" = "" ]; then if [ "$run" = "" ]; then
echo "Usage: steam-run command-to-run args..." >&2 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 let
traceLog = "/tmp/steam-trace-dependencies.log"; traceLog = "/tmp/steam-trace-dependencies.log";
@ -18,7 +18,7 @@ in stdenv.mkDerivation rec {
rm $out/bin/steamdeps rm $out/bin/steamdeps
${stdenv.lib.optionalString traceDeps '' ${stdenv.lib.optionalString traceDeps ''
cat > $out/bin/steamdeps <<EOF cat > $out/bin/steamdeps <<EOF
#!${stdenv.shell} #!${runtimeShell}
echo \$1 >> ${traceLog} echo \$1 >> ${traceLog}
cat \$1 >> ${traceLog} cat \$1 >> ${traceLog}
echo >> ${traceLog} echo >> ${traceLog}

View file

@ -1,4 +1,4 @@
{ stdenv, fetchurl, tcl, tcllib }: { stdenv, fetchurl, tcl, tcllib, runtimeShell }:
stdenv.mkDerivation { stdenv.mkDerivation {
name = "tcl2048-0.4.0"; name = "tcl2048-0.4.0";
@ -14,7 +14,7 @@ stdenv.mkDerivation {
mkdir -pv $out/bin mkdir -pv $out/bin
cp $src $out/2048.tcl cp $src $out/2048.tcl
cat > $out/bin/2048 << EOF cat > $out/bin/2048 << EOF
#!${stdenv.shell} #!${runtimeShell}
# wrapper for tcl2048 # wrapper for tcl2048
export TCLLIBPATH="${tcllib}/lib/tcllib${tcllib.version}" 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; with stdenv.lib;
stdenv.mkDerivation { stdenv.mkDerivation {
@ -38,7 +38,7 @@ stdenv.mkDerivation {
# The wrapper script itself. We use $LD_LIBRARY_PATH for libGL. # The wrapper script itself. We use $LD_LIBRARY_PATH for libGL.
cat << EOF > "$out/bin/Tibia" cat << EOF > "$out/bin/Tibia"
#!${stdenv.shell} #!${runtimeShell}
cd $out/res cd $out/res
${glibc.out}/lib/ld-linux.so.2 --library-path \$LD_LIBRARY_PATH ./Tibia "\$@" ${glibc.out}/lib/ld-linux.so.2 --library-path \$LD_LIBRARY_PATH ./Tibia "\$@"
EOF 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 { stdenv.mkDerivation rec {
name = "tremulous-${version}"; name = "tremulous-${version}";
version = "1.1.0"; version = "1.1.0";
@ -49,7 +49,7 @@ stdenv.mkDerivation rec {
for b in tremulous tremded for b in tremulous tremded
do do
cat << EOF > $out/bin/$b cat << EOF > $out/bin/$b
#!${stdenv.shell} #!${runtimeShell}
cd $out/opt/tremulous cd $out/opt/tremulous
exec ./$b.$arch "\$@" exec ./$b.$arch "\$@"
EOF 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 { stdenv.mkDerivation rec {
name = "trigger-rally-0.6.5"; name = "trigger-rally-0.6.5";
@ -23,7 +24,7 @@ stdenv.mkDerivation rec {
postInstall = '' postInstall = ''
mkdir -p $out/bin mkdir -p $out/bin
cat <<EOF > $out/bin/trigger-rally cat <<EOF > $out/bin/trigger-rally
#!${stdenv.shell} #!${runtimeShell}
exec $out/games/trigger-rally "$@" exec $out/games/trigger-rally "$@"
EOF EOF
chmod +x $out/bin/trigger-rally chmod +x $out/bin/trigger-rally

View file

@ -1,14 +1,14 @@
{ stdenv, requireFile, SDL, libpulseaudio, alsaLib }: { stdenv, requireFile, SDL, libpulseaudio, alsaLib, runtimeShell }:
stdenv.mkDerivation rec { stdenv.mkDerivation rec {
name = "vessel-12082012"; name = "vessel-12082012";
goBuyItNow = '' goBuyItNow = ''
We cannot download the full version automatically, as you require a license. 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. 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 You can do this by using "nix-prefetch-url file://\$PWD/${name}-bin" in the
directory where you saved it. directory where you saved it.
''; '';
src = if (stdenv.isi686) then src = if (stdenv.isi686) then
requireFile { requireFile {
@ -20,7 +20,7 @@ stdenv.mkDerivation rec {
phases = "installPhase"; phases = "installPhase";
ld_preload = ./isatty.c; 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 ] ; + ":" + stdenv.lib.makeLibraryPath [ SDL libpulseaudio alsaLib ] ;
installPhase = '' installPhase = ''
@ -30,11 +30,11 @@ stdenv.mkDerivation rec {
# allow scripting of the mojoinstaller # allow scripting of the mojoinstaller
gcc -fPIC -shared -o isatty.so $ld_preload gcc -fPIC -shared -o isatty.so $ld_preload
echo @@@ echo @@@
echo @@@ this next step appears to hang for a while 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 LD_PRELOAD=./isatty.so $(cat $NIX_CC/nix-support/dynamic-linker) $src << IM_A_BOT
n n
$out/libexec/strangeloop/vessel/ $out/libexec/strangeloop/vessel/
@ -45,7 +45,7 @@ stdenv.mkDerivation rec {
rm $out/libexec/strangeloop/vessel/x86/libstdc++* rm $out/libexec/strangeloop/vessel/x86/libstdc++*
# props to Ethan Lee (the Vessel porter) for understanding # 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 \ patchelf \
--interpreter "$(cat $NIX_CC/nix-support/dynamic-linker)" \ --interpreter "$(cat $NIX_CC/nix-support/dynamic-linker)" \
--set-rpath $libPath:$out/libexec/strangeloop/vessel/x86/ \ --set-rpath $libPath:$out/libexec/strangeloop/vessel/x86/ \
@ -59,7 +59,7 @@ stdenv.mkDerivation rec {
done done
cat > $out/bin/Vessel << EOW cat > $out/bin/Vessel << EOW
#!${stdenv.shell} #!${runtimeShell}
cd $out/libexec/strangeloop/vessel/ cd $out/libexec/strangeloop/vessel/
exec ./x86/vessel.x86 exec ./x86/vessel.x86
EOW EOW

View file

@ -1,25 +1,26 @@
{ stdenv, requireFile { stdenv, requireFile
, libX11, libXext, libXau, libxcb, libXdmcp , SDL, SDL_mixer, libvorbis, libGLU_combined , libX11, libXext, libXau, libxcb, libXdmcp , SDL, SDL_mixer, libvorbis, libGLU_combined
, runtimeShell
, demo ? false }: , demo ? false }:
# TODO: add i686 support # TODO: add i686 support
stdenv.mkDerivation rec { stdenv.mkDerivation rec {
name = if demo name = if demo
then "WorldOfGooDemo-1.41" then "WorldOfGooDemo-1.41"
else "WorldofGoo-1.41"; else "WorldofGoo-1.41";
arch = if stdenv.hostPlatform.system == "x86_64-linux" then "supported" arch = if stdenv.hostPlatform.system == "x86_64-linux" then "supported"
else throw "Sorry. World of Goo only is only supported on x86_64 now."; 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. 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. 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 You can do this by using "nix-prefetch-url file://\$PWD/WorldOfGooSetup.1.41.tar.gz" in the
directory where you saved it. 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 = '' getTheDemo = ''
We cannot download the demo version automatically. Please go to We cannot download the demo version automatically. Please go to
@ -28,8 +29,8 @@ stdenv.mkDerivation rec {
directory where you saved it. directory where you saved it.
''; '';
src = if demo src = if demo
then then
requireFile { requireFile {
message = getTheDemo; message = getTheDemo;
name = "WorldOfGooDemo.1.41.tar.gz"; name = "WorldOfGooDemo.1.41.tar.gz";
@ -45,7 +46,7 @@ stdenv.mkDerivation rec {
phases = "unpackPhase installPhase"; phases = "unpackPhase installPhase";
# XXX: stdenv.lib.makeLibraryPath doesn't pick up /lib64 # 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.lib.makeLibraryPath [libX11 libXext libXau libxcb libXdmcp SDL SDL_mixer libvorbis libGLU_combined ]
+ ":" + stdenv.cc.cc + "/lib64"; + ":" + stdenv.cc.cc + "/lib64";
@ -60,7 +61,7 @@ stdenv.mkDerivation rec {
#makeWrapper doesn't do cd. :( #makeWrapper doesn't do cd. :(
cat > $out/bin/WorldofGoo << EOF cat > $out/bin/WorldofGoo << EOF
#!${stdenv.shell} #!${runtimeShell}
cd $out/libexec/2dboy/WorldOfGoo cd $out/libexec/2dboy/WorldOfGoo
exec ./WorldOfGoo.bin64 exec ./WorldOfGoo.bin64
EOF 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 }: , ghostscript, a2ps }:
# Why: # Why:
@ -34,7 +34,7 @@ stdenv.mkDerivation rec {
unpackPhase = "true"; unpackPhase = "true";
brprintconf_mfcj6510dw_script = '' brprintconf_mfcj6510dw_script = ''
#!${stdenv.shell} #!${runtimeShell}
cd $(mktemp -d) cd $(mktemp -d)
ln -s @out@/usr/bin/brprintconf_mfcj6510dw_patched brprintconf_mfcj6510dw_patched ln -s @out@/usr/bin/brprintconf_mfcj6510dw_patched brprintconf_mfcj6510dw_patched
ln -s @out@/opt/brother/Printers/mfcj6510dw/inf/brmfcj6510dwfunc brmfcj6510dwfunc ln -s @out@/opt/brother/Printers/mfcj6510dw/inf/brmfcj6510dwfunc brmfcj6510dwfunc

View file

@ -4,7 +4,8 @@
, udev , udev
, libGLU_combined, SDL , libGLU_combined, SDL
, libao, openal, libpulseaudio , libao, openal, libpulseaudio
, gtk2, gtksourceview }: , gtk2, gtksourceview
, runtimeShell }:
with stdenv.lib; with stdenv.lib;
stdenv.mkDerivation rec { stdenv.mkDerivation rec {
@ -55,7 +56,7 @@ stdenv.mkDerivation rec {
# stuff needed by higan at runtime # stuff needed by higan at runtime
cat <<EOF > $out/bin/higan-init.sh cat <<EOF > $out/bin/higan-init.sh
#!${stdenv.shell} #!${runtimeShell}
cp --recursive --update $out/share/higan/*.sys \$HOME/.local/share/higan/ cp --recursive --update $out/share/higan/*.sys \$HOME/.local/share/higan/
@ -69,8 +70,8 @@ stdenv.mkDerivation rec {
longDescription = '' longDescription = ''
higan (formerly bsnes) is a multi-system game console emulator. higan (formerly bsnes) is a multi-system game console emulator.
It currently supports the following systems: It currently supports the following systems:
- Nintendo's Famicom, Super Famicom (with subsystems: - Nintendo's Famicom, Super Famicom (with subsystems:
Super Game Boy, BS-X Satellaview, Sufami Turbo); Super Game Boy, BS-X Satellaview, Sufami Turbo);
Game Boy, Game Boy Color, Game Boy Advance; Game Boy, Game Boy Color, Game Boy Advance;
- Sega's Master System, Game Gear, Mega Drive; - Sega's Master System, Game Gear, Mega Drive;
- NEC's PC Engine, SuperGrafx; - NEC's PC Engine, SuperGrafx;

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 let
libPath = lib.makeLibraryPath [ stdenv.cc.cc libGLU glib gtk2 alsaLib libSM libX11 gdk_pixbuf pango libXinerama ]; 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" '' runner = writeText "kega-fusion" ''
#!${stdenv.shell} -ex #!${runtimeShell} -ex
kega_libdir="@out@/lib/kega-fusion" kega_libdir="@out@/lib/kega-fusion"
kega_localdir="$HOME/.Kega Fusion" kega_localdir="$HOME/.Kega Fusion"

View file

@ -1,4 +1,4 @@
{ stdenv, pkgs, cores }: { stdenv, pkgs, cores, runtimeShell }:
assert cores != []; assert cores != [];
@ -7,7 +7,7 @@ with pkgs.lib;
let let
script = exec: '' script = exec: ''
#!${stdenv.shell} #!${runtimeShell}
nohup sh -c "pkill -SIGTSTP kodi" & nohup sh -c "pkill -SIGTSTP kodi" &
# https://forum.kodi.tv/showthread.php?tid=185074&pid=1622750#pid1622750 # https://forum.kodi.tv/showthread.php?tid=185074&pid=1622750#pid1622750
nohup sh -c "sleep 10 && ${exec} '$@' -f;pkill -SIGCONT kodi" 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 { 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 { stdenv.mkDerivation rec {
@ -38,7 +38,7 @@ stdenv.mkDerivation rec {
mv $out/share/retrofe/example/retrofe $out/bin/ mv $out/share/retrofe/example/retrofe $out/bin/
cat > $out/bin/retrofe-init << EOF cat > $out/bin/retrofe-init << EOF
#!${stdenv.shell} #!${runtimeShell}
echo "This will install retrofe's example files into this directory" echo "This will install retrofe's example files into this directory"
echo "Example files location: $out/share/retrofe/example/" echo "Example files location: $out/share/retrofe/example/"

View file

@ -1,6 +1,6 @@
{ stdenv, vim, vimPlugins, vim_configurable, neovim, buildEnv, writeText, writeScriptBin { stdenv, vim, vimPlugins, vim_configurable, neovim, buildEnv, writeText, writeScriptBin
, nix-prefetch-hg, nix-prefetch-git , nix-prefetch-hg, nix-prefetch-git
, fetchFromGitHub , fetchFromGitHub, runtimeShell
}: }:
/* /*
@ -374,7 +374,7 @@ rec {
let let
rcOption = o: file: stdenv.lib.optionalString (file != null) "-${o} ${file}"; rcOption = o: file: stdenv.lib.optionalString (file != null) "-${o} ${file}";
vimWrapperScript = writeScriptBin vimExecutableName '' vimWrapperScript = writeScriptBin vimExecutableName ''
#!${stdenv.shell} #!${runtimeShell}
exec ${vimExecutable} ${rcOption "u" vimrcFile} ${rcOption "U" gvimrcFile} "$@" exec ${vimExecutable} ${rcOption "u" vimrcFile} ${rcOption "U" gvimrcFile} "$@"
''; '';
gvimWrapperScript = writeScriptBin gvimExecutableName '' 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. , 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" '' openDebugAD7Script = writeScript "OpenDebugAD7" ''
#!${stdenv.shell} #!${runtimeShell}
BIN_DIR="$(cd "$(dirname "$0")" && pwd -P)" BIN_DIR="$(cd "$(dirname "$0")" && pwd -P)"
${if gdbUseFixed ${if gdbUseFixed
then '' then ''

View file

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

View file

@ -1,4 +1,4 @@
{ stdenv, fetchurl, fetchpatch, kernel }: { stdenv, fetchurl, fetchpatch, kernel, runtimeShell }:
let let
baseName = "bbswitch"; baseName = "bbswitch";
@ -36,12 +36,12 @@ stdenv.mkDerivation {
mkdir -p $out/bin mkdir -p $out/bin
tee $out/bin/discrete_vga_poweroff << EOF tee $out/bin/discrete_vga_poweroff << EOF
#!${stdenv.shell} #!${runtimeShell}
echo -n OFF > /proc/acpi/bbswitch echo -n OFF > /proc/acpi/bbswitch
EOF EOF
tee $out/bin/discrete_vga_poweron << EOF tee $out/bin/discrete_vga_poweron << EOF
#!${stdenv.shell} #!${runtimeShell}
echo -n ON > /proc/acpi/bbswitch echo -n ON > /proc/acpi/bbswitch
EOF 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 let
@ -11,7 +11,7 @@ let
bin = "${drv}${path}"; bin = "${drv}${path}";
in assert name != ""; in assert name != "";
writeScript "setUID-${name}" '' writeScript "setUID-${name}" ''
#!${stdenv.shell} #!${runtimeShell}
inode=$(stat -Lc %i ${bin}) inode=$(stat -Lc %i ${bin})
for file in $(type -ap ${name}); do for file in $(type -ap ${name}); do
case $(stat -Lc %a $file) in case $(stat -Lc %a $file) in

View file

@ -10,7 +10,7 @@
# Add a hook script in the managed etc directory, e.g.: # Add a hook script in the managed etc directory, e.g.:
# etc = [ # etc = [
# { source = pkgs.writeScript "rtfkill.hook" '' # { source = pkgs.writeScript "rtfkill.hook" ''
# #!${stdenv.shell} # #!${pkgs.runtimeShell}
# #
# if [ "$RFKILL_STATE" -eq "1" ]; then # if [ "$RFKILL_STATE" -eq "1" ]; then
# exec ${config.system.build.upstart}/sbin/initctl emit -n antenna-on # exec ${config.system.build.upstart}/sbin/initctl emit -n antenna-on
@ -39,7 +39,7 @@ in stdenv.mkDerivation {
installPhase = '' installPhase = ''
mkdir -p "$out/etc/udev/rules.d/"; mkdir -p "$out/etc/udev/rules.d/";
cat > "$out/etc/udev/rules.d/90-rfkill.rules" << EOF 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 EOF
mkdir -p "$out/bin/"; mkdir -p "$out/bin/";

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" '' writeScript "update-tp_smapi" ''
#!${stdenv.shell} #!${runtimeShell}
PATH=${lib.makeBinPath [ common-updater-scripts coreutils curl gnugrep jq ]} PATH=${lib.makeBinPath [ common-updater-scripts coreutils curl gnugrep jq ]}
tags=`curl -s https://api.github.com/repos/evgeni/tp_smapi/tags` 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" '' let script = writeText "script" ''
#!${stdenv.shell} #!${runtimeShell}
if command -v sendmail > /dev/null 2>&1 && [ "$(command -v sendmail)" != "{{MYPATH}}" ]; then if command -v sendmail > /dev/null 2>&1 && [ "$(command -v sendmail)" != "{{MYPATH}}" ]; then
exec sendmail "$@" exec sendmail "$@"

View file

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

View file

@ -1,5 +1,6 @@
{ stdenv, fetchFromGitHub, autoreconfHook { 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; with stdenv.lib;
@ -50,7 +51,7 @@ in stdenv.mkDerivation rec {
preBuild = '' preBuild = ''
mkdir -p $out mkdir -p $out
cat <<_EOF > $out/share cat <<_EOF > $out/share
#!${stdenv.shell} #!${runtimeShell}
exit 0 exit 0
_EOF _EOF
chmod 755 $out/share 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 # There are some similarities with the pinta derivation. We should
# have a helper to make it easy to package these Mono apps. # 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} mkdir -p $out/{bin,lib/eventstore/clusternode}
cp -r bin/clusternode/* $out/lib/eventstore/clusternode/ cp -r bin/clusternode/* $out/lib/eventstore/clusternode/
cat > $out/bin/clusternode << EOF cat > $out/bin/clusternode << EOF
#!${stdenv.shell} #!${runtimeShell}
exec ${mono}/bin/mono $out/lib/eventstore/clusternode/EventStore.ClusterNode.exe "\$@" exec ${mono}/bin/mono $out/lib/eventstore/clusternode/EventStore.ClusterNode.exe "\$@"
EOF EOF
chmod +x $out/bin/clusternode chmod +x $out/bin/clusternode

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