diff --git a/pkgs/top-level/impure-overlays.nix b/pkgs/top-level/impure-overlays.nix index a46571d08840..3d0c6831b919 100644 --- a/pkgs/top-level/impure-overlays.nix +++ b/pkgs/top-level/impure-overlays.nix @@ -38,7 +38,10 @@ let ) else # it's a file, so the result is the contents of the file itself - [ (import path) ]; + let + overlay = import path; + in + if builtins.isFunction overlay then [ overlay ] else overlay; in if pathOverlays != "" && builtins.pathExists pathOverlays then overlays pathOverlays