@@ -21,8 +21,8 @@ in
2121, caller ? "callCabalProjectToNix" # Name of the calling funcion for better warning messages
2222, ghc ? null # Deprecated in favour of `compiler-nix-name`
2323, ghcOverride ? null # Used when we need to set ghc explicitly during bootstrapping
24−, nix-tools ? evalPackages.haskell-nix.nix-tools.${compiler-nix-name} # When building cabal projects we use the nix-tools
25−, cabal-install ? evalPackages.haskell-nix.cabal-install.${compiler-nix-name} # and cabal-install compiled with matching ghc version
24+, nix-tools ? evalPackages.haskell-nix.nix-tools-unchecked.${compiler-nix-name} # When building cabal projects we use the nix-tools
25+, cabal-install ? evalPackages.haskell-nix.cabal-install-unchecked.${compiler-nix-name} # and cabal-install compiled with matching ghc version
2626, configureArgs ? "" # Extra arguments to pass to `cabal v2-configure`.
2727 # `--enable-tests --enable-benchmarks` are included by default.
2828 # If the tests and benchmarks are not needed and they
@@ -212,14 +212,21 @@ let
212212 # The solution here is to capture the GHC outputs that `cabal v2-configure`
213213 # requests and materialize it so that the real GHC is only needed
214214 # when `checkMaterialization` is set.
215− dummy-ghc-data = pkgs.haskell-nix.materialize ({
216− sha256 = null;
217− sha256Arg = "sha256";
218− materialized = ../materialized/dummy-ghc + "/${ghc.targetPrefix}${ghc.name}-${pkgs.stdenv.buildPlatform.system}";
219− reasonNotSafe = null;
220− } // pkgs.lib.optionalAttrs (checkMaterialization != null) {
221− inherit checkMaterialization;
222− }) (
215+ dummy-ghc-data =
216+ let
217+ materialized = ../materialized/dummy-ghc + "/${ghc.targetPrefix}${ghc.name}-${pkgs.stdenv.buildPlatform.system}";
218+ in pkgs.haskell-nix.materialize ({
219+ sha256 = null;
220+ sha256Arg = "sha256";
221+ materialized = if __pathExists materialized
222+ then materialized
223+ else __trace ("WARNING: No materialized dummy-ghc-data for "
224+ + "${ghc.targetPrefix}${ghc.name}-${pkgs.stdenv.buildPlatform.system}.")
225+ null;
226+ reasonNotSafe = null;
227+ } // pkgs.lib.optionalAttrs (checkMaterialization != null) {
228+ inherit checkMaterialization;
229+ }) (
223230 runCommand ("dummy-data-" + ghc.name) {
224231 nativeBuildInputs = [ ghc ];
225232 } ''