summary refs log tree commit diff
path: root/pkgs/stdenv/generic/setup.sh
diff options
context:
space:
mode:
authorEelco Dolstra <eelco.dolstra@logicblox.com>2014-01-07 09:43:39 +0100
committerEelco Dolstra <eelco.dolstra@logicblox.com>2014-01-07 09:48:01 +0100
commit369185288a0fed4bc9fcb6183e70907b413a86b0 (patch)
tree249e4e66a681aefd3995afbcd0c830129532c0b8 /pkgs/stdenv/generic/setup.sh
parent340b6ab649e5d75e7cc75ee7a2181b83fb567088 (diff)
downloadnixpkgs-369185288a0fed4bc9fcb6183e70907b413a86b0.tar
nixpkgs-369185288a0fed4bc9fcb6183e70907b413a86b0.tar.gz
nixpkgs-369185288a0fed4bc9fcb6183e70907b413a86b0.tar.bz2
nixpkgs-369185288a0fed4bc9fcb6183e70907b413a86b0.tar.lz
nixpkgs-369185288a0fed4bc9fcb6183e70907b413a86b0.tar.xz
nixpkgs-369185288a0fed4bc9fcb6183e70907b413a86b0.tar.zst
nixpkgs-369185288a0fed4bc9fcb6183e70907b413a86b0.zip
stdenv: Revert special-casing of fixupPhase
Treating fixupPhase specially is really ugly.  Also, it collides with
the work in the multiple-outputs branch (which already has support for
fixing up all outputs).

Partial revert of 0a44a091217ecd335cd10c06c1ddd29ad599f18c.
Diffstat (limited to 'pkgs/stdenv/generic/setup.sh')
-rw-r--r--pkgs/stdenv/generic/setup.sh29
1 files changed, 11 insertions, 18 deletions
diff --git a/pkgs/stdenv/generic/setup.sh b/pkgs/stdenv/generic/setup.sh
index 58647f1508d..2ed2f5d3dd8 100644
--- a/pkgs/stdenv/generic/setup.sh
+++ b/pkgs/stdenv/generic/setup.sh
@@ -796,23 +796,23 @@ fixupPhase() {
     fi
 
     if [ -n "$propagatedBuildInputs" ]; then
-        mkdir -p "$prefix/nix-support"
-        echo "$propagatedBuildInputs" > "$prefix/nix-support/propagated-build-inputs"
+        mkdir -p "$out/nix-support"
+        echo "$propagatedBuildInputs" > "$out/nix-support/propagated-build-inputs"
     fi
 
     if [ -n "$propagatedNativeBuildInputs" ]; then
-        mkdir -p "$prefix/nix-support"
-        echo "$propagatedNativeBuildInputs" > "$prefix/nix-support/propagated-native-build-inputs"
+        mkdir -p "$out/nix-support"
+        echo "$propagatedNativeBuildInputs" > "$out/nix-support/propagated-native-build-inputs"
     fi
 
     if [ -n "$propagatedUserEnvPkgs" ]; then
-        mkdir -p "$prefix/nix-support"
-        echo "$propagatedUserEnvPkgs" > "$prefix/nix-support/propagated-user-env-packages"
+        mkdir -p "$out/nix-support"
+        echo "$propagatedUserEnvPkgs" > "$out/nix-support/propagated-user-env-packages"
     fi
 
     if [ -n "$setupHook" ]; then
-        mkdir -p "$prefix/nix-support"
-        substituteAll "$setupHook" "$prefix/nix-support/setup-hook"
+        mkdir -p "$out/nix-support"
+        substituteAll "$setupHook" "$out/nix-support/setup-hook"
     fi
 
     runHook postFixup
@@ -897,16 +897,9 @@ genericBuild() {
         showPhaseHeader "$curPhase"
         dumpVars
 
-        if [ "$curPhase" = fixupPhase ]; then
-          for pref in ${outputs:-out}; do
-            echo "fixup on \$$pref"
-            prefix=${!pref} eval "${!curPhase:-$curPhase}"
-          done
-        else
-          # Evaluate the variable named $curPhase if it exists, otherwise the
-          # function named $curPhase.
-          eval "${!curPhase:-$curPhase}"
-        fi
+        # Evaluate the variable named $curPhase if it exists, otherwise the
+        # function named $curPhase.
+        eval "${!curPhase:-$curPhase}"
 
         if [ "$curPhase" = unpackPhase ]; then
             cd "${sourceRoot:-.}"