Add mkOverrideTemplate (currently the same as mkOverride).
svn path=/nixpkgs/trunk/; revision=17737
This commit is contained in:
parent
bb16a7f08d
commit
d11481e9bf
|
@ -288,7 +288,7 @@ rec {
|
||||||
# priorities are kept. The template argument must reproduce the same
|
# priorities are kept. The template argument must reproduce the same
|
||||||
# attribute set hierarchy to override leaves of the hierarchy.
|
# attribute set hierarchy to override leaves of the hierarchy.
|
||||||
isOverride = attrs: (typeOf attrs) == "override";
|
isOverride = attrs: (typeOf attrs) == "override";
|
||||||
mkOverride = priority: template: content: mkProperty {
|
mkOverrideTemplate = priority: template: content: mkProperty {
|
||||||
property = {
|
property = {
|
||||||
_type = "override";
|
_type = "override";
|
||||||
onDelay = onOverrideDelay;
|
onDelay = onOverrideDelay;
|
||||||
|
@ -298,6 +298,10 @@ rec {
|
||||||
inherit content;
|
inherit content;
|
||||||
};
|
};
|
||||||
|
|
||||||
|
# Currently an alias, but sooner or later the template argument should be
|
||||||
|
# removed.
|
||||||
|
mkOverride = mkOverrideTemplate;
|
||||||
|
|
||||||
# Sugar to override the default value of the option by making a new
|
# Sugar to override the default value of the option by making a new
|
||||||
# default value based on the configuration.
|
# default value based on the configuration.
|
||||||
mkDefaultValue = content: mkOverride 1000 {} content;
|
mkDefaultValue = content: mkOverride 1000 {} content;
|
||||||
|
|
Loading…
Reference in New Issue