3
0
Fork 0
forked from mirrors/nixpkgs

Throw an error if NIXPKGS_OVERLAYS is invalid and improve documentation.

This commit is contained in:
Nicolas B. Pierron 2016-12-26 19:26:24 +00:00 committed by Nicolas B. Pierron
parent 6a83c315ec
commit f9da1fa957
2 changed files with 5 additions and 3 deletions

View file

@ -13,8 +13,8 @@ to bind the dependencies of all packages.</para>
<section xml:id="sec-overlays-install">
<title>Installing Overlays</title>
<para>Overlays are looked for in the following order, the first valid one is
considered, and all the rest are ignored:
<para>The set of overlays are looked for in the following order, only the
first one present is considered, and all the rest are ignored:
<orderedlist>

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 []