Commit graph

169 commits

Author SHA1 Message Date
Marc Weber ea3688db98 added documentation illustrating behaviour of the new textClosureMap
implementation

svn path=/nixpkgs/trunk/; revision=15663
2009-05-19 23:26:08 +00:00
Marc Weber 52647ea3b0 FullDepEntry -> fullDepEntry, PackEntry -> packEntry
svn path=/nixpkgs/trunk/; revision=15662
2009-05-19 23:25:58 +00:00
Nicolas Pierron 1500252e6f * options.nix:
Remove attribute set comparison.  Imported attribute sets
        are traverse assuming that no duplicate could exists.

svn path=/nixpkgs/trunk/; revision=15659
2009-05-19 23:07:07 +00:00
Nicolas Pierron 47679b20af Remove unused feature which allowed to add properties on the required elements.
svn path=/nixpkgs/trunk/; revision=15658
2009-05-19 23:07:02 +00:00
Nicolas Pierron 36dcabd7be Add support for require attribute with a filename as argument.
svn path=/nixpkgs/trunk/; revision=15657
2009-05-19 23:06:56 +00:00
Eelco Dolstra b9d560d30e * Get rid of __primop.
* newMergeOptionSets -> mergeOptionSets.

svn path=/nixpkgs/trunk/; revision=15652
2009-05-19 14:54:41 +00:00
Eelco Dolstra abf71d5352 * textClosure: don't use uniqList, and don't rely on buggy behaviour
in the Nix expression evaluator (namely that comparison of attribute
  sets works properly).
* Removed some redundant parentheses in builder-defs.

svn path=/nixpkgs/trunk/; revision=15551
2009-05-11 15:21:42 +00:00
Eelco Dolstra 2f33cdec38 * Die tabs die. Also, renamed FullDepEntry and PackEntry to
fullDepEntry and packEntry for consistency.

