@@ -3,27 +3,28 @@ that will impact users.
3
3
4
4
## Sep 16, 2024
5
5
6
- Haskell.nix now uses the more granular Unit IDs from the plan.json
6
+ Cabal projects now use the more granular Unit IDs from plan.json
7
7
to identify packages. This allows for different versions of a
8
- package to be used when building ` built-tool-depend ` and setup
8
+ package to be used when building ` built-tool-depends ` and setup
9
9
dependencies.
10
10
11
11
Overrides in the ` modules ` argument apply to all versions of
12
12
the package. However to make this work we needed to make
13
- each ` packages.somepackage ` an option (instead of using the
14
- ` attrsOf ` option try ).
13
+ each ` packages.somepackage ` an option (instead of using an
14
+ ` attrsOf ` the submodule type ).
15
15
16
16
It is now an error to override a package that is not in the
17
- plan. This can be a problem if you use the same overrides
18
- for multiple plans (different GHC versions, target platforms,
19
- or cabal flag settings). If the package does not exist in
20
- some of the variants you use ` package-keys ` to tell include
21
- the option anyway:
17
+ plan. This can be a problem if different GHC versions, target
18
+ platforms, or cabal flag settings cause the package to be
19
+ excluded from the plan. Adding ` package-keys ` can tell
20
+ haskell.nix to include the option anyway:
22
21
23
22
```
24
23
modules = [{
25
24
# Tell haskell.nix that `somepackage` may exist.
26
25
package-keys = ["somepackage"];
26
+ # Now the following will not cause an error even
27
+ # if `somepackage` is not in the plan
27
28
packages.somepackage.flags.someflag = true;
28
29
}];
29
30
```
@@ -37,10 +38,10 @@ for all of the `builtins.attrNames` of `packages`:
37
38
})];
38
39
```
39
40
40
- Do not use the modules ` pkgs ` arg to look ` addPackageKeys ` up
41
+ Do not use the module's ` pkgs ` arg to look ` addPackageKeys ` up
41
42
though or it will result an ` infinite recursion ` error.
42
43
43
- Code that uses ` options.packages ` will also need to be update .
44
+ Code that uses ` options.packages ` will also need to be updated .
44
45
For instance the following code that uses ` options.packages `
45
46
to set ` --Werror ` for local packages:
46
47
0 commit comments