about summary refs log tree commit diff
diff options
context:
space:
mode:
authorAlyssa Ross <hi@alyssa.is>2021-04-17 00:11:02 +0000
committerAlyssa Ross <hi@alyssa.is>2021-06-09 14:50:53 +0000
commit9b6d1d11289e6ced2086258cd2af3fa5bed4ba8e (patch)
treef3dc8200cc557118157496299c39d48b5ea915f3
parentd0d1ec81ab75fc9668a25a2340ac3b83d6aec417 (diff)
downloadnixlib-9b6d1d11289e6ced2086258cd2af3fa5bed4ba8e.tar
nixlib-9b6d1d11289e6ced2086258cd2af3fa5bed4ba8e.tar.gz
nixlib-9b6d1d11289e6ced2086258cd2af3fa5bed4ba8e.tar.bz2
nixlib-9b6d1d11289e6ced2086258cd2af3fa5bed4ba8e.tar.lz
nixlib-9b6d1d11289e6ced2086258cd2af3fa5bed4ba8e.tar.xz
nixlib-9b6d1d11289e6ced2086258cd2af3fa5bed4ba8e.tar.zst
nixlib-9b6d1d11289e6ced2086258cd2af3fa5bed4ba8e.zip
impure: check for overlays before importing
This is important for evaluating Nixpkgs outside of the context of
nixlib.
-rw-r--r--nixpkgs/pkgs/top-level/impure.nix2
1 files changed, 1 insertions, 1 deletions
diff --git a/nixpkgs/pkgs/top-level/impure.nix b/nixpkgs/pkgs/top-level/impure.nix
index 478ea89da36f..88d674961356 100644
--- a/nixpkgs/pkgs/top-level/impure.nix
+++ b/nixpkgs/pkgs/top-level/impure.nix
@@ -53,7 +53,7 @@ in
         else
           # it's a file, so the result is the contents of the file itself
           import path;
-    in (overlays ../../../overlays) ++ (
+    in (if pathExists ../../../overlays then overlays ../../../overlays else []) ++ (
       if pathOverlays != "" && pathExists pathOverlays then overlays pathOverlays
       else if pathExists homeOverlaysFile && pathExists homeOverlaysDir then
         throw ''