diff --git a/pkgs/stdenv/darwin-branch/default.nix b/pkgs/stdenv/darwin-branch/default.nix deleted file mode 100644 index 83a51c77b21..00000000000 --- a/pkgs/stdenv/darwin-branch/default.nix +++ /dev/null @@ -1,19 +0,0 @@ -{stdenv, genericStdenv, gccWrapper}: - -genericStdenv { - name = "stdenv-darwin"; - preHook = ./prehook.sh; - initialPath = "/usr/local /usr /"; - - inherit stdenv; - - gcc = gccWrapper { - name = "gcc-darwin"; - nativeTools = true; - nativeGlibc = true; - nativePrefix = "/usr"; - inherit stdenv; - }; - - shell = "/bin/bash"; -} diff --git a/pkgs/stdenv/darwin-branch/prehook.sh b/pkgs/stdenv/darwin-branch/prehook.sh deleted file mode 100644 index 8a3cf6a99ba..00000000000 --- a/pkgs/stdenv/darwin-branch/prehook.sh +++ /dev/null @@ -1,6 +0,0 @@ -export NIX_ENFORCE_PURITY= -export NIX_DONT_SET_RPATH=1 -export NIX_NO_SELF_RPATH=1 -dontFixLibtool=1 -NIX_STRIP_DEBUG=0 -echo XXX $NIX_DONT_SET_RPATH \ No newline at end of file diff --git a/pkgs/stdenv/generic-branch/setup.sh b/pkgs/stdenv/generic-branch/setup.sh index 07494258f06..8aa065d5943 100644 --- a/pkgs/stdenv/generic-branch/setup.sh +++ b/pkgs/stdenv/generic-branch/setup.sh @@ -203,19 +203,24 @@ ensureDir() { } -# Redirect stdout/stderr to a `tee' process that writes the specified -# file (and also to our original stdout). This requires bash. The -# original stdout is saved in descriptor 3. +# Redirect stdout/stderr to a named pipe connected to a `tee' process +# that writes the specified file (and also to our original stdout). +# The original stdout is saved in descriptor 3. startLog() { local logFile=${logNr}_$1 logNr=$((logNr + 1)) if test "$logPhases" = 1; then ensureDir $logDir + exec 3>&1 + if test "$dontLogThroughTee" != 1; then - # Put this in an `eval' so that non-bash shells (or bash - # invoked as `sh') won't choke on parsing this file. - eval "exec > >(tee $logDir/$logFile) 2>&1" + # This required named pipes (fifos). + logFifo=$NIX_BUILD_TOP/log_fifo + test -p $logFifo || mkfifo $logFifo + tee $logDir/$logFile < $logFifo & + logTeePid=$! + exec > $logFifo 2>&1 else exec > $logDir/$logFile 2>&1 fi @@ -232,6 +237,14 @@ logNr=0 stopLog() { if test "$logPhases" = 1; then exec >&3 2>&1 + + # Wait until the tee process has died. Otherwise output from + # different phases may be mixed up. + if test -n "$logTeePid"; then + wait $logTeePid + logTeePid= + rm $logFifo + fi fi } diff --git a/pkgs/stdenv/nix-linux-branch/default.nix b/pkgs/stdenv/nix-linux-branch/default.nix deleted file mode 100644 index 6b25ea7dc28..00000000000 --- a/pkgs/stdenv/nix-linux-branch/default.nix +++ /dev/null @@ -1,20 +0,0 @@ -{stdenv, glibc, pkgs, genericStdenv, gccWrapper}: - -genericStdenv { - name = "stdenv-nix-linux"; - preHook = ./prehook.sh; - initialPath = (import ../nix/path.nix) {pkgs = pkgs;}; - - inherit stdenv; - - gcc = gccWrapper { - name = pkgs.gcc.name; - nativeTools = false; - nativeGlibc = false; - inherit (pkgs) gcc binutils; - inherit stdenv glibc; - shell = pkgs.bash ~ /bin/sh; - }; - - shell = pkgs.bash ~ /bin/bash; -} diff --git a/pkgs/stdenv/nix-linux-branch/prehook.sh b/pkgs/stdenv/nix-linux-branch/prehook.sh deleted file mode 100644 index 08bb6c0332c..00000000000 --- a/pkgs/stdenv/nix-linux-branch/prehook.sh +++ /dev/null @@ -1 +0,0 @@ -export NIX_ENFORCE_PURITY=1 diff --git a/pkgs/system/stdenvs.nix b/pkgs/system/stdenvs.nix index 1ccd5079d03..3f1f3cbae93 100644 --- a/pkgs/system/stdenvs.nix +++ b/pkgs/system/stdenvs.nix @@ -150,7 +150,7 @@ # Testing the new stdenv-linux (TODO: remove this eventually). - stdenvLinuxTest = (import ../stdenv/nix-linux-branch) { + stdenvLinuxTest = (import ../stdenv/nix-linux) { stdenv = stdenvLinuxBoot2; pkgs = stdenvLinuxBoot2Pkgs; glibc = stdenvLinuxGlibc; @@ -158,7 +158,7 @@ inherit gccWrapper; }; - stdenvDarwinTest = (import ../stdenv/darwin-branch) { + stdenvDarwinTest = (import ../stdenv/darwin) { stdenv = stdenvInitial; genericStdenv = import ../stdenv/generic-branch; inherit gccWrapper;