@@ -54,7 +54,15 @@ let
5454 + "For example use `compiler-nix-name = \"ghc865\";` for ghc 8.6.5") ghc
5555 else
5656 if compiler-nix-name != null
57− then pkgs.buildPackages.haskell-nix.compiler."${compiler-nix-name}"
57+ # Do note that `pkgs = final.buildPackages` in the `overlays/haskell.nix`
58+ # call to this file. And thus `pkgs` here is the proper `buildPackages`
59+ # set and we do not need, nor should pick the compiler from another level
60+ # of `buildPackages`, lest we want to get confusing errors about the Win32
61+ # package.
62+ #
63+ # > The option `packages.Win32.package.identifier.name' is used but not defined.
64+ #
65+ then pkgs.haskell-nix.compiler."${compiler-nix-name}"
5866 else defaults.ghc;
5967
6068in
@@ -278,7 +286,7 @@ let
278286 > $out/ghc-pkg/dump-global
279287 '');
280288
281− # Dummy `ghc` that uses the captured output
289+ # Dummy `ghc` that uses the captured output
282290 dummy-ghc = pkgs.evalPackages.writeTextFile {
283291 name = "dummy-" + ghc.name;
284292 executable = true;
@@ -313,7 +321,7 @@ let
313321 '';
314322 };
315323
316− # Dummy `ghc-pkg` that uses the captured output
324+ # Dummy `ghc-pkg` that uses the captured output
317325 dummy-ghc-pkg = pkgs.evalPackages.writeTextFile {
318326 name = "dummy-pkg-" + ghc.name;
319327 executable = true;