Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -116,7 +116,7 @@ Or [use Nix](https://nixos.org/nix/download.html) to get a shell with the `clash
nix develop .

# Start a dev shell with a specific GHC version
nix develop .#ghc961
nix develop .#ghc9101
```

You will need a modern version of nix with support for the new-style `nix`
Expand Down
4 changes: 2 additions & 2 deletions flake.nix
Original file line number Diff line number Diff line change
Expand Up @@ -36,12 +36,12 @@
# The versions of GHC that we want to be able to build / develop against
# within the nix environment. Since nix is lazy, only derivations for
# versions of GHC which are used are actually evaluated.
ghcVersions = [ "ghc96" "ghc98" "ghc910" ];
ghcVersions = [ "ghc964" "ghc982" "ghc9101" ];

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

# Overlays are not per-system, so let's only compute them once.
# For each version of GHC we produce a `pkgs.clashPackages-ghcVER`, e.g.
Expand Down
4 changes: 3 additions & 1 deletion nix/overlay.nix
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,9 @@ compilerVersion:
final: prev:
let
# An overlay with the things we need to change for the specified GHC version.
ghcOverlay = import (./. + "/overlay-${compilerVersion}.nix") {
# The overlays are named without the GHC minor version, so we need to strip the last character from the version
strippedMinorVersion = builtins.substring 0 (builtins.stringLength compilerVersion - 1) compilerVersion;
ghcOverlay = import (./. + "/overlay-${strippedMinorVersion}.nix") {
pkgs = prev;
};

Expand Down