diff --git a/pkgs/lib/attrsets.nix b/pkgs/lib/attrsets.nix index 5e4e9df3711..8d1521812f9 100644 --- a/pkgs/lib/attrsets.nix +++ b/pkgs/lib/attrsets.nix @@ -10,7 +10,7 @@ with { }; rec { - inherit (builtins) attrNames listToAttrs hasAttr isAttrs; + inherit (builtins) attrNames listToAttrs hasAttr isAttrs getAttr; /* Return an attribute from nested attribute sets. For instance @@ -33,15 +33,6 @@ rec { nameValuePair (head attrPath) (setAttrByPath (tail attrPath) value) )]; - - /* 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: let errorMsg = "cannot find attribute `" + concatStringsSep "." attrPath + "'";