about summary refs log tree commit diff
path: root/pkgs/development/compilers
diff options
context:
space:
mode:
authorrnhmjoj <rnhmjoj@inventati.org>2019-01-15 23:41:31 +0100
committerrnhmjoj <rnhmjoj@inventati.org>2019-01-16 20:37:15 +0100
commitbcf54ce5bbc8c325cfd2b6bcc5cec7661ef49183 (patch)
tree26aef5b71509a26f7986e6cf9928b7687c21787d /pkgs/development/compilers
parent3956a8421f2d78bc66ad9d3c23a3b5510bc695be (diff)
downloadnixlib-bcf54ce5bbc8c325cfd2b6bcc5cec7661ef49183.tar
nixlib-bcf54ce5bbc8c325cfd2b6bcc5cec7661ef49183.tar.gz
nixlib-bcf54ce5bbc8c325cfd2b6bcc5cec7661ef49183.tar.bz2
nixlib-bcf54ce5bbc8c325cfd2b6bcc5cec7661ef49183.tar.lz
nixlib-bcf54ce5bbc8c325cfd2b6bcc5cec7661ef49183.tar.xz
nixlib-bcf54ce5bbc8c325cfd2b6bcc5cec7661ef49183.tar.zst
nixlib-bcf54ce5bbc8c325cfd2b6bcc5cec7661ef49183.zip
treewide: use ${stdenv.shell} instead of /bin/sh where possible
Diffstat (limited to 'pkgs/development/compilers')
-rw-r--r--pkgs/development/compilers/cmdstan/default.nix2
-rw-r--r--pkgs/development/compilers/fsharp/default.nix2
-rw-r--r--pkgs/development/compilers/fsharp41/default.nix2
-rw-r--r--pkgs/development/compilers/ghc/8.2.2-binary.nix14
-rwxr-xr-xpkgs/development/compilers/ghc/gcc-clang-wrapper.sh2
-rw-r--r--pkgs/development/compilers/openjdk/8.nix2
6 files changed, 15 insertions, 9 deletions
diff --git a/pkgs/development/compilers/cmdstan/default.nix b/pkgs/development/compilers/cmdstan/default.nix
index 2b2ae896a6d3..3d9fe3a59cfd 100644
--- a/pkgs/development/compilers/cmdstan/default.nix
+++ b/pkgs/development/compilers/cmdstan/default.nix
@@ -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
diff --git a/pkgs/development/compilers/fsharp/default.nix b/pkgs/development/compilers/fsharp/default.nix
index f9f083f04d75..2de487cc9c8b 100644
--- a/pkgs/development/compilers/fsharp/default.nix
+++ b/pkgs/development/compilers/fsharp/default.nix
@@ -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
   '';
 
diff --git a/pkgs/development/compilers/fsharp41/default.nix b/pkgs/development/compilers/fsharp41/default.nix
index 3ce7ae60e114..e0094c73098f 100644
--- a/pkgs/development/compilers/fsharp41/default.nix
+++ b/pkgs/development/compilers/fsharp41/default.nix
@@ -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
   '';
 
diff --git a/pkgs/development/compilers/ghc/8.2.2-binary.nix b/pkgs/development/compilers/ghc/8.2.2-binary.nix
index f52d8fd4a11f..678245d3e437 100644
--- a/pkgs/development/compilers/ghc/8.2.2-binary.nix
+++ b/pkgs/development/compilers/ghc/8.2.2-binary.nix
@@ -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
diff --git a/pkgs/development/compilers/ghc/gcc-clang-wrapper.sh b/pkgs/development/compilers/ghc/gcc-clang-wrapper.sh
index d081be231a1c..45af982c2973 100755
--- a/pkgs/development/compilers/ghc/gcc-clang-wrapper.sh
+++ b/pkgs/development/compilers/ghc/gcc-clang-wrapper.sh
@@ -1,4 +1,4 @@
-#!/bin/sh
+#!@shell@
 
 inPreprocessorMode () {
     hasE=0
diff --git a/pkgs/development/compilers/openjdk/8.nix b/pkgs/development/compilers/openjdk/8.nix
index 19b16921e329..93ab703d975d 100644
--- a/pkgs/development/compilers/openjdk/8.nix
+++ b/pkgs/development/compilers/openjdk/8.nix
@@ -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