From 4dd93dbf258847f6cf85e61d8c37356a0f35ddaa Mon Sep 17 00:00:00 2001 From: Benjamin Staffin Date: Tue, 30 Dec 2014 15:07:29 -0800 Subject: [PATCH] lib: Fix matchAttrs by importing builtins.length MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Before: nix-repl> :l 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 nix-repl> lib.matchAttrs { foo = "bar"; } { bar = "bas"; } false Change-Id: I548d69d50cffe1c63a6f39f76fd09d1835d8d9a2 --- lib/attrsets.nix | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/attrsets.nix b/lib/attrsets.nix index 3615328b192..cb4091b916c 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;