@@ -74,6 +74,7 @@ let self =
74
74
, ghc-commit-id ? null
75
75
, src-spec
76
76
, ghc-patches ? [ ]
77
+ , hadrian
77
78
78
79
# extra values we want to have available as passthru values.
79
80
, extra-passthru ? { }
236
237
# value for us.
237
238
installStage1 = useHadrian && ( haskell-nix . haskellLib . isCrossTarget || stdenv . targetPlatform . isMusl ) ;
238
239
239
- hadrian =
240
- let
241
- compiler-nix-name =
242
- if builtins . compareVersions ghc-version "9.4.7" < 0
243
- then "ghc928"
244
- else "ghc962" ;
245
- in
246
- buildPackages . pinned-haskell-nix . tool compiler-nix-name "hadrian" {
247
- compilerSelection = p : p . haskell . compiler ;
248
- index-state = buildPackages . haskell-nix . internalHackageIndexState ;
249
- # Verions of hadrian that comes with 9.6 depends on `time`
250
- materialized =
251
- if builtins . compareVersions ghc-version "9.4" < 0
252
- then ../../materialized/${ compiler-nix-name } /hadrian-ghc92
253
- else if builtins . compareVersions ghc-version "9.6" < 0
254
- then ../../materialized/${ compiler-nix-name } /hadrian-ghc94
255
- else if builtins . compareVersions ghc-version "9.8" < 0
256
- then ../../materialized/${ compiler-nix-name } /hadrian-ghc96
257
- else if builtins . compareVersions ghc-version "9.9" < 0
258
- then ../../materialized/${ compiler-nix-name } /hadrian-ghc98
259
- else ../../materialized/${ compiler-nix-name } /hadrian-ghc99 ;
260
- modules = [ {
261
- # Apply the patches in a way that does not require using something
262
- # like `srcOnly`. The problem with `pkgs.srcOnly` was that it had to run
263
- # on a platform at eval time.
264
- packages . hadrian . prePatch = ''
265
- cd ..
266
- '' ;
267
- packages . hadrian . patches = ghc-patches ;
268
- packages . hadrian . postPatch = ''
269
- cd hadrian
270
- '' ;
271
- } ] ;
272
- cabalProjectLocal = null ;
273
- cabalProjectFreeze = null ;
274
- src = haskell-nix . haskellLib . cleanSourceWith {
275
- src = {
276
- outPath = buildPackages . srcOnly {
277
- name = "hadrian" ;
278
- inherit src ;
279
- } ;
280
- filterPath = { path , ... } : path ;
281
- } ;
282
- subDir = "hadrian" ;
283
- includeSiblings = true ;
284
- } ;
285
- } ;
286
-
287
240
# For a discription of hadrian command line args
288
241
# see https://gitlab.haskell.org/ghc/ghc/blob/master/hadrian/README.md
289
242
# For build flavours and flavour transformers
0 commit comments