diff options
author | Benjamin Staffin <ben@folsomlabs.com> | 2014-12-30 15:07:29 -0800 |
---|---|---|
committer | Benjamin Staffin <ben@folsomlabs.com> | 2014-12-30 15:07:29 -0800 |
commit | 4dd93dbf258847f6cf85e61d8c37356a0f35ddaa (patch) | |
tree | 1770277553e4489249e3d6117cd3d00774e397a2 /lib/attrsets.nix | |
parent | d137ff33e240db93a95aeff8376e1ea8efabbf2a (diff) |
lib: Fix matchAttrs by importing builtins.length
Before:
nix-repl> :l <nixpkgs>
nix-repl> lib.matchAttrs { foo = "bar"; } { bar = "bas"; }
error: undefined variable ‘length’ at "/home/benley/nix/nixpkgs/lib/attrsets.nix":317:10
After:
nix-repl> :l <nixpkgs>
nix-repl> lib.matchAttrs { foo = "bar"; } { bar = "bas"; }
false
Change-Id: I548d69d50cffe1c63a6f39f76fd09d1835d8d9a2
Diffstat (limited to 'lib/attrsets.nix')
-rw-r--r-- | lib/attrsets.nix | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/lib/attrsets.nix b/lib/attrsets.nix index 3615328b1924..cb4091b916c5 100644 --- a/lib/attrsets.nix +++ b/lib/attrsets.nix @@ -1,7 +1,7 @@ # Operations on attribute sets. with { - inherit (builtins) head tail; + inherit (builtins) head tail length; inherit (import ./trivial.nix) or; inherit (import ./default.nix) fold; inherit (import ./strings.nix) concatStringsSep; |