Skip to content

Commit 2db7bed

Browse files
authored
Use latest lts version for haskel-nix.haskellPackages (#2368)
Fixes #2355
1 parent 8ffd824 commit 2db7bed

File tree

1 file changed

+5
-4
lines changed

1 file changed

+5
-4
lines changed

overlays/haskell.nix

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -170,11 +170,12 @@ final: prev: {
170170
inherit mkPkgSet stackage excludeBootPackages;
171171
hackage = hackageForStack;
172172
};
173-
# Pick a recent LTS snapshot to be our "default" package set.
173+
# Pick the most recent LTS snapshot to be our "default" package set.
174174
haskellPackages =
175-
if final.stdenv.targetPlatform.isAarch64 && final.stdenv.buildPlatform.isAarch64
176-
then snapshots."lts-15.13"
177-
else snapshots."lts-14.13";
175+
let
176+
versions = final.lib.mapAttrsToList
177+
(name: _: final.lib.removePrefix "lts-" name) snapshots;
178+
in snapshots."lts-${final.lib.head (final.lib.sort final.lib.versionAtLeast versions)}";
178179

179180
# Creates Cabal local repository from { name, index } set.
180181
mkLocalHackageRepo = import ../mk-local-hackage-repo final;

0 commit comments

Comments
 (0)