Skip to content

Commit 22026fd

Browse files
committed
Merge remote-tracking branch 'origin/master' into hkm/embed-file
2 parents 58fa076 + 688c116 commit 22026fd

File tree

477 files changed

+12902
-13176
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

477 files changed

+12902
-13176
lines changed

Diff for: builder/make-config-files.nix

+1-1
Original file line numberDiff line numberDiff line change
@@ -160,7 +160,7 @@ let
160160
fi
161161
''}
162162
done
163-
for p in ${lib.concatStringsSep " " (lib.remove "ghc" nonReinstallablePkgs')}; do
163+
for p in ${lib.concatStringsSep " " nonReinstallablePkgs'}; do
164164
if [ -e $ghcDeps/envDeps/$p ]; then
165165
cat $ghcDeps/envDeps/$p >> $configFiles/ghc-environment
166166
fi

Diff for: changelog.md

+41
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,47 @@
11
This file contains a summary of changes to Haskell.nix and `nix-tools`
22
that will impact users.
33

4+
## Jun 5, 2024
5+
6+
Haskell.nix now respects the `pre-existing` packages selected
7+
by the cabal planner. The selection made by the planner
8+
is used to set `nonReinstallablePkgs`.
9+
10+
Instead setting `nonReinstallablePkgs` and `reinstallableLibGhc`
11+
haskell.nix projects should add `constraints` to the cabal project.
12+
13+
For instance to force the use of the `pre-exising` `text`
14+
package add:
15+
16+
```
17+
constraints: text installed
18+
```
19+
20+
To make sure `text` is reinstalled use:
21+
22+
```
23+
constraints: text source
24+
```
25+
26+
The `pre-existing` `ghc` will now be used by default as
27+
that is what `cabal` will choose (haskell.nix used to choose
28+
`reinstallableLibGhc=true` by default).
29+
30+
To allow cabal to choose reinstalling `ghc` add:
31+
32+
```
33+
allow-boot-library-installs: True
34+
```
35+
36+
To force cabal to choose reinstalling:
37+
38+
```
39+
constraints: ghc source
40+
allow-boot-library-installs: True
41+
```
42+
43+
It may also need `allow-newer: ghc:Cabal`
44+
445
## Mar 27, 2023
546

647
Haskell.nix will no longer parse the `cabal.project` file to

Diff for: compiler/ghc/default.nix

+6
Original file line numberDiff line numberDiff line change
@@ -260,10 +260,16 @@ let
260260
materialized =
261261
if builtins.compareVersions ghc-version "9.4" < 0
262262
then ../../materialized/${compiler-nix-name}/hadrian-ghc92
263+
else if builtins.compareVersions ghc-version "9.4.8" < 0
264+
then ../../materialized/${compiler-nix-name}/hadrian-ghc947
263265
else if builtins.compareVersions ghc-version "9.6" < 0
264266
then ../../materialized/${compiler-nix-name}/hadrian-ghc94
267+
else if builtins.compareVersions ghc-version "9.6.5" < 0
268+
then ../../materialized/${compiler-nix-name}/hadrian-ghc964
265269
else if builtins.compareVersions ghc-version "9.8" < 0
266270
then ../../materialized/${compiler-nix-name}/hadrian-ghc96
271+
else if builtins.compareVersions ghc-version "9.8.2" < 0
272+
then ../../materialized/${compiler-nix-name}/hadrian-ghc981
267273
else if builtins.compareVersions ghc-version "9.9" < 0
268274
then ../../materialized/${compiler-nix-name}/hadrian-ghc98
269275
else ../../materialized/${compiler-nix-name}/hadrian-ghc99;

Diff for: flake.lock

+9-9
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

Diff for: lib/call-cabal-project-to-nix.nix

+18-15
Original file line numberDiff line numberDiff line change
@@ -363,46 +363,49 @@ let
363363

364364
ghc-pkgs = [
365365
"Cabal"
366-
"Cabal-syntax"
367366
"array"
368367
"base"
369368
"binary"
370369
"bytestring"
371370
"containers"
372371
"deepseq"
373372
"directory"
374-
"exceptions"
375373
"filepath"
376-
"ghc"
377-
"ghc-bignum"
378374
"ghc-boot"
379375
"ghc-boot-th"
380376
"ghc-compact"
381-
"ghc-experimental"
382377
"ghc-heap"
383-
"ghc-internal"
384-
"ghc-platform"
385378
"ghc-prim"
386-
"ghc-toolchain"
387379
"ghci"
388-
"haskeline"
389-
"hpc"
390380
"integer-gmp"
391-
"libiserv"
392381
"mtl"
393-
"os-string"
394382
"parsec"
395383
"pretty"
396384
"process"
397385
"rts"
398-
"semaphore-compat"
399-
"stm"
400386
"template-haskell"
401-
"terminfo"
402387
"text"
403388
"time"
404389
"transformers"
390+
] ++ pkgs.lib.optionals (!pkgs.stdenv.targetPlatform.isGhcjs || builtins.compareVersions ghc.version "9.0" > 0) [
391+
# GHCJS 8.10 does not have these
392+
"Cabal-syntax"
393+
"exceptions"
394+
"ghc"
395+
"ghc-bignum"
396+
"ghc-experimental"
397+
"ghc-internal"
398+
"ghc-platform"
399+
"ghc-toolchain"
400+
"haskeline"
401+
"hpc"
402+
"libiserv"
403+
"os-string"
404+
"semaphore-compat"
405+
"stm"
405406
"xhtml"
407+
] ++ pkgs.lib.optionals (!pkgs.stdenv.targetPlatform.isGhcjs) [
408+
"terminfo"
406409
] ++ (if pkgs.stdenv.targetPlatform.isWindows
407410
then [ "Win32" ]
408411
else [ "unix" ]

Diff for: lib/default.nix

+13-1
Original file line numberDiff line numberDiff line change
@@ -340,7 +340,19 @@ in {
340340

341341
# Converts from a `compoent.depends` value to a library derivation.
342342
# In the case of sublibs the `depends` value should already be the derivation.
343-
dependToLib = d: d.components.library or d;
343+
dependToLib = d:
344+
# Do simplify this to `d.components.library or d`, as that
345+
# will not give a good error message if the `.library`
346+
# is missing (happens if the package is unplanned,
347+
# but has overrides).
348+
# It would be nice to put an `assert` here, but there is
349+
# currently no good way to get the name of the dependency
350+
# when it is not in the plan. The attribute path of
351+
# `d` in the `nix` error should include the name
352+
# eg. `packages.Cabal.components.library`.
353+
if d ? components
354+
then d.components.library
355+
else d;
344356

345357
projectOverlays = import ./project-overlays.nix {
346358
inherit lib haskellLib;

Diff for: lib/pkgconf-nixpkgs-map.nix

+1-1
Original file line numberDiff line numberDiff line change
@@ -2167,7 +2167,7 @@ pkgs:
21672167
"gdkmm-3.0" = [ "gtkmm3" ];
21682168
"gtkmm-3.0" = [ "gtkmm3" ];
21692169
"gtkmm-4.0" = [ "gtkmm4" ];
2170-
"libgtkpod-1.1.0" = [ "gtkpod" ];
2170+
# "libgtkpod-1.1.0" = [ "gtkpod" ];
21712171
# "gtksourceview-3.0" = [ "gtksourceview" ];
21722172
"gtksourceview-3.0" = [ "gtksourceview3" ];
21732173
"gtksourceview-4" = [ "gtksourceview4" ];

Diff for: materialized/alex-3.2.7.1/default.nix

+16
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

Diff for: materialized/ghc-boot-packages-nix/ghc8107-ghcjs/Win32.nix

+5-5
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

Diff for: materialized/ghc-boot-packages-nix/ghc8107-ghcjs/base.nix

+6-6
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

Diff for: materialized/ghc-boot-packages-nix/ghc8107-ghcjs/bytestring.nix

+4-4
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

Diff for: materialized/ghc-boot-packages-nix/ghc8107-ghcjs/ghc-boot.nix

+39
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

Diff for: materialized/ghc-boot-packages-nix/ghc8107-ghcjs/ghc-heap.nix

+4-4
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

0 commit comments

Comments
 (0)