@@ -36,6 +36,11 @@ let
3636 then builtins.trace ("Warning: ignoring materialized for " + name + " " + reason) x
3737 else x;
3838
39+ traceWhenChecking = message: x:
40+ if checkMaterialization
41+ then builtins.trace message x
42+ else x;
43+
3944 unchecked =
4045 let
4146 sha256message = "${name}: To make ${this} a fixed-output derivation but not materialized, set `${sha256Arg}` to the output of the 'calculateMaterializedSha' script in 'passthru'.";
@@ -50,10 +55,10 @@ let
5055 else if sha256 != null
5156 then
5257 # Let the user know how to materialize if they want to.
53− builtins.trace materializeMessage calculateUseHash
58+ traceWhenChecking materializeMessage calculateUseHash
5459 else # materialized == null && sha256 == null
5560 # Let the user know how to calculate a sha256 or materialize if they want to.
56− builtins.trace sha256message (builtins.trace materializeMessage calculateNoHash);
61+ traceWhenChecking sha256message (traceWhenChecking materializeMessage calculateNoHash);
5762
5863 # Build fully and check the hash and materialized versions
5964 checked =