summary refs log tree commit diff
path: root/pkgs/lib/customisation.nix
diff options
context:
space:
mode:
Diffstat (limited to 'pkgs/lib/customisation.nix')
-rw-r--r--pkgs/lib/customisation.nix2
1 files changed, 1 insertions, 1 deletions
diff --git a/pkgs/lib/customisation.nix b/pkgs/lib/customisation.nix
index f97b494ae92d..d2af48146284 100644
--- a/pkgs/lib/customisation.nix
+++ b/pkgs/lib/customisation.nix
@@ -89,7 +89,7 @@ rec {
       };
   */
   callPackageWith = autoArgs: fn: args:
-    let f = import fn; in
+    let f = if builtins.isFunction fn then fn else import fn; in
     makeOverridable f ((builtins.intersectAttrs (builtins.functionArgs f) autoArgs) // args);
 
 }