diff --git a/pkgs/lib/modules.nix b/pkgs/lib/modules.nix index 3808893c14fe..6457fd14eb59 100644 --- a/pkgs/lib/modules.nix +++ b/pkgs/lib/modules.nix @@ -219,7 +219,7 @@ rec { decl = lib.addErrorContext "${eol - }while enhancing option '${addName name}'.${eol + }while enhancing option `${addName name}':${eol }${errorSource declarations}${eol }" ( addOptionMakeUp @@ -270,7 +270,7 @@ rec { value = lib.addErrorContext "${eol - }while evaluating the option '${addName name}'.${eol + }while evaluating the option `${addName name}':${eol }${errorSource (modulesOf name)}${eol }" ( let opt = option.decl; in diff --git a/pkgs/lib/properties.nix b/pkgs/lib/properties.nix index 5950ec54791f..592dc9c4bcb1 100644 --- a/pkgs/lib/properties.nix +++ b/pkgs/lib/properties.nix @@ -73,7 +73,7 @@ rec { let cleanAttrs = rmProperties attrs; in if isProperty attrs then iter (a: v: - lib.addErrorContext "while moving properties on the attribute `${a}'." ( + lib.addErrorContext "while moving properties on the attribute `${a}':" ( triggerPropertiesGlobalDelay a ( triggerPropertiesDelay a ( copyProperties attrs v @@ -88,7 +88,7 @@ rec { triggerPropertiesDelay = name: attrs: let callOnDelay = p@{property, ...}: - lib.addErrorContext "while calling a onDelay function." ( + lib.addErrorContext "while calling an `onDelay' function:" ( if property ? onDelay then property.onDelay name p else @@ -111,7 +111,7 @@ rec { }; callOnGlobalDelay = property: content: - lib.addErrorContext "while calling a onGlobalDelay function." ( + lib.addErrorContext "while calling an `onGlobalDelay' function:" ( property.onGlobalDelay name content ); in @@ -124,7 +124,7 @@ rec { evalProperties = valList: if valList != [] then filter (x: !isNotdef x) ( - lib.addErrorContext "while evaluating properties." ( + lib.addErrorContext "while evaluating properties:" ( triggerPropertiesGlobalEval ( evalLocalProperties valList ))) @@ -133,14 +133,14 @@ rec { evalLocalProperties = valList: filter (x: !isNotdef x) ( - lib.addErrorContext "while evaluating local properties." ( + lib.addErrorContext "while evaluating local properties:" ( map triggerPropertiesEval valList )); # Call onEval function triggerPropertiesEval = val: foldProperty (p@{property, ...}: - lib.addErrorContext "while calling a onEval function." ( + lib.addErrorContext "while calling an `onEval' function:" ( if property ? onEval then property.onEval p else @@ -165,7 +165,7 @@ rec { }; callOnGlobalEval = property: valList: - lib.addErrorContext "while calling a onGlobalEval function." ( + lib.addErrorContext "while calling an `onGlobalEval' function:" ( property.onGlobalEval valList ); in