From 0e120dc68f7de02ccb22df27fd15835fc6d082a4 Mon Sep 17 00:00:00 2001 From: Eelco Dolstra Date: Sat, 4 Oct 2014 18:30:35 +0200 Subject: [PATCH] Use new primops --- lib/attrsets.nix | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/lib/attrsets.nix b/lib/attrsets.nix index da735d71b25..d22131c4795 100644 --- a/lib/attrsets.nix +++ b/lib/attrsets.nix @@ -55,7 +55,7 @@ rec { attrValues {c = 3; a = 1; b = 2;} => [1 2 3] */ - attrValues = attrs: attrVals (attrNames attrs) attrs; + attrValues = builtins.attrValues or (attrs: attrVals (attrNames attrs) attrs); /* Collect each attribute named `attr' from a list of attribute @@ -65,7 +65,8 @@ rec { catAttrs "a" [{a = 1;} {b = 0;} {a = 2;}] => [1 2] */ - catAttrs = attr: l: concatLists (map (s: if hasAttr attr s then [(getAttr attr s)] else []) l); + catAttrs = builtins.catAttrs or + (attr: l: concatLists (map (s: if hasAttr attr s then [(getAttr attr s)] else []) l)); /* Filter an attribute set by removing all attributes for which the