summary refs log tree commit diff
path: root/lib/customisation.nix
diff options
context:
space:
mode:
Diffstat (limited to 'lib/customisation.nix')
-rw-r--r--lib/customisation.nix7
1 files changed, 7 insertions, 0 deletions
diff --git a/lib/customisation.nix b/lib/customisation.nix
index 04a5cb420335..f16043cf9a3e 100644
--- a/lib/customisation.nix
+++ b/lib/customisation.nix
@@ -65,6 +65,13 @@ rec {
           overrideDerivation = fdrv:
             makeOverridable (args: overrideDerivation (f args) fdrv) origArgs;
         })
+      else if builtins.isFunction ff then
+        { override = newArgs:
+            makeOverridable f (origArgs // (if builtins.isFunction newArgs then newArgs origArgs else newArgs));
+          __functor = self: ff;
+          deepOverride = throw "deepOverride not yet supported for functors";
+          overrideDerivation = throw "overrideDerivation not yet supported for functors";
+        }
       else ff;
 
   deepOverrider = newArgs: name: x: if builtins.isAttrs x then (