summary refs log tree commit diff
path: root/pkgs/build-support
diff options
context:
space:
mode:
authorEelco Dolstra <eelco.dolstra@logicblox.com>2006-12-27 18:14:57 +0000
committerEelco Dolstra <eelco.dolstra@logicblox.com>2006-12-27 18:14:57 +0000
commit138c0ae751174ae6859589a9c9d517e45c14dc18 (patch)
treef0d6067ca147457c552f2c113c5697dc99547163 /pkgs/build-support
parentf6d923febc594c7a1fc3295e01972b049569e292 (diff)
downloadnixlib-138c0ae751174ae6859589a9c9d517e45c14dc18.tar
nixlib-138c0ae751174ae6859589a9c9d517e45c14dc18.tar.gz
nixlib-138c0ae751174ae6859589a9c9d517e45c14dc18.tar.bz2
nixlib-138c0ae751174ae6859589a9c9d517e45c14dc18.tar.lz
nixlib-138c0ae751174ae6859589a9c9d517e45c14dc18.tar.xz
nixlib-138c0ae751174ae6859589a9c9d517e45c14dc18.tar.zst
nixlib-138c0ae751174ae6859589a9c9d517e45c14dc18.zip
* Merge the new generic builder.
* Removed substitute, it's part of the generic builder now.
* stdenv-initial (Linux): use the real generic builder script.  This
  does require that sed is in the path of the builder of the initial
  stdenv.

svn path=/nixpkgs/trunk/; revision=7498
Diffstat (limited to 'pkgs/build-support')
-rw-r--r--pkgs/build-support/gcc-wrapper/builder.sh6
-rw-r--r--pkgs/build-support/gcc-wrapper/default.nix1
-rw-r--r--pkgs/build-support/substitute/substitute.sh46
3 files changed, 2 insertions, 51 deletions
diff --git a/pkgs/build-support/gcc-wrapper/builder.sh b/pkgs/build-support/gcc-wrapper/builder.sh
index 7ee0b0d32cdc..f9dbc0e784f6 100644
--- a/pkgs/build-support/gcc-wrapper/builder.sh
+++ b/pkgs/build-support/gcc-wrapper/builder.sh
@@ -1,10 +1,8 @@
 source $stdenv/setup
-source $substitute
 
 
-mkdir $out
-mkdir $out/bin
-mkdir $out/nix-support
+ensureDir $out/bin
+ensureDir $out/nix-support
 
 
 if test -z "$nativeLibc"; then
diff --git a/pkgs/build-support/gcc-wrapper/default.nix b/pkgs/build-support/gcc-wrapper/default.nix
index 2edd0049dc17..24309c7ab879 100644
--- a/pkgs/build-support/gcc-wrapper/default.nix
+++ b/pkgs/build-support/gcc-wrapper/default.nix
@@ -15,7 +15,6 @@ assert !nativeLibc -> libc != null;
 
 stdenv.mkDerivation {
   builder = ./builder.sh;
-  substitute = ../substitute/substitute.sh;
   setupHook = ./setup-hook.sh;
   gccWrapper = ./gcc-wrapper.sh;
   ldWrapper = ./ld-wrapper.sh;
diff --git a/pkgs/build-support/substitute/substitute.sh b/pkgs/build-support/substitute/substitute.sh
deleted file mode 100644
index c1a32488e1d7..000000000000
--- a/pkgs/build-support/substitute/substitute.sh
+++ /dev/null
@@ -1,46 +0,0 @@
-substitute() {
-    input=$1
-    output=$2
-
-    params=("$@")
-
-    sedArgs=()
-    
-    for ((n = 2; n < ${#params[*]}; n += 1)); do
-        p=${params[$n]}
-
-        if test "$p" = "--replace"; then
-            pattern=${params[$((n + 1))]}
-            replacement=${params[$((n + 2))]}
-            n=$((n + 2))
-            sedArgs=("${sedArgs[@]}" "-e" "s^$pattern^$replacement^g")
-        fi
-
-        if test "$p" = "--subst-var"; then
-            varName=${params[$((n + 1))]}
-            n=$((n + 1))
-            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
-    if test -x "$output"; then
-        chmod +x "$output".tmp
-    fi
-    mv -f "$output".tmp "$output"
-}
-
-
-substituteInPlace() {
-    fileName="$1"
-    shift
-    substitute "$fileName" "$fileName" "$@"
-}