Throw an error if NIXPKGS_OVERLAYS is invalid and improve documentation.

This commit is contained in:
Nicolas B. Pierron
2017-01-16 01:17:33 +01:00
committed by Nicolas B. Pierron
parent 6a83c315ec
commit f9da1fa957
2 changed files with 5 additions and 3 deletions
+3 -1
View File
@@ -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 []