diff options
author | Eelco Dolstra <eelco.dolstra@logicblox.com> | 2014-10-04 18:30:35 +0200 |
---|---|---|
committer | Eelco Dolstra <eelco.dolstra@logicblox.com> | 2014-10-05 01:10:52 +0200 |
commit | 0e120dc68f7de02ccb22df27fd15835fc6d082a4 (patch) | |
tree | f27081be3a3e7c7813e13d9e26e2a3a9c8870028 /lib/attrsets.nix | |
parent | eeac1e70aa880e3aec8742aad1590582d454b8ae (diff) | |
download | nixpkgs-0e120dc68f7de02ccb22df27fd15835fc6d082a4.tar nixpkgs-0e120dc68f7de02ccb22df27fd15835fc6d082a4.tar.gz nixpkgs-0e120dc68f7de02ccb22df27fd15835fc6d082a4.tar.bz2 nixpkgs-0e120dc68f7de02ccb22df27fd15835fc6d082a4.tar.lz nixpkgs-0e120dc68f7de02ccb22df27fd15835fc6d082a4.tar.xz nixpkgs-0e120dc68f7de02ccb22df27fd15835fc6d082a4.tar.zst nixpkgs-0e120dc68f7de02ccb22df27fd15835fc6d082a4.zip |
Use new primops
Diffstat (limited to 'lib/attrsets.nix')
-rw-r--r-- | lib/attrsets.nix | 5 |
1 files 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 |