summary refs log tree commit diff
path: root/pkgs/build-support/substitute
diff options
context:
space:
mode:
authorEelco Dolstra <eelco.dolstra@logicblox.com>2005-02-22 14:32:56 +0000
committerEelco Dolstra <eelco.dolstra@logicblox.com>2005-02-22 14:32:56 +0000
commit2e0380b7a0d19b1d708111c108210f4bfcef7a6a (patch)
treebae333593f343ed5a7aa6e270fdaee974bea3323 /pkgs/build-support/substitute
parent290fba0cb6a030365f1706b410011c1a0df2a7b0 (diff)
downloadnixpkgs-2e0380b7a0d19b1d708111c108210f4bfcef7a6a.tar
nixpkgs-2e0380b7a0d19b1d708111c108210f4bfcef7a6a.tar.gz
nixpkgs-2e0380b7a0d19b1d708111c108210f4bfcef7a6a.tar.bz2
nixpkgs-2e0380b7a0d19b1d708111c108210f4bfcef7a6a.tar.lz
nixpkgs-2e0380b7a0d19b1d708111c108210f4bfcef7a6a.tar.xz
nixpkgs-2e0380b7a0d19b1d708111c108210f4bfcef7a6a.tar.zst
nixpkgs-2e0380b7a0d19b1d708111c108210f4bfcef7a6a.zip
* Use the generic substituter in the generation of stdenv and gcc-wrapper.
svn path=/nixpkgs/trunk/; revision=2269
Diffstat (limited to 'pkgs/build-support/substitute')
-rw-r--r--pkgs/build-support/substitute/substitute.sh7
1 files changed, 7 insertions, 0 deletions
diff --git a/pkgs/build-support/substitute/substitute.sh b/pkgs/build-support/substitute/substitute.sh
index bd318522cae..c1a32488e1d 100644
--- a/pkgs/build-support/substitute/substitute.sh
+++ b/pkgs/build-support/substitute/substitute.sh
@@ -22,6 +22,13 @@ substitute() {
             sedArgs=("${sedArgs[@]}" "-e" "s^@${varName}@^${!varName}^g")
         fi
 
+        if test "$p" = "--subst-var-by"; then
+            varName=${params[$((n + 1))]}
+            replacement=${params[$((n + 2))]}
+            n=$((n + 2))
+            sedArgs=("${sedArgs[@]}" "-e" "s^@${varName}@^$replacement^g")
+        fi
+
     done
 
     sed "${sedArgs[@]}" < "$input" > "$output".tmp