From 09bed4bffcfa6794e49397d39ab96c3177077161 Mon Sep 17 00:00:00 2001 From: Nicolas Pierron Date: Thu, 5 Nov 2009 16:36:03 +0000 Subject: [PATCH] * Report file locations in the stack-trace when multiple option declarations cannot be merged. svn path=/nixpkgs/trunk/; revision=18149 --- pkgs/lib/modules.nix | 11 ++++++++--- 1 file changed, 8 insertions(+), 3 deletions(-) diff --git a/pkgs/lib/modules.nix b/pkgs/lib/modules.nix index 9bd3b4aab8ce..8f6ae5666b18 100644 --- a/pkgs/lib/modules.nix +++ b/pkgs/lib/modules.nix @@ -217,9 +217,14 @@ rec { ) declarations; decl = - addOptionMakeUp - { name = addName name; recurseInto = recurseForOption; } - (mergeOptionDecls decls); + lib.addErrorContext "${eol + }while enhancing option '${addName name}'.${eol + }${errorSource declarations}${eol + }" ( + addOptionMakeUp + { name = addName name; recurseInto = recurseForOption; } + (mergeOptionDecls decls) + ); value = decl // (with config; { inherit (config) isNotDefined;