treewide: use ${stdenv.shell} instead of /bin/sh where possible

This commit is contained in:
rnhmjoj
2019-01-15 23:41:31 +01:00
parent 3956a8421f
commit bcf54ce5bb
92 changed files with 156 additions and 120 deletions

View File

@@ -50,7 +50,7 @@ stdenv.mkDerivation rec {
patchelf --set-interpreter $(cat $NIX_CC/nix-support/dynamic-linker) --set-rpath $fullPath $out/opt/andyetitmoves/lib/$binName
cat > $out/bin/$binName << EOF
#!/bin/sh
#!${stdenv.shell}
cd $out/opt/andyetitmoves
exec ./lib/$binName
EOF

View File

@@ -45,7 +45,7 @@ in stdenv.mkDerivation rec {
installPhase = ''
# Make wrapper script
cat > eduke32-wrapper <<EOF
#!/bin/sh
#!${stdenv.shell}
if [ "$EDUKE32_DATA_DIR" = "" ]; then
EDUKE32_DATA_DIR=/var/lib/games/eduke32

View File

@@ -33,6 +33,7 @@ stdenv.mkDerivation rec {
--subst-var-by out "$out/"
substitute ${./fix-paths.sh} $out/fixpaths/fix-paths \
--subst-var-by libxsltBin ${libxslt.bin} \
--subst-var-by shell ${stdenv.shell} \
--subst-var out
chmod +x $out/fixpaths/fix-paths

View File

@@ -1,4 +1,4 @@
#!/bin/sh
#!@shell@
if [ -e ~/.config/freeorion/config.xml ]; then
@libxsltBin@/bin/xsltproc -o ~/.config/freeorion/config.xml @out@/fixpaths/fix-paths.xslt ~/.config/freeorion/config.xml

View File

@@ -1,4 +1,4 @@
#!/bin/sh
#!@shell@
set -e

View File

@@ -1,4 +1,4 @@
{ stdenv, lib, fetchFromGitHub, jam, cctools, pkgconfig
{ stdenv, fetchFromGitHub, substituteAll, jam, cctools, pkgconfig
, SDL, SDL_mixer, SDL_sound, cf-private, gtk2, libvorbis, smpeg }:
let
@@ -29,16 +29,19 @@ stdenv.mkDerivation {
sha256 = "0icwgc25gp7krq6zf66hljydc6vps6bb4knywnrfgnfcmcalqqx9";
};
nativeBuildInputs = [ jam pkgconfig ] ++ lib.optional stdenv.isDarwin cctools;
nativeBuildInputs = [ jam pkgconfig ] ++ stdenv.lib.optional stdenv.isDarwin cctools;
buildInputs = [ SDL SDL_mixer SDL_sound gtk2 ]
++ lib.optionals stdenv.isDarwin [ cf-private smpeg libvorbis ];
++ stdenv.lib.optionals stdenv.isDarwin [ cf-private smpeg libvorbis ];
patches = [ ./darwin.patch ];
buildPhase = jamenv + "jam -j$NIX_BUILD_CORES";
installPhase = if stdenv.isDarwin then (builtins.readFile ./darwin.sh) else jamenv + ''
installPhase =
if stdenv.isDarwin then
(substituteAll { inherit (stdenv) shell; src = ./darwin.sh; })
else jamenv + ''
jam -j$NIX_BUILD_CORES install
mkdir -p "$out/bin"
ln -s ../libexec/gargoyle/gargoyle "$out/bin"
@@ -52,7 +55,7 @@ stdenv.mkDerivation {
enableParallelBuilding = true;
meta = with lib; {
meta = with stdenv.lib; {
homepage = http://ccxvii.net/gargoyle/;
license = licenses.gpl2Plus;
description = "Interactive fiction interpreter GUI";

View File

@@ -21,7 +21,7 @@ stdenv.mkDerivation rec {
cp -rv data resources credits.txt license.txt "$out/share/mars/"
cp -v mars "$out/bin/mars.bin"
cat << EOF > "$out/bin/mars"
#! /bin/sh
#! ${stdenv.shell}
cd "$out/share/mars/"
exec "$out/bin/mars.bin" "\$@"
EOF

View File

@@ -18,7 +18,7 @@ stdenv.mkDerivation rec {
cp -v $src $out/lib/minecraft/server.jar
cat > $out/bin/minecraft-server << EOF
#!/bin/sh
#!${stdenv.shell}
exec ${jre}/bin/java \$@ -jar $out/lib/minecraft/server.jar nogui
EOF

View File

@@ -54,7 +54,7 @@ stdenv.mkDerivation {
cp -r * "$out/opt/oilrush"
mkdir -p "$out/bin"
cat << EOF > "$out/bin/oilrush"
#! /bin/sh
#!${stdenv.shell}
LD_LIBRARY_PATH=.:${makeLibraryPath [ openal ]}:\$LD_LIBRARY_PATH
cd "$out/opt/oilrush"
exec ./launcher_$arch.sh "\$@"

View File

@@ -21,7 +21,7 @@ let
};
playmidi = writeScriptBin "playmidi" ''
#!/bin/sh
#!${stdenv.shell}
trap "${procps}/bin/pkill fluidsynth" EXIT
${fluidsynth}/bin/fluidsynth -a ${audioDriver} -i ${soundfont-fluid}/share/soundfonts/FluidR3_GM2-2.sf2 $*
'';

View File

@@ -49,7 +49,7 @@ stdenv.mkDerivation rec {
for b in tremulous tremded
do
cat << EOF > $out/bin/$b
#!/bin/sh
#!${stdenv.shell}
cd $out/opt/tremulous
exec ./$b.$arch "\$@"
EOF

View File

@@ -23,7 +23,7 @@ stdenv.mkDerivation rec {
postInstall = ''
mkdir -p $out/bin
cat <<EOF > $out/bin/trigger-rally
#!/bin/sh
#!${stdenv.shell}
exec $out/games/trigger-rally "$@"
EOF
chmod +x $out/bin/trigger-rally

View File

@@ -59,7 +59,7 @@ stdenv.mkDerivation rec {
done
cat > $out/bin/Vessel << EOW
#!/bin/sh
#!${stdenv.shell}
cd $out/libexec/strangeloop/vessel/
exec ./x86/vessel.x86
EOW

View File

@@ -60,7 +60,7 @@ stdenv.mkDerivation rec {
#makeWrapper doesn't do cd. :(
cat > $out/bin/WorldofGoo << EOF
#!/bin/sh
#!${stdenv.shell}
cd $out/libexec/2dboy/WorldOfGoo
exec ./WorldOfGoo.bin64
EOF

View File

@@ -28,7 +28,7 @@ stdenv.mkDerivation rec {
postInstall = ''
mv $out/bin/zangband $out/bin/.zangband.real
echo '#! /bin/sh
echo '#! ${stdenv.shell}
PATH="$PATH:${coreutils}/bin"
ZANGBAND_PATH="$HOME/.zangband"