Skip to content

Commit

Permalink
fix default ghc version selection
Browse files Browse the repository at this point in the history
  • Loading branch information
Providence Salumu authored and Providence Salumu committed Jun 3, 2023
1 parent cb94942 commit e73a821
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions flake.nix
Original file line number Diff line number Diff line change
Expand Up @@ -196,14 +196,14 @@
# While HLS still works fine with 8.10 GHCs, we only support the versions that are cached
# by upstream nixpkgs, which now only includes GHC version 9+
supportedGHCs = let
ghcVersion = "ghc" + (pkgs.lib.replaceStrings ["."] [""] pkgs.haskellPackages.ghc.version);
ghcVersion = "ghc" + (builtins.concatStringsSep "" (pkgs.lib.lists.init (builtins.splitVersion pkgs.haskellPackages.ghc.version)));
cases = {
ghc90 = ghc90Config.tweakHpkgs (pkgs.hlsHpkgs "ghc90");
ghc92 = ghc92Config.tweakHpkgs (pkgs.hlsHpkgs "ghc92");
ghc94 = ghc94Config.tweakHpkgs (pkgs.hlsHpkgs "ghc94");
ghc96 = ghc96Config.tweakHpkgs (pkgs.hlsHpkgs "ghc96");
};
in { default = cases."${ghcVersion}"; } // cases;
in { default = cases."${ghcVersion}"; } // cases;

ghc90 = supportedGHCs.ghc90;
ghc92 = supportedGHCs.ghc92;
Expand Down

0 comments on commit e73a821

Please sign in to comment.