Skip to content

Commit 46c9a8c

Browse files
committed
Fix hadrianEvalPackages
1 parent 8ebca17 commit 46c9a8c

File tree

2 files changed

+5
-3
lines changed

2 files changed

+5
-3
lines changed

ci.nix

+2-2
Original file line numberDiff line numberDiff line change
@@ -122,7 +122,7 @@ dimension "Nixpkgs version" nixpkgsVersions (nixpkgsName: pinnedNixpkgsSrc:
122122
# TODO: can we merge this into the general case by picking an appropriate "cross system" to mean native?
123123
native = pkgs.recurseIntoAttrs ({
124124
roots = pkgs.haskell-nix.roots' compiler-nix-name ifdLevel;
125-
ghc = pkgs.buildPackages.haskell-nix.compiler.${compiler-nix-name};
125+
ghc = pkgs.buildPackages.haskell-nix.compiler.${compiler-nix-name}.override { hadrianEvalPackages = evalPackages; };
126126
} // pkgs.lib.optionalAttrs runTests {
127127
inherit (build) tests tools maintainer-scripts maintainer-script-cache;
128128
} // pkgs.lib.optionalAttrs (ifdLevel >= 3) rec {
@@ -143,7 +143,7 @@ dimension "Nixpkgs version" nixpkgsVersions (nixpkgsName: pinnedNixpkgsSrc:
143143
build = import ./build.nix { inherit pkgs evalPackages ifdLevel compiler-nix-name haskellNix; };
144144
in pkgs.recurseIntoAttrs (pkgs.lib.optionalAttrs (ifdLevel >= 1) ({
145145
roots = pkgs.haskell-nix.roots' compiler-nix-name ifdLevel;
146-
ghc = pkgs.buildPackages.haskell-nix.compiler.${compiler-nix-name};
146+
ghc = pkgs.buildPackages.haskell-nix.compiler.${compiler-nix-name}.override { hadrianEvalPackages = evalPackages; };
147147
# TODO: look into cross compiling ghc itself
148148
# ghc = pkgs.haskell-nix.compiler.${compiler-nix-name};
149149
# TODO: look into making tools work when cross compiling

compiler/ghc/default.nix

+3-1
Original file line numberDiff line numberDiff line change
@@ -101,7 +101,9 @@ let
101101
inherit (stdenv) buildPlatform hostPlatform targetPlatform;
102102
inherit (haskell-nix.haskellLib) isCrossTarget;
103103

104-
inherit (bootPkgs) ghc;
104+
ghc = if bootPkgs.ghc.isHaskellNixCompiler or false
105+
then bootPkgs.ghc.override { inherit hadrianEvalPackages; }
106+
else bootPkgs.ghc;
105107

106108
ghcHasNativeBignum = builtins.compareVersions ghc-version "9.0" >= 0;
107109
hadrianHasNativeBignumFlavour = builtins.compareVersions ghc-version "9.6" >= 0;

0 commit comments

Comments
 (0)