@@ -36,6 +36,11 @@ let
36 then builtins.trace ("Warning: ignoring materialized for " + name + " " + reason) x
36 then builtins.trace ("Warning: ignoring materialized for " + name + " " + reason) x
39+ traceWhenChecking = message: x:
40+ if checkMaterialization
41+ then builtins.trace message x
39 unchecked =
44 unchecked =
41 sha256message = "${name}: To make ${this} a fixed-output derivation but not materialized, set `${sha256Arg}` to the output of the 'calculateMaterializedSha' script in 'passthru'.";
46 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
50 else if sha256 != null
55 else if sha256 != null
52 # Let the user know how to materialize if they want to.
57 # Let the user know how to materialize if they want to.
53− builtins.trace materializeMessage calculateUseHash
58+ traceWhenChecking materializeMessage calculateUseHash
54 else # materialized == null && sha256 == null
59 else # materialized == null && sha256 == null
55 # Let the user know how to calculate a sha256 or materialize if they want to.
60 # 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);
58 # Build fully and check the hash and materialized versions
63 # Build fully and check the hash and materialized versions