diff options
author | Nicolas B. Pierron <nicolas.b.pierron@nbp.name> | 2016-12-26 19:26:24 +0000 |
---|---|---|
committer | Nicolas B. Pierron <nicolas.b.pierron@gmail.com> | 2017-01-16 01:17:33 +0100 |
commit | f9da1fa95715e8bb13c8899b7e1d280e370c5168 (patch) | |
tree | 0b1ae8602bd44764b56a8e322d42be49eec1343f /pkgs/top-level/impure.nix | |
parent | 6a83c315ec1587bfe6527381d5f0f6014b375020 (diff) |
Throw an error if NIXPKGS_OVERLAYS is invalid and improve documentation.
Diffstat (limited to 'pkgs/top-level/impure.nix')
-rw-r--r-- | pkgs/top-level/impure.nix | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/pkgs/top-level/impure.nix b/pkgs/top-level/impure.nix index 1aa55f7293ba..60a55c657c0c 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 [] |