@@ -141,48 +141,48 @@ in rec {
141
141
ghc-boot-packages-src-and-nix = builtins . mapAttrs
142
142
( ghcName : ghc : builtins . mapAttrs
143
143
( pkgName : subDir : rec {
144
- src =
145
- # TODO remove once nix >=2.4 is widely adopted (will trigger rebuilds of everything).
146
- # See https://github.com/input-output-hk/haskell.nix/issues/1459
147
- let nix24srcFix = src : src // { filterPath = { path , ... } : path ; } ;
148
- # Add in the generated files needed by ghc-boot
149
- in if subDir == "libraries/ghc-boot"
150
- then nix24srcFix ( final . buildPackages . runCommand "ghc-boot-src" { nativeBuildInputs = [ final . buildPackages . xorg . lndir ] ; } ''
151
- mkdir $out
152
- lndir -silent ${ ghc . passthru . configured-src } /${ subDir } $out
153
- lndir -silent ${ ghc . generated } /libraries/ghc-boot/dist-install/build/GHC $out/GHC
154
- '' )
155
- else if subDir == "compiler"
156
- then final . haskell-nix . haskellLib . cleanSourceWith {
157
- src = nix24srcFix ( final . buildPackages . runCommand "ghc-src" { nativeBuildInputs = [ final . buildPackages . xorg . lndir ] ; } ''
158
- mkdir $out
159
- lndir -silent ${ ghc . passthru . configured-src } $out
160
- if [[ -f ${ ghc . generated } /libraries/ghc-boot/dist-install/build/GHC/Version.hs ]]; then
161
- ln -s ${ ghc . generated } /libraries/ghc-boot/dist-install/build/GHC/Version.hs $out/libraries/ghc-boot/GHC
162
- fi
163
- if [[ -f ${ ghc . generated } /libraries/ghc-boot/dist-install/build/GHC/Platform/Host.hs ]]; then
164
- ln -s ${ ghc . generated } /libraries/ghc-boot/dist-install/build/GHC/Platform/Host.hs $out/libraries/ghc-boot/GHC/Platform
165
- fi
166
- if [[ -f ${ ghc . generated } /compiler/stage2/build/Config.hs ]]; then
167
- ln -s ${ ghc . generated } /compiler/stage2/build/Config.hs $out/compiler
168
- fi
169
- if [[ -f ${ ghc . generated } /compiler/stage2/build/GHC/Platform/Constants.hs ]]; then
170
- ln -s ${ ghc . generated } /compiler/stage2/build/GHC/Platform/Constants.hs $out/compiler/GHC/Platform
171
- fi
172
- if [[ -f ${ ghc . generated } /compiler/stage2/build/GHC/Settings/Config.hs ]]; then
173
- ln -s ${ ghc . generated } /compiler/stage2/build/GHC/Settings/Config.hs $out/compiler/GHC/Settings
174
- fi
175
- if [[ -f ${ ghc . generated } /compiler/GHC/CmmToLlvm/Version/Bounds.hs ]]; then
176
- ln -s ${ ghc . generated } /compiler/GHC/CmmToLlvm/Version/Bounds.hs $out/compiler/GHC/CmmToLlvm/Version
177
- fi
178
- ln -s ${ ghc . generated } /includes/dist-derivedconstants/header/* $out/compiler
179
- ln -s ${ ghc . generated } /compiler/stage2/build/*.hs-incl $out/compiler
180
- '' ) ;
181
- inherit subDir ;
182
- includeSiblings = true ;
183
- }
184
- else "${ ghc . passthru . configured-src } /${ subDir } " ;
185
- nix = callCabal2Nix ghcName "${ ghcName } -${ pkgName } " src ;
144
+ src = null ;
145
+ # # TODO remove once nix >=2.4 is widely adopted (will trigger rebuilds of everything).
146
+ # # See https://github.com/input-output-hk/haskell.nix/issues/1459
147
+ # let nix24srcFix = src: src // { filterPath = { path, ... }: path; };
148
+ # # Add in the generated files needed by ghc-boot
149
+ # in if subDir == "libraries/ghc-boot"
150
+ # then nix24srcFix (final.buildPackages.runCommand "ghc-boot-src" { nativeBuildInputs = [final.buildPackages.xorg.lndir]; } ''
151
+ # mkdir $out
152
+ # lndir -silent ${ghc.passthru.configured-src}/${subDir} $out
153
+ # lndir -silent ${ghc.generated}/libraries/ghc-boot/dist-install/build/GHC $out/GHC
154
+ # '')
155
+ # else if subDir == "compiler"
156
+ # then final.haskell-nix.haskellLib.cleanSourceWith {
157
+ # src = nix24srcFix (final.buildPackages.runCommand "ghc-src" { nativeBuildInputs = [final.buildPackages.xorg.lndir]; } ''
158
+ # mkdir $out
159
+ # lndir -silent ${ghc.passthru.configured-src} $out
160
+ # if [[ -f ${ghc.generated}/libraries/ghc-boot/dist-install/build/GHC/Version.hs ]]; then
161
+ # ln -s ${ghc.generated}/libraries/ghc-boot/dist-install/build/GHC/Version.hs $out/libraries/ghc-boot/GHC
162
+ # fi
163
+ # if [[ -f ${ghc.generated}/libraries/ghc-boot/dist-install/build/GHC/Platform/Host.hs ]]; then
164
+ # ln -s ${ghc.generated}/libraries/ghc-boot/dist-install/build/GHC/Platform/Host.hs $out/libraries/ghc-boot/GHC/Platform
165
+ # fi
166
+ # if [[ -f ${ghc.generated}/compiler/stage2/build/Config.hs ]]; then
167
+ # ln -s ${ghc.generated}/compiler/stage2/build/Config.hs $out/compiler
168
+ # fi
169
+ # if [[ -f ${ghc.generated}/compiler/stage2/build/GHC/Platform/Constants.hs ]]; then
170
+ # ln -s ${ghc.generated}/compiler/stage2/build/GHC/Platform/Constants.hs $out/compiler/GHC/Platform
171
+ # fi
172
+ # if [[ -f ${ghc.generated}/compiler/stage2/build/GHC/Settings/Config.hs ]]; then
173
+ # ln -s ${ghc.generated}/compiler/stage2/build/GHC/Settings/Config.hs $out/compiler/GHC/Settings
174
+ # fi
175
+ # if [[ -f ${ghc.generated}/compiler/GHC/CmmToLlvm/Version/Bounds.hs ]]; then
176
+ # ln -s ${ghc.generated}/compiler/GHC/CmmToLlvm/Version/Bounds.hs $out/compiler/GHC/CmmToLlvm/Version
177
+ # fi
178
+ # ln -s ${ghc.generated}/includes/dist-derivedconstants/header/* $out/compiler
179
+ # ln -s ${ghc.generated}/compiler/stage2/build/*.hs-incl $out/compiler
180
+ # '');
181
+ # inherit subDir;
182
+ # includeSiblings = true;
183
+ # }
184
+ # else "${ghc.passthru.configured-src}/${subDir}";
185
+ nix = null ; # callCabal2Nix ghcName "${ghcName}-${pkgName}" src;
186
186
} ) ( ghc-extra-pkgs ghc . version ) )
187
187
final . buildPackages . haskell-nix . compiler ;
188
188
@@ -195,6 +195,121 @@ in rec {
195
195
( combineAndMaterialize true ../materialized )
196
196
ghc-boot-packages-src-and-nix ;
197
197
198
+ corePackagesMap = {
199
+ "base" = _ : {
200
+ package = {
201
+ identifier = {
202
+ name = "base" ;
203
+ version = "4.19.1.0" ;
204
+ } ;
205
+ } ;
206
+ } ;
207
+ # "bytestring" = _: {
208
+ # package = {
209
+ # identifier = {
210
+ # name = "bytestring";
211
+ # version = "0.12.1.0";
212
+ # };
213
+ # };
214
+ # };
215
+ # "deepseq" = _: {
216
+ # package = {
217
+ # identifier = {
218
+ # name = "deepseq";
219
+ # version = "1.5.0.0";
220
+ # };
221
+ # };
222
+ # };
223
+ # "ghc" = _: {
224
+ # package = {
225
+ # identifier = {
226
+ # name = "ghc";
227
+ # version = "9.8.2";
228
+ # };
229
+ # };
230
+ # };
231
+ "ghc-bignum" = _ : {
232
+ package = {
233
+ identifier = {
234
+ name = "ghc-bignum" ;
235
+ version = "1.3" ;
236
+ } ;
237
+ } ;
238
+ } ;
239
+ "ghc-boot" = _ : {
240
+ package = {
241
+ identifier = {
242
+ name = "ghc-boot" ;
243
+ version = "9.8.2" ;
244
+ } ;
245
+ } ;
246
+ } ;
247
+ "ghc-heap" = _ : {
248
+ package = {
249
+ identifier = {
250
+ name = "ghc-heap" ;
251
+ version = "9.8.2" ;
252
+ } ;
253
+ } ;
254
+ } ;
255
+ "ghc-prim" = _ : {
256
+ package = {
257
+ identifier = {
258
+ name = "ghc-prim" ;
259
+ version = "9.8.2" ;
260
+ } ;
261
+ } ;
262
+ } ;
263
+ "ghci" = _ : {
264
+ package = {
265
+ identifier = {
266
+ name = "ghci" ;
267
+ version = "9.8.2" ;
268
+ } ;
269
+ } ;
270
+ } ;
271
+ "hpc" = _ : {
272
+ package = {
273
+ identifier = {
274
+ name = "hpc" ;
275
+ version = "0.7.0.0" ;
276
+ } ;
277
+ } ;
278
+ } ;
279
+ "integer-gmp" = _ : {
280
+ package = {
281
+ identifier = {
282
+ name = "integer-gmp" ;
283
+ version = "1.1" ;
284
+ } ;
285
+ } ;
286
+ } ;
287
+ # "parsec" = _: {
288
+ # package = {
289
+ # identifier = {
290
+ # name = "parsec";
291
+ # version = "3.1.17.0";
292
+ # };
293
+ # };
294
+ # };
295
+ # "pretty" = _: {
296
+ # package = {
297
+ # identifier = {
298
+ # name = "pretty";
299
+ # version = "1.1.3.6";
300
+ # };
301
+ # };
302
+ # };
303
+ # "template-haskell" = _: {
304
+ # package = {
305
+ # identifier = {
306
+ # name = "template-haskell";
307
+ # version = "2.21.0.0";
308
+ # };
309
+ # };
310
+ # };
311
+ } ;
312
+
198
313
# The import nix results for each ghc boot package for each ghc.
199
314
ghc-boot-packages = builtins . mapAttrs
200
315
( ghcName : value : builtins . mapAttrs
@@ -205,11 +320,12 @@ in rec {
205
320
ghc-boot-packages-src-and-nix ;
206
321
207
322
ghc-boot-packages-unchecked = builtins . mapAttrs
208
- ( ghcName : value : builtins . mapAttrs
209
- ( pkgName : srcAndNix : importSrcAndNix {
210
- inherit ( srcAndNix ) src ;
211
- nix = final . ghc-boot-packages-nix-unchecked . ${ ghcName } + "/${ pkgName } .nix" ;
212
- } ) value )
323
+ ( ghcName : value : { } )
324
+ # (ghcName: value: builtins.mapAttrs (_: _ : {}) value)
325
+ # (pkgName: srcAndNix: importSrcAndNix {
326
+ # inherit (srcAndNix) src;
327
+ # nix = final.ghc-boot-packages-nix-unchecked.${ghcName} + "/${pkgName}.nix";
328
+ # }) value)
213
329
ghc-boot-packages-src-and-nix ;
214
330
215
331
# Derivation with cabal.project for use with `cabalProject'` for each ghc.
0 commit comments