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

This commit is contained in:
rnhmjoj
2019-01-16 20:37:15 +01:00
parent 3956a8421f
commit bcf54ce5bb
92 changed files with 156 additions and 120 deletions
@@ -21,7 +21,7 @@ stdenv.mkDerivation rec {
ln -s $out/opt/cmdstan/bin/stanc $out/bin/stanc
ln -s $out/opt/cmdstan/bin/stansummary $out/bin/stansummary
cat > $out/bin/stan <<EOF
#!/bin/sh
#!${stdenv.shell}
make -C $out/opt/cmdstan "\$(realpath "\$1")"
EOF
chmod a+x $out/bin/stan
@@ -16,7 +16,7 @@ stdenv.mkDerivation rec {
configurePhase = ''
sed -i '988d' src/FSharpSource.targets
substituteInPlace ./autogen.sh --replace "/usr/bin/env sh" "/bin/sh"
substituteInPlace ./autogen.sh --replace "/usr/bin/env sh" "${stdenv.shell}"
./autogen.sh --prefix $out
'';
@@ -32,7 +32,7 @@ stdenv.mkDerivation rec {
];
configurePhase = ''
substituteInPlace ./autogen.sh --replace "/usr/bin/env sh" "/bin/sh"
substituteInPlace ./autogen.sh --replace "/usr/bin/env sh" "${stdenv.shell}"
./autogen.sh --prefix $out
'';
@@ -1,4 +1,4 @@
{ stdenv
{ stdenv, substituteAll
, fetchurl, perl, gcc, llvm_39
, ncurses5, gmp, glibc, libiconv
}:
@@ -110,10 +110,16 @@ stdenv.mkDerivation rec {
'';
configurePlatforms = [ ];
configureFlags = [
"--with-gmp-libraries=${stdenv.lib.getLib gmp}/lib"
configureFlags =
let
gcc-clang-wrapper = substituteAll {
inherit (stdenv) shell;
src = ./gcc-clang-wrapper.sh;
};
in
[ "--with-gmp-libraries=${stdenv.lib.getLib gmp}/lib"
"--with-gmp-includes=${stdenv.lib.getDev gmp}/include"
] ++ stdenv.lib.optional stdenv.isDarwin "--with-gcc=${./gcc-clang-wrapper.sh}"
] ++ stdenv.lib.optional stdenv.isDarwin "--with-gcc=${gcc-clang-wrapper}"
++ stdenv.lib.optional stdenv.hostPlatform.isMusl "--disable-ld-override";
# Stripping combined with patchelf breaks the executables (they die
@@ -1,4 +1,4 @@
#!/bin/sh
#!@shell@
inPreprocessorMode () {
hasE=0
+1 -1
View File
@@ -98,7 +98,7 @@ let
preConfigure = ''
chmod +x configure
substituteInPlace configure --replace /bin/bash "${bash}/bin/bash"
substituteInPlace hotspot/make/linux/adlc_updater --replace /bin/sh "$shell"
substituteInPlace hotspot/make/linux/adlc_updater --replace /bin/sh "${stdenv.shell}"
substituteInPlace hotspot/make/linux/makefiles/dtrace.make --replace /usr/include/sys/sdt.h "/no-such-path"
''
# https://bugzilla.redhat.com/show_bug.cgi?id=1306558