about summary refs log tree commit diff
diff options
context:
space:
mode:
authorEelco Dolstra <eelco.dolstra@logicblox.com>2013-10-28 17:46:45 +0100
committerEelco Dolstra <eelco.dolstra@logicblox.com>2013-10-28 22:45:57 +0100
commit1b2006270f9e1307f575a9a7bc82b6d4f3c37cec (patch)
tree6f5bb24d0f7145b37208f89d5a5bb893c7f03406
parent136707494062c86d1c7269f9ea363fc267e95b78 (diff)
downloadnixlib-1b2006270f9e1307f575a9a7bc82b6d4f3c37cec.tar
nixlib-1b2006270f9e1307f575a9a7bc82b6d4f3c37cec.tar.gz
nixlib-1b2006270f9e1307f575a9a7bc82b6d4f3c37cec.tar.bz2
nixlib-1b2006270f9e1307f575a9a7bc82b6d4f3c37cec.tar.lz
nixlib-1b2006270f9e1307f575a9a7bc82b6d4f3c37cec.tar.xz
nixlib-1b2006270f9e1307f575a9a7bc82b6d4f3c37cec.tar.zst
nixlib-1b2006270f9e1307f575a9a7bc82b6d4f3c37cec.zip
Support mkOverride in non-leaf nodes
-rw-r--r--lib/modules.nix4
1 files changed, 2 insertions, 2 deletions
diff --git a/lib/modules.nix b/lib/modules.nix
index f6b866304d05..d141838d466c 100644
--- a/lib/modules.nix
+++ b/lib/modules.nix
@@ -125,7 +125,6 @@ rec {
       if opt.options ? default && res ? default ||
          opt.options ? example && res ? example ||
          opt.options ? description && res ? description ||
-         opt.options ? merge && res ? merge || # FIXME: remove merge
          opt.options ? apply && res ? apply ||
          opt.options ? type && res ? type
       then
@@ -185,8 +184,9 @@ rec {
       concatMap pushDownProperties cfg.contents
     else if cfg._type or "" == "if" then
       map (mapAttrs (n: v: mkIf cfg.condition v)) (pushDownProperties cfg.content)
+    else if cfg._type or "" == "override" then
+      map (mapAttrs (n: v: mkOverride cfg.priority v)) (pushDownProperties cfg.content)
     else
-      # FIXME: handle mkOverride?
       [ cfg ];
 
   /* Given a config value, expand mkMerge properties, and discharge