Commit graph

10 commits

Author SHA1 Message Date
Nicolas Pierron 0f6a67814a Add 'collect' a function which recursively collects all attribute values verifying a predicate.
svn path=/nixpkgs/trunk/; revision=15936
2009-06-11 16:03:33 +00:00
Eelco Dolstra 1635ec4bdf * Put strings-with-deps in lib.
svn path=/nixpkgs/trunk/; revision=15729
2009-05-25 18:22:19 +00:00
Eelco Dolstra 8d7bf1a11e * Typo.
svn path=/nixpkgs/trunk/; revision=15699
2009-05-24 18:12:39 +00:00
Marc Weber ed69e9ed94 getAttr can call builtins.getAttr
svn path=/nixpkgs/trunk/; revision=15694
2009-05-24 10:57:49 +00:00
Marc Weber f7f938a1d1 big breaking change: renaming lib.getAttr to lib.attrByPath
getAttr was ambiguous. It's also a builtin function

fix

svn path=/nixpkgs/trunk/; revision=15692
2009-05-24 10:57:41 +00:00
Eelco Dolstra 671d53dd35 * Allow the user to install stdenv (nix-env -i stdenv) and get all the
packages in the stdenv as propagated user environment packages.

svn path=/nixpkgs/branches/stdenv-updates/; revision=15300
2009-04-25 14:08:29 +00:00
Eelco Dolstra 6b24d7bebe * mapAttrsRecursiveCond', which is like mapAttrsRecursive' but takes
a predicate to tell it whether to recursive into a given attribute
  set.

svn path=/nixpkgs/trunk/; revision=14776
2009-03-30 13:19:57 +00:00
Eelco Dolstra b53ef57554 * Moved mapAttrs to attrsets.nix.
* Added a function mapAttrsRecursive, which is like mapAttrs, but
  recursively applies itself to attribute sets.
* Commented and cleaned up some functions.

svn path=/nixpkgs/trunk/; revision=14495
2009-03-10 15:18:38 +00:00
Marc Weber 5ddfa7ed64 moved catAttrs, attrVals into attrsets.nix, adding attrValues
svn path=/nixpkgs/trunk/; revision=14425
2009-03-06 23:21:14 +00:00
Eelco Dolstra 599015e8b0 * Split lib/default.nix into several files, as it had become a big
mess.  Also cleaned up some functions:

  - foldl appeared broken (it recursively called fold).
  - Renamed logicalAND/logicalOR to and/or.
  - Removed listOfListsToAttrs, eqStrings: obsolete.
  - Removed isInList, which does the same thing as elem.
  - stringToCharacters: don't return a "" at the end of the list.
  - Renamed concatList to concat, as concatList (singular) is a
    misnomer: it takes two lists.  Likewise, renamed mergeAttr to
    mergeAttrs.

  misc.nix still contains a lot of stuff that should be refactored and
  moved to other files.

svn path=/nixpkgs/trunk/; revision=14013
2009-02-09 16:51:03 +00:00