summary refs log tree commit diff
path: root/pkgs/build-support/builder-defs/builder-defs.nix
diff options
context:
space:
mode:
Diffstat (limited to 'pkgs/build-support/builder-defs/builder-defs.nix')
-rw-r--r--pkgs/build-support/builder-defs/builder-defs.nix9
1 files changed, 5 insertions, 4 deletions
diff --git a/pkgs/build-support/builder-defs/builder-defs.nix b/pkgs/build-support/builder-defs/builder-defs.nix
index 2956fa478bf..17a49b69413 100644
--- a/pkgs/build-support/builder-defs/builder-defs.nix
+++ b/pkgs/build-support/builder-defs/builder-defs.nix
@@ -1,4 +1,5 @@
 args: with args; with stringsWithDeps; with lib;
+let inherit (builtins) head tail trace; in
 (rec
 {
         inherit writeScript; 
@@ -316,8 +317,8 @@ args: with args; with stringsWithDeps; with lib;
         envAdder = envAdderInner "";
 
         envAdderList = l:  if l==[] then "" else 
-        "echo export ${__head l}='\"'\"\\\$${__head l}:${__head (__tail l)}\"'\"';\n" +
-                envAdderList (__tail (__tail l));
+        "echo export ${head l}='\"'\"\\\$${head l}:${head (tail l)}\"'\"';\n" +
+                envAdderList (tail (tail l));
 
         wrapEnv = cmd: env: "
                 mv \"${cmd}\" \"${cmd}-orig\";
@@ -350,8 +351,8 @@ args: with args; with stringsWithDeps; with lib;
                 echo '${toString (attrByPath ["propagatedBuildInputs"] [] args)}' >\$out/nix-support/propagated-build-inputs
         ") ["minInit" "defEnsureDir"];
 
-        /*debug = x:(__trace x x);
-        debugX = x:(__trace (__toXML x) x);*/
+        /*debug = x:(trace x x);
+        debugX = x:(trace (toXML x) x);*/
 
         replaceScriptVar = file: name: value: "sed -e 's`^${name}=.*`${name}='\\''${value}'\\''`' -i ${file}";
         replaceInScript = file: l: concatStringsSep "\n" ((pairMap (replaceScriptVar file) l));