svn path=/nixpkgs/trunk/; revision=15549
2009-05-11 11:55:05 +00:00
Marc Weber 8cc8965379 enhance escapeShellArg funtion. It should be pretty correct now
svn path=/nixpkgs/trunk/; revision=15475
2009-05-06 16:06: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 730f8c2b4d * Added a function to make Unix-style search paths. This generalises
`makeLibraryPath'.

svn path=/nixpkgs/trunk/; revision=14884
2009-04-05 18:05:11 +00:00
Eelco Dolstra 1f9740e01c * Added some regression tests for lib that I wrote a while ago but
didn't commit.  Also, run the tests when making a Nixpkgs tarball.

svn path=/nixpkgs/trunk/; revision=14802
2009-03-31 13:03:50 +00:00
Eelco Dolstra 2405d87230 * Move some functions for manipulating meta and name attributes out of
all-packages.nix and into lib.

svn path=/nixpkgs/trunk/; revision=14778
2009-03-30 13:22:19 +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
Marc Weber e06491168b tidied up pkgs/lib/debug.nix
more consistent naming:
  debugVal -> traceVal
  debugXMLVal -> traceXMLVal

  whatis -> showVal
  traceWhatis -> traceShowVal
  traceMarked -> traceShowValMarked

removed some parenthesis

svn path=/nixpkgs/trunk/; revision=14701
2009-03-25 13:48:55 +00:00
Nicolas Pierron f624a70ee7 Fix mkThenElse and mkAlways evaluation.
svn path=/nixpkgs/trunk/; revision=14528
2009-03-14 07:20:31 +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 08e1c08bc7 moved debugging functions into lib module "debug"
svn path=/nixpkgs/trunk/; revision=14430
2009-03-06 23:21:35 +00:00
Marc Weber 49b115132d add error context to all top level attr names of all-packages.nix
svn path=/nixpkgs/trunk/; revision=14429
2009-03-06 23:21:31 +00:00
Marc Weber b56ed35851 replacing applyAndFun by lib.defaultOverridableDelayableArgs
applyAndFun has a bug resulting in the same arg beeing added more than
once when using a concatenating merge function for the attr set.

I've tried giving the function a name "overridableDelayableArgs" which
resembles its usage much more.

important refactoring:
  applyAndFun had .fun and .funMerge only when passing the merge
  function lib.mergeOrApply

  composableDerivation {
    initial = {
      ...
    };
  }

to

  overridableDelayableArgs has always .replace and .merge
  composableDerivation {} {
    ...
  }

svn path=/nixpkgs/trunk/; revision=14428
2009-03-06 23:21:28 +00:00
Marc Weber 51289a41b0 adjust packages to overridableDelayableArgs
svn path=/nixpkgs/trunk/; revision=14427
2009-03-06 23:21:24 +00:00
Marc Weber f1183f33e3 added simple lib test case for overridableDelayableArgs
svn path=/nixpkgs/trunk/; revision=14426
2009-03-06 23:21:17 +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
Marc Weber be3a9f2346 added overridableDelayableArgs replacing applyAndFun
svn path=/nixpkgs/trunk/; revision=14424
2009-03-06 23:21:12 +00:00
Marc Weber e917282535 added eqStrict (deep, strict test for equality)
it can replace eqList and can compare attrs as well

svn path=/nixpkgs/trunk/; revision=14423
2009-03-06 23:21:09 +00:00
Nicolas Pierron e18a10d0ae * Refactor mkIf to extract the concept of properties.
Properties can be delay on any attribute set and have
functions which are used to define the semantic of each
property.

* Introduce the mkOverride property.

svn path=/nixpkgs/trunk/; revision=14285
2009-02-28 18:21:25 +00:00
Michael Raskin 8bf73286a4 add eqStrings back..
svn path=/nixpkgs/trunk/; revision=14228
2009-02-24 16:19:08 +00:00
Eelco Dolstra f9b9844949 * Doh.
svn path=/nixpkgs/trunk/; revision=14014
2009-02-09 17:03:18 +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
Eelco Dolstra 6ed4aa7ecb * Qt updated to 4.4.3 in preparation of upgrading KDE to 4.2.
svn path=/nixpkgs/trunk/; revision=13974
2009-02-03 16:32:56 +00:00
Nicolas Pierron 74630be169 Replace addLocation by addErrorContext.
pkgs.lib.addErrorContext add a new line inside the stack trace if this is supported by your nix version.

svn path=/nixpkgs/trunk/; revision=13886
2009-01-27 14:46:41 +00:00
Nicolas Pierron aa27e34a2e Remove python reference from comment.
svn path=/nixpkgs/trunk/; revision=13883
2009-01-27 14:08:49 +00:00
Nicolas Pierron a130392234 Suggest nice/readable example first for composableDerivation.
svn path=/nixpkgs/trunk/; revision=13882
2009-01-27 14:01:00 +00:00
Nicolas Pierron c333a6ab6b Add missing arguments to the "notHandle" functions of mergeOptionSets and filterOptionSets.
svn path=/nixpkgs/trunk/; revision=13872
2009-01-25 22:37:10 +00:00
Nicolas Pierron 74df154f73 Fix previous commit.
svn path=/nixpkgs/trunk/; revision=13870
2009-01-25 22:25:38 +00:00
Nicolas Pierron c2be87e132 Remove support for merge function with name argument.
svn path=/nixpkgs/trunk/; revision=13869
2009-01-25 21:23:47 +00:00
Nicolas Pierron c1b9946c28 Name argument of option's merge functions are now obsolete.
svn path=/nixpkgs/trunk/; revision=13842
2009-01-25 00:31:43 +00:00
Nicolas Pierron daa6f9c7ef Add a common merge function. (mergeOneOption)
This merge function allow only one definition for an option.

svn path=/nixpkgs/trunk/; revision=13841
2009-01-25 00:31:38 +00:00
Nicolas Pierron 9581664fb9 Add the "notdef" value when no else-part is defined.
Remove the "notdef" values from the user-defined values.

svn path=/nixpkgs/trunk/; revision=13840
2009-01-25 00:31:33 +00:00
Nicolas Pierron 57f66db54c Remove extra arguments from uniqFlatten.
Clean-up fixOptionSetsFun.

svn path=/nixpkgs/trunk/; revision=13839
2009-01-25 00:31:29 +00:00
Nicolas Pierron 13d5c8923d factor mergeOptionSets and filterOptionSets into the function handleOptionSets.
svn path=/nixpkgs/trunk/; revision=13838
2009-01-25 00:31:23 +00:00
Michael Raskin c87887ddd0 Oops. A typo fix
svn path=/nixpkgs/trunk/; revision=13727
2009-01-08 23:04:18 +00:00
Michael Raskin 46fec9e4c9 Add a (failure-prone) last-chance string merger
svn path=/nixpkgs/trunk/; revision=13726
2009-01-08 23:02:44 +00:00
Marc Weber 5638574907 fixes for previous commit
svn path=/nixpkgs/trunk/; revision=13662
2008-12-20 02:15:26 +00:00
Marc Weber e996113be7 removed mkDerivationByConfiguration, using composableDerivation instead
qgis, vim_configurable both work now

svn path=/nixpkgs/trunk/; revision=13661
2008-12-20 01:20:35 +00:00
Nicolas Pierron 071c62a942 Rewrite uniqFlattenAttr to handle any type of elements with associated keys.
Keys are introduced because manipulated sets cannot be compared safely.

svn path=/nixpkgs/trunk/; revision=13574
2008-12-03 18:56:00 +00:00
Marc Weber a7e33ec60c updates: istanbul starts without errors. But no window appears.
svn path=/nixpkgs/trunk/; revision=13554
2008-12-02 12:28:45 +00:00
Marc Weber 9e7846d214 added Haskell's foldl
svn path=/nixpkgs/trunk/; revision=13553
2008-12-02 12:28:21 +00:00
Marc Weber d8e1f6c976 adding lib function composableDerivation
providing easy setups of flags and configurations for derivations.
configuration is passed via passthru automatically,
additional names can be merged with final attrs in an automatic sensible way
even supporting fix.
fun and funMerge idea by Michael Raskin

svn path=/nixpkgs/trunk/; revision=13546
2008-12-02 12:26:53 +00:00
Marc Weber 429df4f864 added prepareDerivationArgs
svn path=/nixpkgs/trunk/; revision=13545
2008-12-02 12:26:43 +00:00