insert definitions from an external location. As opposed to other
defintions, these definitions are always embedded into a list which allow
to add multiple definitions with one module.
!!! This feature _should not_ be used as a new mean to define options.
svn path=/nixpkgs/trunk/; revision=17481
- Remove handleOptionSets which used option declarations & definitions
in the same set.
- Add a traversal of modules where "config" and "options" are traverse at
the same time.
This allow to have accruate error messages with the incriminated files
playing a role in the error.
This system add a new restriction compare to the previous system:
- A module with no structure (option definitions & option declarations
& require) should not contain any option declarations. If such module
exists you must convert it to the following form:
{ imports = <content of the require attribute>;
options = <set of option declarations>;
config = <set of option definitions>;
}
svn path=/nixpkgs/trunk/; revision=17163
- well named,
- capable to handle the proposal of Eelco Dolstra { imports= [..]; options = {}; config = {}; } in addition to the current { require = [..]; .. } syntax.
svn path=/nixpkgs/trunk/; revision=16192
- Do not eval properties on option declarations.
-> mkIf does not mask option declarations if the condition is evaluated to false.
svn path=/nixpkgs/trunk/; revision=16043
Use the option name computed by "handleOptionSets" instead of
computing it a second time. Handle option containing option sets.
svn path=/nixpkgs/trunk/; revision=15937
Remove attribute set comparison. Imported attribute sets
are traverse assuming that no duplicate could exists.
svn path=/nixpkgs/trunk/; revision=15659
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
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
easier. Instead of writing
config.get ["foo" "bar"]
it would be much cleaner to just write
config.foo.bar
only this doesn't handle the case where option foo.bar is not
supplied in the configuration; in that case we need to take the
default value from some set of option definitions
(system/options.nix in NixOS).
Following a suggestion from Martin, the function `combine' (need
better name) takes a set of option definitions (which follow the
attribute set structure of the options) and a set of options and
fills in missing values in the latter with default values from the
former. This only works with very recent versions of Nix (it needs
Marc Weber's listToAttrs primop).
svn path=/nixpkgs/trunk/; revision=9203