|
21 | 21 | , caller ? "callCabalProjectToNix" # Name of the calling funcion for better warning messages
|
22 | 22 | , ghc ? null # Deprecated in favour of `compiler-nix-name`
|
23 | 23 | , 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 |
26 | 26 | , configureArgs ? "" # Extra arguments to pass to `cabal v2-configure`.
|
27 | 27 | # `--enable-tests --enable-benchmarks` are included by default.
|
28 | 28 | # If the tests and benchmarks are not needed and they
|
@@ -212,14 +212,21 @@ let
|
212 | 212 | # The solution here is to capture the GHC outputs that `cabal v2-configure`
|
213 | 213 | # requests and materialize it so that the real GHC is only needed
|
214 | 214 | # 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 | + }) ( |
223 | 230 | runCommand ("dummy-data-" + ghc.name) {
|
224 | 231 | nativeBuildInputs = [ ghc ];
|
225 | 232 | } ''
|
|
0 commit comments