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
builtin to force the evaluation of the configuration value. Thus the
success flag returned by tryEval corespond to the success of the
whole evaluation.
svn path=/nixpkgs/trunk/; revision=17478
moduleMerge because we may need to alter the result of the configuration
before using it inside other options.
svn path=/nixpkgs/trunk/; revision=17477
- 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
other files.
Imports of imported attribute set are not working anymore because this
feature is hard to maintain and because this a potential source of error.
Imports are only accepted inside named modules where the system has some
control over mutual inclusion.
svn path=/nixpkgs/trunk/; revision=17144
* unifyModuleSyntax: handle all kind of module syntax to convert them into
a module which has the following form:
{
imports = [ <paths> ];
options = <attribute set of options declarations>;
config = <attribute set (with properties) of option definitions>;
}
This function assume that there is at most one imported attribute set which
correspond to option declarations.
* moduleClosure: handle a list of module's paths which are converted with
the previous function to do the closure of the imports with the function
lazyGenericClosure (which does the same as builtins.genericClosure except
that it doesn't evaluate the content of modules). The "key" and "paths"
attributes are left to be used as debug information in futur
implementation(s).
svn path=/nixpkgs/trunk/; revision=17108
The rationale is that usually applications don't care about the kernel
but rather about the C library, tool chain, and standard utilities,
which are GNU, not Linux.
svn path=/nixpkgs/trunk/; revision=17069
- 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
indentation in expressions like
environent.extraJobs =
[ { name = "foo";
job =
''
bla bla
'';
}
];
which becomes
environent.extraJobs = singleton
{ name = "foo";
job =
''
bla bla
'';
};
svn path=/nixpkgs/trunk/; revision=15892
Remove attribute set comparison. Imported attribute sets
are traverse assuming that no duplicate could exists.
svn path=/nixpkgs/trunk/; revision=15659
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
* 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
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
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