Eval errors will now print a simple, no frills chain of involved
derivations at the bottom. For example, trying to evaluate
`pkgs.xonsh.override { python3 = pkgs.python2; }` has the usual
Package ‘python-2.7.18.8’ in /nix/store/9v6qa656sq3xc58vkxslqy646p0ajj61-source/pkgs/development/interpreters/python/cpython/2.7/default.nix:398 is marked as insecure, refusing to evaluate.
message, but now also includes the following:
note: trace involved the following derivations:
derivation 'xonsh-0.19.9'
derivation 'python2.7-xonsh-0.19.9'
derivation 'python2.7-setuptools-44.0.0'
To give the user information about why the erroring derivation was
involved in the first place.
We would like more structured information in the future, but this should
still be a significant improvement.
Change-Id: Icf6da52abd0a043cfb63943bf0b0c160c21ee59e
31 lines
575 B
Nix
31 lines
575 B
Nix
with import ./config.nix;
|
|
let
|
|
transitive-dependency = mkDerivation {
|
|
name = "transitive-dependency";
|
|
__structuredAttrs = true;
|
|
|
|
nativeBuildInputs = [
|
|
null
|
|
(throw "transitive dependency growls")
|
|
];
|
|
};
|
|
|
|
|
|
direct-dependency = derivation {
|
|
name = "direct-dependency";
|
|
__structuredAttrs = true;
|
|
|
|
libtrans = transitive-dependency;
|
|
};
|
|
|
|
package-you-care-about = derivation {
|
|
name = "package-you-care-about";
|
|
__structuredAttrs = true;
|
|
|
|
buildInputs = [
|
|
direct-dependency
|
|
];
|
|
};
|
|
|
|
in package-you-care-about.outPath
|