Skip to content

Commit bced354

Browse files
authored
Merge pull request #2984 from jaschutte/flake-pin-minor-versions
Pin Nix GHC minor version
2 parents 229f243 + 762f7f0 commit bced354

File tree

3 files changed

+6
-4
lines changed

3 files changed

+6
-4
lines changed

README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -116,7 +116,7 @@ Or [use Nix](https://nixos.org/nix/download.html) to get a shell with the `clash
116116
nix develop .
117117

118118
# Start a dev shell with a specific GHC version
119-
nix develop .#ghc961
119+
nix develop .#ghc9101
120120
```
121121

122122
You will need a modern version of nix with support for the new-style `nix`

flake.nix

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -36,12 +36,12 @@
3636
# The versions of GHC that we want to be able to build / develop against
3737
# within the nix environment. Since nix is lazy, only derivations for
3838
# versions of GHC which are used are actually evaluated.
39-
ghcVersions = [ "ghc96" "ghc98" "ghc910" ];
39+
ghcVersions = [ "ghc964" "ghc982" "ghc9101" ];
4040

4141
# We pick a single version of GHC to use by default within nix. This is
4242
# probably cleaner than always having N copies of each package / app and
4343
# being forced to refer to them by their GHC version.
44-
defaultGhcVersion = "ghc910";
44+
defaultGhcVersion = "ghc9101";
4545

4646
# Overlays are not per-system, so let's only compute them once.
4747
# For each version of GHC we produce a `pkgs.clashPackages-ghcVER`, e.g.

nix/overlay.nix

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,9 @@ compilerVersion:
1515
final: prev:
1616
let
1717
# An overlay with the things we need to change for the specified GHC version.
18-
ghcOverlay = import (./. + "/overlay-${compilerVersion}.nix") {
18+
# The overlays are named without the GHC minor version, so we need to strip the last character from the version
19+
strippedMinorVersion = builtins.substring 0 (builtins.stringLength compilerVersion - 1) compilerVersion;
20+
ghcOverlay = import (./. + "/overlay-${strippedMinorVersion}.nix") {
1921
pkgs = prev;
2022
};
2123

0 commit comments

Comments
 (0)