mirror of
https://github.com/ilyakooo0/nixpkgs.git
synced 2024-11-15 13:37:21 +03:00
15 lines
362 B
Nix
15 lines
362 B
Nix
|
rec {
|
||
|
|
||
|
|
||
|
# Wrapper aroung the primop `addErrorContext', which shouldn't used
|
||
|
# directly. It evaluates and returns `val', but if an evaluation
|
||
|
# error occurs, the text in `msg' is added to the error context
|
||
|
# (stack trace) printed by Nix.
|
||
|
addErrorContext =
|
||
|
if builtins ? addErrorContext
|
||
|
then builtins.addErrorContext
|
||
|
else msg: val: val;
|
||
|
|
||
|
|
||
|
|
||
|
}
|