From d286ae810d70518bd0ef914947f3a6d258b8eab3 Mon Sep 17 00:00:00 2001 From: Pepe Iborra Date: Sun, 26 Jul 2020 15:35:50 +0100 Subject: [PATCH] avoid hard-coding the default compiler --- shell.nix | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/shell.nix b/shell.nix index 1888767ea2..819e7ff9d8 100644 --- a/shell.nix +++ b/shell.nix @@ -10,8 +10,9 @@ }: with nixpkgs; -let haskellPackagesForProject = p: - if compiler == "default" || compiler == "ghc883" +let defaultCompiler = "ghc" + lib.replaceStrings ["."] [""] haskellPackages.ghc.version; + haskellPackagesForProject = p: + if compiler == "default" || compiler == defaultCompiler then haskellPackages.ghcWithPackages p # for all other compilers there is no Nix cache so dont bother building deps with NIx else haskell.packages.${compiler}.ghcWithPackages [];