@@ -229,7 +229,10 @@ self: super: {
229 # this is not ideal!
229 # this is not ideal!
230 # get binary compilers for bootstrapping. We'll put the eventual proper
230 # get binary compilers for bootstrapping. We'll put the eventual proper
231 # compilers into the same place where nix expects them.
231 # compilers into the same place where nix expects them.
232+ # We mark these compilers as boot compilers to make sure they are only used
233+ # where a boot compiler is expected.
234+ compiler = builtins.mapAttrs (_: v: v // { isHaskellNixBootCompiler = true; })
232− compiler = import ../compiler/old-ghc-nix { pkgs = self; };
235+ (import ../compiler/old-ghc-nix { pkgs = self; });
234 packages = {
237 packages = {
235 # cabal has it's own bootstrap script which we'll use.
238 # cabal has it's own bootstrap script which we'll use.
@@ -246,7 +249,8 @@ self: super: {
246 # disable hpack support during bootstrap
249 # disable hpack support during bootstrap
247 hpack = null;
250 hpack = null;
248 nix-tools = nix-tools.override {
251 nix-tools = nix-tools.override {
249− inherit ghc;
252+ # Only a boot compiler is suitable here
253+ ghc = ghc // { isHaskellNixCompiler = ghc.isHaskellNixBootCompiler; };
250 inherit (bootstrap.packages) hpack;
254 inherit (bootstrap.packages) hpack;
@@ -256,7 +260,8 @@ self: super: {
256 # need to use the boot strap compiler as we need them
260 # need to use the boot strap compiler as we need them
257 # to build ghcs from source.
261 # to build ghcs from source.
258 alex-project = hackage-project {
262 alex-project = hackage-project {
259− inherit ghc;
263+ # Only a boot compiler is suitable here
264+ ghc = ghc // { isHaskellNixCompiler = ghc.isHaskellNixBootCompiler; };
260 inherit (bootstrap.packages) cabal-install nix-tools hpack;
265 inherit (bootstrap.packages) cabal-install nix-tools hpack;
261 name = "alex"; version = "3.2.4";
266 name = "alex"; version = "3.2.4";
262 index-state = "2019-10-20T00:00:00Z";
267 index-state = "2019-10-20T00:00:00Z";
@@ -264,7 +269,8 @@ self: super: {
265 alex = bootstrap.packages.alex-project.alex.components.exes.alex;
270 alex = bootstrap.packages.alex-project.alex.components.exes.alex;
266 happy-project = hackage-project {
271 happy-project = hackage-project {
267− inherit ghc;
272+ # Only a boot compiler is suitable here
273+ ghc = ghc // { isHaskellNixCompiler = ghc.isHaskellNixBootCompiler; };
268 inherit (bootstrap.packages) cabal-install nix-tools hpack;
274 inherit (bootstrap.packages) cabal-install nix-tools hpack;
269 name = "happy"; version = "1.19.11";
275 name = "happy"; version = "1.19.11";
270 index-state = "2019-10-20T00:00:00Z";
276 index-state = "2019-10-20T00:00:00Z";
@@ -272,7 +278,8 @@ self: super: {
273 happy = bootstrap.packages.happy-project.happy.components.exes.happy;
279 happy = bootstrap.packages.happy-project.happy.components.exes.happy;
274 hscolour-project = hackage-project {
280 hscolour-project = hackage-project {
275− inherit ghc;
281+ # Only a boot compiler is suitable here
282+ ghc = ghc // { isHaskellNixCompiler = ghc.isHaskellNixBootCompiler; };
276 inherit (bootstrap.packages) cabal-install nix-tools hpack;
283 inherit (bootstrap.packages) cabal-install nix-tools hpack;
277 name = "hscolour"; version = "1.24.4";
284 name = "hscolour"; version = "1.24.4";
278 index-state = "2019-10-20T00:00:00Z";
285 index-state = "2019-10-20T00:00:00Z";