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
This commit is contained in:
parent
420bf2b677
commit
b3a534d3d2
|
@ -1,7 +1,7 @@
|
||||||
# Operations on attribute sets.
|
# Operations on attribute sets.
|
||||||
|
|
||||||
with {
|
with {
|
||||||
inherit (builtins) head tail;
|
inherit (builtins) head tail length;
|
||||||
inherit (import ./trivial.nix) or;
|
inherit (import ./trivial.nix) or;
|
||||||
inherit (import ./default.nix) fold;
|
inherit (import ./default.nix) fold;
|
||||||
inherit (import ./strings.nix) concatStringsSep;
|
inherit (import ./strings.nix) concatStringsSep;
|
||||||
|
|
Loading…
Reference in New Issue