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 {
26
26
} // pkgs . lib . optionalAttrs ( ghcFromTo "9.13" "9.14" ) {
27
27
cabalProjectLocal = builtins . readFile ./test/cabal.project.local ;
28
28
} ) ;
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 ;
29
34
} // pkgs . lib . optionalAttrs ( __compareVersions haskell . compiler . ${ compiler-nix-name } . version "9.8" < 0 ) {
30
35
hlint-latest = tool compiler-nix-name "hlint" {
31
36
inherit evalPackages ;
Original file line number Diff line number Diff line change @@ -85,6 +85,8 @@ let self =
85
85
86
86
# extra values we want to have available as passthru values.
87
87
, extra-passthru ? { }
88
+
89
+ , hadrianEvalPackages ? buildPackages
88
90
} @args :
89
91
90
92
assert ! ( enableIntegerSimple || enableNativeBignum ) -> gmp != null ;
262
264
buildPackages . haskell-nix . tool compiler-nix-name "hadrian" {
263
265
compilerSelection = p : p . haskell . compiler ;
264
266
index-state = buildPackages . haskell-nix . internalHackageIndexState ;
267
+ evalPackages = hadrianEvalPackages ;
265
268
modules = [ {
266
269
reinstallableLibGhc = false ;
267
270
# Apply the patches in a way that does not require using something
370
373
} ;
371
374
372
375
in
373
- stdenv . mkDerivation ( rec {
376
+ haskell-nix . haskellLib . makeCompilerDeps ( stdenv . mkDerivation ( rec {
374
377
version = ghc-version ;
375
378
name = "${ targetPrefix } ghc-${ version } " + lib . optionalString ( useLLVM ) "-llvm" ;
376
379
@@ -658,7 +661,7 @@ stdenv.mkDerivation (rec {
658
661
'' ;
659
662
660
663
passthru = {
661
- inherit bootPkgs targetPrefix libDir llvmPackages enableShared useLLVM ;
664
+ inherit bootPkgs targetPrefix libDir llvmPackages enableShared useLLVM hadrian ;
662
665
663
666
# Our Cabal compiler name
664
667
haskellCompilerName = "ghc-${ version } " ;
@@ -896,5 +899,5 @@ stdenv.mkDerivation (rec {
896
899
cd ../../..
897
900
runHook postInstall
898
901
'' ;
899
- } ) ;
902
+ } ) ) ;
900
903
in self
Original file line number Diff line number Diff line change 1
1
{ lib , runCommand } :
2
- let
3
- makeCompilerDeps = ghc : ghc // {
2
+ ghc : ghc // {
4
3
cachedDeps = runCommand "${ ghc . name } -deps" { }
5
4
# First checks that ghc-pkg runs first with `--version` as failures in the `for` and
6
5
# `if` statements will be masked.
34
33
fi
35
34
done
36
35
'' ;
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 1
1
final : prev : {
2
- haskell-nix = prev . haskell-nix // {
3
- compiler = __mapAttrs ( _ : ghc : final . haskell-nix . haskellLib . makeCompilerDeps ghc ) prev . haskell-nix . compiler ;
4
- } ;
5
2
haskell = prev . haskell // {
6
3
compiler = __mapAttrs ( name : ghc : final . haskell-nix . haskellLib . makeCompilerDeps ghc // {
7
4
inherit ( final . haskell-nix . compiler . ${ name } ) raw-src configured-src ;
You can’t perform that action at this time.
0 commit comments