From f9da1fa95715e8bb13c8899b7e1d280e370c5168 Mon Sep 17 00:00:00 2001 From: "Nicolas B. Pierron" Date: Mon, 26 Dec 2016 19:26:24 +0000 Subject: [PATCH] Throw an error if NIXPKGS_OVERLAYS is invalid and improve documentation. --- doc/overlays.xml | 4 ++-- pkgs/top-level/impure.nix | 4 +++- 2 files changed, 5 insertions(+), 3 deletions(-) diff --git a/doc/overlays.xml b/doc/overlays.xml index d194c6bfc89..abaa264addb 100644 --- a/doc/overlays.xml +++ b/doc/overlays.xml @@ -13,8 +13,8 @@ to bind the dependencies of all packages.
Installing Overlays -Overlays are looked for in the following order, the first valid one is -considered, and all the rest are ignored: +The set of overlays are looked for in the following order, only the +first one present is considered, and all the rest are ignored: diff --git a/pkgs/top-level/impure.nix b/pkgs/top-level/impure.nix index 1aa55f7293b..60a55c657c0 100644 --- a/pkgs/top-level/impure.nix +++ b/pkgs/top-level/impure.nix @@ -31,7 +31,9 @@ let content = readDir dir; in map (n: import "${dir}/${n}") (sort lessThan (attrNames content)); in - if dirCheck dirEnv then overlays dirEnv + if dirEnv != "" then + if dirCheck dirEnv then overlays dirEnv + else throw "The environment variable NIXPKGS_OVERLAYS does not name a valid directory." else if dirCheck dirHome then overlays dirHome else []