about summary refs log tree commit diff
path: root/lib/attrsets.nix
AgeCommit message (Collapse)AuthorFilesLines
2015-08-07Allow options with type "package" to be store pathsEelco Dolstra1-0/+10
For example, this allows writing nix.package = /nix/store/786mlvhd17xvcp2r4jmmay6jj4wj6b7f-nix-1.10pre4206_896428c; Also, document types.package in the manual.
2015-07-23Rename misc.nix -> deprecated.nixEelco Dolstra1-2/+1
2015-07-23More efficient version of filterAttrsEelco Dolstra1-1/+1
2014-12-30lib: Fix matchAttrs by importing builtins.lengthBenjamin Staffin1-1/+1
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
2014-10-05Replace hasAttr/getAttr calls with the ? and . operatorsEelco Dolstra1-11/+10
For NixOS evaluation, this gives a ~21% reduction in the number of values allocated and a ~4% speedup. It's also more readable.
2014-10-05Use new primopsEelco Dolstra1-2/+3
2013-11-12Remove backward-compatible implementations of some primopsEelco Dolstra1-2/+2
Nixpkgs requires at least Nix 1.2 anyway, so these are now useless.
2013-11-12Add some primops to libEelco Dolstra1-2/+2
2013-10-28Inline some functions on the critical pathEelco Dolstra1-4/+3
2013-10-28Keep position information for option declarations and definitionsEelco Dolstra1-1/+1
Also, when an option definition fails to type-check, print the file name of the module in which the offending definition occurs, e.g. error: user-thrown exception: The option value `boot.loader.grub.version' in `/etc/nixos/configuration.nix' is not a integer.
2013-10-10Move pkgs/lib/ to lib/Eelco Dolstra1-0/+329