File tree Expand file tree Collapse file tree 4 files changed +13
-14
lines changed Expand file tree Collapse file tree 4 files changed +13
-14
lines changed Original file line number Diff line number Diff line change @@ -26,6 +26,11 @@ in rec {
2626 } // pkgs . lib . optionalAttrs ( ghcFromTo "9.13" "9.14" ) {
2727 cabalProjectLocal = builtins . readFile ./test/cabal.project.local ;
2828 } ) ;
29+ } // pkgs . lib . optionalAttrs ( __compareVersions haskell . compiler . ${ compiler-nix-name } . version "9.4" >= 0 ) {
30+ # Make sure the plan for hadrian is cached (we need it to instanciate ghc).
31+ hadrian-plan = pkgs . haskell-nix . compiler . ${ compiler-nix-name } . hadrian . project . plan-nix ;
32+ # Also include the same plan evaluated on the eval system (probably x86_64-linux).
33+ hadrian-plan-eval = ( pkgs . haskell-nix . compiler . ${ compiler-nix-name } . override { hadrianEvalPackages = evalPackages ; } ) . hadrian . project . plan-nix ;
2934 } // pkgs . lib . optionalAttrs ( __compareVersions haskell . compiler . ${ compiler-nix-name } . version "9.8" < 0 ) {
3035 hlint-latest = tool compiler-nix-name "hlint" {
3136 inherit evalPackages ;
Original file line number Diff line number Diff line change @@ -85,6 +85,8 @@ let self =
8585
8686# extra values we want to have available as passthru values.
8787, extra-passthru ? { }
88+
89+ , hadrianEvalPackages ? buildPackages
8890} @args :
8991
9092assert ! ( enableIntegerSimple || enableNativeBignum ) -> gmp != null ;
262264 buildPackages . haskell-nix . tool compiler-nix-name "hadrian" {
263265 compilerSelection = p : p . haskell . compiler ;
264266 index-state = buildPackages . haskell-nix . internalHackageIndexState ;
267+ evalPackages = hadrianEvalPackages ;
265268 modules = [ {
266269 reinstallableLibGhc = false ;
267270 # Apply the patches in a way that does not require using something
370373 } ;
371374
372375in
373- stdenv . mkDerivation ( rec {
376+ haskell-nix . haskellLib . makeCompilerDeps ( stdenv . mkDerivation ( rec {
374377 version = ghc-version ;
375378 name = "${ targetPrefix } ghc-${ version } " + lib . optionalString ( useLLVM ) "-llvm" ;
376379
@@ -658,7 +661,7 @@ stdenv.mkDerivation (rec {
658661 '' ;
659662
660663 passthru = {
661- inherit bootPkgs targetPrefix libDir llvmPackages enableShared useLLVM ;
664+ inherit bootPkgs targetPrefix libDir llvmPackages enableShared useLLVM hadrian ;
662665
663666 # Our Cabal compiler name
664667 haskellCompilerName = "ghc-${ version } " ;
@@ -896,5 +899,5 @@ stdenv.mkDerivation (rec {
896899 cd ../../..
897900 runHook postInstall
898901 '' ;
899- } ) ;
902+ } ) ) ;
900903in self
Original file line number Diff line number Diff line change 11{ lib , runCommand } :
2- let
3- makeCompilerDeps = ghc : ghc // {
2+ ghc : ghc // {
43 cachedDeps = runCommand "${ ghc . name } -deps" { }
54 # First checks that ghc-pkg runs first with `--version` as failures in the `for` and
65 # `if` statements will be masked.
3433 fi
3534 done
3635 '' ;
37- } // lib . optionalAttrs ( ghc ? dwarf ) {
38- dwarf = makeCompilerDeps ghc . dwarf ;
39- } // lib . optionalAttrs ( ghc ? smallAddressSpace ) {
40- smallAddressSpace = makeCompilerDeps ghc . smallAddressSpace ;
41- } ;
42- in makeCompilerDeps
36+ }
Original file line number Diff line number Diff line change 11final : prev : {
2- haskell-nix = prev . haskell-nix // {
3- compiler = __mapAttrs ( _ : ghc : final . haskell-nix . haskellLib . makeCompilerDeps ghc ) prev . haskell-nix . compiler ;
4- } ;
52 haskell = prev . haskell // {
63 compiler = __mapAttrs ( name : ghc : final . haskell-nix . haskellLib . makeCompilerDeps ghc // {
74 inherit ( final . haskell-nix . compiler . ${ name } ) raw-src configured-src ;
You can’t perform that action at this time.
0 commit comments