diff options
Diffstat (limited to 'pkgs')
-rw-r--r-- | pkgs/build-support/builder-defs/builder-defs.nix | 4 | ||||
-rw-r--r-- | pkgs/lib/misc.nix | 8 |
2 files changed, 0 insertions, 12 deletions
diff --git a/pkgs/build-support/builder-defs/builder-defs.nix b/pkgs/build-support/builder-defs/builder-defs.nix index 814ce460794c..5eaa40c61118 100644 --- a/pkgs/build-support/builder-defs/builder-defs.nix +++ b/pkgs/build-support/builder-defs/builder-defs.nix @@ -373,10 +373,6 @@ let inherit (builtins) head tail trace; in /*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)); - replaceScripts = l: concatStringsSep "\n" (pairMap replaceInScript l); - doReplaceScripts = fullDepEntry (replaceScripts (attrByPath ["shellReplacements"] [] args)) ["minInit"]; makeNest = x: if x == defNest.text then x else "startNest\n" + x + "\nstopNest\n"; textClosure = a: steps: textClosureMap makeNest a (["defNest"] ++ steps); diff --git a/pkgs/lib/misc.nix b/pkgs/lib/misc.nix index bf37f31ebaf5..77abd032cec1 100644 --- a/pkgs/lib/misc.nix +++ b/pkgs/lib/misc.nix @@ -88,14 +88,6 @@ rec { # } composedArgsAndFun = f: foldArgs defaultMerge f {}; - # example a = pairMap (x : y : x + y) ["a" "b" "c" "d"]; - # result: ["ab" "cd"] - innerPairMap = acc: f: l: - if l == [] then acc else - innerPairMap (acc ++ [(f (head l)(head (tail l)))]) - f (tail (tail l)); - pairMap = innerPairMap []; - # shortcut for attrByPath ["name"] default attrs maybeAttr = name: default: attrs: |