From d11481e9bf3c90a3c476621052542b2165f31763 Mon Sep 17 00:00:00 2001 From: Nicolas Pierron Date: Fri, 9 Oct 2009 18:11:36 +0000 Subject: [PATCH] Add mkOverrideTemplate (currently the same as mkOverride). svn path=/nixpkgs/trunk/; revision=17737 --- pkgs/lib/properties.nix | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/pkgs/lib/properties.nix b/pkgs/lib/properties.nix index 5254292655e..ddf3d6cf594 100644 --- a/pkgs/lib/properties.nix +++ b/pkgs/lib/properties.nix @@ -288,7 +288,7 @@ rec { # priorities are kept. The template argument must reproduce the same # attribute set hierarchy to override leaves of the hierarchy. isOverride = attrs: (typeOf attrs) == "override"; - mkOverride = priority: template: content: mkProperty { + mkOverrideTemplate = priority: template: content: mkProperty { property = { _type = "override"; onDelay = onOverrideDelay; @@ -298,6 +298,10 @@ rec { 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 # default value based on the configuration. mkDefaultValue = content: mkOverride 1000 {} content;