diff --git a/pkgs/lib/debug.nix b/pkgs/lib/debug.nix index 23d1a85c72fd..f1f366d065b7 100644 --- a/pkgs/lib/debug.nix +++ b/pkgs/lib/debug.nix @@ -1,3 +1,5 @@ +let lib = import ./default.nix; in + rec { @@ -10,6 +12,7 @@ rec { then builtins.addErrorContext else msg: val: val; + addErrorContextToAttrs = lib.mapAttrs (a : v : lib.addErrorContext "while evaluating ${a}" v); } \ No newline at end of file diff --git a/pkgs/top-level/all-packages.nix b/pkgs/top-level/all-packages.nix index a8025096f071..a8498ea72a29 100644 --- a/pkgs/top-level/all-packages.nix +++ b/pkgs/top-level/all-packages.nix @@ -9584,4 +9584,4 @@ let }; libTests = import ../lib/tests.nix; -}; in pkgs +}; in lib.addErrorContextToAttrs pkgs