Skip to content

Commit d286ae8

Browse files
committed
avoid hard-coding the default compiler
1 parent 2fe1447 commit d286ae8

File tree

1 file changed

+3
-2
lines changed

1 file changed

+3
-2
lines changed

shell.nix

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -10,8 +10,9 @@
1010
}:
1111
with nixpkgs;
1212

13-
let haskellPackagesForProject = p:
14-
if compiler == "default" || compiler == "ghc883"
13+
let defaultCompiler = "ghc" + lib.replaceStrings ["."] [""] haskellPackages.ghc.version;
14+
haskellPackagesForProject = p:
15+
if compiler == "default" || compiler == defaultCompiler
1516
then haskellPackages.ghcWithPackages p
1617
# for all other compilers there is no Nix cache so dont bother building deps with NIx
1718
else haskell.packages.${compiler}.ghcWithPackages [];

0 commit comments

Comments
 (0)