@@ -62,6 +62,7 @@ let
62 then final.buildPackages.buildPackages.haskell-nix.compiler.ghc8107
62 then final.buildPackages.buildPackages.haskell-nix.compiler.ghc8107
63 else final.buildPackages.buildPackages.haskell-nix.compiler.ghc884;
63 else final.buildPackages.buildPackages.haskell-nix.compiler.ghc884;
64 latestVer = {
64 latestVer = {
65 "8.6" = "8.6.5";
66 "8.6" = "8.6.5";
66 "8.8" = "8.8.4";
67 "8.8" = "8.8.4";
67 "8.10" = "8.10.7";
68 "8.10" = "8.10.7";
@@ -69,11 +70,18 @@ let
69 "9.2" = "9.2.2";
70 "9.2" = "9.2.2";
71 traceWarnOld = v: x:
72 traceWarnOld = v: x:
74+ bootstrapGhc = final.buildPackages.haskell-nix.bootstrap.compiler."${buildBootstrapper.compilerNixName}";
76+ if builtins.compareVersions x.src-spec.version bootstrapGhc.version < 0 then
77+ throw "Desired GHC (${x.src-spec.version}) is older than the bootstrap GHC (${bootstrapGhc.version}) for this platform (${final.targetPlatform.config})."
72− # There is no binary for aarch64-linux ghc 8.8.4 so don't warn about 8.8.3
78+ # There is no binary for aarch64-linux ghc 8.8.4 so don't warn about 8.8.3 not being the latest version
73− if x.src-spec.version == "8.8.3" && (final.targetPlatform.isAarch64 || final.buildPlatform.isAarch64)
79+ else if x.src-spec.version == "8.8.3" && (final.targetPlatform.isAarch64 || final.buildPlatform.isAarch64)
81+ else if builtins.compareVersions x.src-spec.version latestVer.${v} < 0
75− else __trace
82+ then __trace
76− "WARNING: ${x.src-spec.version} is out of date, consider using ${latestVer.${v}}." x;
83+ "WARNING: ${x.src-spec.version} is out of date, consider using ${latestVer.${v}}." x
77 errorOldGhcjs = v: up: throw "ghcjs ${v} is no longer supported by haskell.nix. Consider using ${latestVer.${up}}";
85 errorOldGhcjs = v: up: throw "ghcjs ${v} is no longer supported by haskell.nix. Consider using ${latestVer.${up}}";
79 haskell-nix = prev.haskell-nix // {
87 haskell-nix = prev.haskell-nix // {
@@ -213,7 +221,7 @@ in {
213 ++ final.lib.optional (versionAtLeast "8.10" && versionLessThan "9.0" && final.targetPlatform.isAndroid) ./patches/ghc/android-base-needs-iconv.patch
221 ++ final.lib.optional (versionAtLeast "8.10" && versionLessThan "9.0" && final.targetPlatform.isAndroid) ./patches/ghc/android-base-needs-iconv.patch
216− ghc844 = final.callPackage ../compiler/ghc {
224+ ghc844 = final.callPackage ../compiler/ghc (traceWarnOld "8.4" {
217 extra-passthru = { buildGHC = final.buildPackages.haskell-nix.compiler.ghc844; };
225 extra-passthru = { buildGHC = final.buildPackages.haskell-nix.compiler.ghc844; };
219 inherit sphinx installDeps;
227 inherit sphinx installDeps;
@@ -234,7 +242,7 @@ in {
234 ghc-patches = ghc-patches "8.4.4"
242 ghc-patches = ghc-patches "8.4.4"
235 ++ [ hsc2hs-align-conditionals-patch D5123-patch ]
243 ++ [ hsc2hs-align-conditionals-patch D5123-patch ]
236 ++ final.lib.optional final.stdenv.isDarwin ./patches/ghc/ghc-8.4.4-backport-dylib-command-size-limit.patch;
244 ++ final.lib.optional final.stdenv.isDarwin ./patches/ghc/ghc-8.4.4-backport-dylib-command-size-limit.patch;
238 ghc861 = final.callPackage ../compiler/ghc (traceWarnOld "8.6" {
246 ghc861 = final.callPackage ../compiler/ghc (traceWarnOld "8.6" {
239 extra-passthru = { buildGHC = final.buildPackages.haskell-nix.compiler.ghc861; };
247 extra-passthru = { buildGHC = final.buildPackages.haskell-nix.compiler.ghc861; };
@@ -318,7 +326,7 @@ in {
318 ghc-patches = ghc-patches "8.6.4"
326 ghc-patches = ghc-patches "8.6.4"
319 ++ [ D5123-patch ];
327 ++ [ D5123-patch ];
321− ghc865 = final.callPackage ../compiler/ghc {
329+ ghc865 = final.callPackage ../compiler/ghc (traceWarnOld "8.6" {
322 extra-passthru = { buildGHC = final.buildPackages.haskell-nix.compiler.ghc865; };
330 extra-passthru = { buildGHC = final.buildPackages.haskell-nix.compiler.ghc865; };
324 inherit sphinx installDeps;
332 inherit sphinx installDeps;
@@ -338,7 +346,7 @@ in {
339 ghc-patches = ghc-patches "8.6.5"
347 ghc-patches = ghc-patches "8.6.5"
340 ++ [ D5123-patch haddock-900-patch ];
348 ++ [ D5123-patch haddock-900-patch ];
342 ghc881 = final.callPackage ../compiler/ghc (traceWarnOld "8.8" {
350 ghc881 = final.callPackage ../compiler/ghc (traceWarnOld "8.8" {
343 extra-passthru = { buildGHC = final.buildPackages.haskell-nix.compiler.ghc881; };
351 extra-passthru = { buildGHC = final.buildPackages.haskell-nix.compiler.ghc881; };
@@ -387,7 +395,7 @@ in {
388 ghc-patches = ghc-patches "8.8.3";
396 ghc-patches = ghc-patches "8.8.3";
390− ghc884 = final.callPackage ../compiler/ghc {
398+ ghc884 = final.callPackage ../compiler/ghc (traceWarnOld "8.8" {
391 extra-passthru = { buildGHC = final.buildPackages.haskell-nix.compiler.ghc884; };
399 extra-passthru = { buildGHC = final.buildPackages.haskell-nix.compiler.ghc884; };
393 inherit bootPkgs sphinx installDeps;
401 inherit bootPkgs sphinx installDeps;
@@ -402,7 +410,7 @@ in {
404 ghc-patches = ghc-patches "8.8.4";
412 ghc-patches = ghc-patches "8.8.4";
406 ghc8101 = final.callPackage ../compiler/ghc (traceWarnOld "8.10" {
414 ghc8101 = final.callPackage ../compiler/ghc (traceWarnOld "8.10" {
407 extra-passthru = { buildGHC = final.buildPackages.haskell-nix.compiler.ghc8101; };
415 extra-passthru = { buildGHC = final.buildPackages.haskell-nix.compiler.ghc8101; };
@@ -517,7 +525,7 @@ in {
518 ghc-patches = ghc-patches "8.10.6";
526 ghc-patches = ghc-patches "8.10.6";
520− ghc8107 = final.callPackage ../compiler/ghc {
528+ ghc8107 = final.callPackage ../compiler/ghc (traceWarnOld "8.10" {
521 extra-passthru = { buildGHC = final.buildPackages.haskell-nix.compiler.ghc8107; };
529 extra-passthru = { buildGHC = final.buildPackages.haskell-nix.compiler.ghc8107; };
523 bootPkgs = bootPkgs // {
531 bootPkgs = bootPkgs // {
@@ -535,8 +543,8 @@ in {
537 ghc-patches = ghc-patches "8.10.7";
545 ghc-patches = ghc-patches "8.10.7";
539− ghc901 = final.callPackage ../compiler/ghc {
547+ ghc901 = final.callPackage ../compiler/ghc (traceWarnOld "9.0" {
540 extra-passthru = { buildGHC = final.buildPackages.haskell-nix.compiler.ghc901; };
548 extra-passthru = { buildGHC = final.buildPackages.haskell-nix.compiler.ghc901; };
542 bootPkgs = bootPkgs // {
550 bootPkgs = bootPkgs // {
@@ -554,8 +562,8 @@ in {
556 ghc-patches = ghc-patches "9.0.1";
564 ghc-patches = ghc-patches "9.0.1";
558− ghc902 = final.callPackage ../compiler/ghc {
566+ ghc902 = final.callPackage ../compiler/ghc (traceWarnOld "9.0" {
559 extra-passthru = { buildGHC = final.buildPackages.haskell-nix.compiler.ghc902; };
567 extra-passthru = { buildGHC = final.buildPackages.haskell-nix.compiler.ghc902; };
561 bootPkgs = bootPkgs // {
569 bootPkgs = bootPkgs // {
@@ -573,8 +581,8 @@ in {
575 ghc-patches = ghc-patches "9.0.2";
583 ghc-patches = ghc-patches "9.0.2";
577− ghc921 = final.callPackage ../compiler/ghc {
585+ ghc921 = final.callPackage ../compiler/ghc (traceWarnOld "9.2" {
578 extra-passthru = { buildGHC = final.buildPackages.haskell-nix.compiler.ghc921; };
586 extra-passthru = { buildGHC = final.buildPackages.haskell-nix.compiler.ghc921; };
580 bootPkgs = bootPkgs // {
588 bootPkgs = bootPkgs // {
@@ -593,8 +601,8 @@ in {
595 ghc-patches = ghc-patches "9.2.1";
603 ghc-patches = ghc-patches "9.2.1";
597− ghc922 = final.callPackage ../compiler/ghc {
605+ ghc922 = final.callPackage ../compiler/ghc (traceWarnOld "9.2" {
598 extra-passthru = { buildGHC = final.buildPackages.haskell-nix.compiler.ghc922; };
606 extra-passthru = { buildGHC = final.buildPackages.haskell-nix.compiler.ghc922; };
600 bootPkgs = bootPkgs // {
608 bootPkgs = bootPkgs // {
@@ -613,7 +621,7 @@ in {
615 ghc-patches = ghc-patches "9.2.2";
623 ghc-patches = ghc-patches "9.2.2";
617 # ghc 8.10.4 with patches needed by plutus
625 # ghc 8.10.4 with patches needed by plutus
618 ghc810420210212 = final.callPackage ../compiler/ghc {
626 ghc810420210212 = final.callPackage ../compiler/ghc {
619 extra-passthru = { buildGHC = final.buildPackages.haskell-nix.compiler.ghc810420210212; };
627 extra-passthru = { buildGHC = final.buildPackages.haskell-nix.compiler.ghc810420210212; };