From 8d7bf1a11ea9203516c059feca49b2939b78dfa4 Mon Sep 17 00:00:00 2001 From: Eelco Dolstra Date: Sun, 24 May 2009 18:12:39 +0000 Subject: [PATCH] * Typo. svn path=/nixpkgs/trunk/; revision=15699 --- pkgs/lib/attrsets.nix | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) diff --git a/pkgs/lib/attrsets.nix b/pkgs/lib/attrsets.nix index 57994dd36d6..263371f8e89 100644 --- a/pkgs/lib/attrsets.nix +++ b/pkgs/lib/attrsets.nix @@ -21,13 +21,13 @@ rec { then attrByPath (tail attrPath) default (getAttr attr e) else default; - # keep compatibility for some time. will be removed soon (the name getAttr - # should only be used for the builtins primop) - getAttr = a : b : if isString a - then - # should have been called from builtins scope. Don't mind. use builtin function - builtins.getAttr a b - else c : builtins.trace "depreceated usage of lib.getAttr!" (attrByPath a b c); + /* Backwards compatibility hack: lib.attrByPath used to be called + lib.getAttr, which was confusing given that there was also a + builtins.getAttr. Eventually we'll drop this hack and + lib.getAttr will just be an alias for builtins.getAttr. */ + getAttr = a: b: if isString a + then builtins.getAttr a b + else c: builtins.trace "Deprecated use of lib.getAttr!" (attrByPath a b c); getAttrFromPath = attrPath: set: