on 4e100b2 help sign in
haskell.nix/docs/dev/adding-new-ghc.md
34 lines 1.4 kB history raw
1# Adding a new GHC version to haskell.nix
3## Update `overlays/bootstrap.nix`
5Each ghc version is defined in this file. Duplicate one of the existing
6ghc version definitions and replace the version numbers. Make sure
7you update the `spec.sha256` or the other versions source will be used.
8Check the LLVM version that should be used in the
9[ghc wiki](https://gitlab.haskell.org/ghc/ghc/-/wikis/commentary/compiler/backends/llvm/installing).
11## Update the list of cached GHC versions in `ci.nix`
13## Update [supported ghc versions](../reference/supported-ghc-versions.md) document
15## Add the materialized files
17In the haskell.nix repo run:
19```
20mkdir materialized/ghc884
21nix-build scripts/check-compiler-materialization --argstr compiler-nix-name ghc884
22```
24The `nix-build` command will fail with something like:
26```
27Materialized nix used for dummy-data-x86_64-unknown-linux-musl-ghc-8.10.1 incorrect. To fix run: /nix/store/wnwpyrhv4nxgyljz3f20gdpspjxvm7h4-updateMaterialized
28```
30Run the `updateMaterialized` script and repeat the `nix-build` until it no longer fails.
31If the failure is not a problem with materialization and no `updateMaterialized` script
32is provided then you may need to fix the failure another way or (if it only relates to
33one of the cross compilers) modify `scripts/check-compiler-materialization/default.nix`
34so that it skips that compiler.