diff --git a/configuration-ghc-94.nix b/configuration-ghc-94.nix new file mode 100644 index 00000000000..3790e182a77 --- /dev/null +++ b/configuration-ghc-94.nix @@ -0,0 +1,42 @@ +{ pkgs, inputs }: + +let + disabledPlugins = [ + "hls-hlint-plugin" + # That one is not technically a plugin, but by putting it in this list, we + # get it removed from the top level list of requirement and it is not pull + # in the nix shell. + "shake-bench" + ]; + + hpkgsOverride = hself: hsuper: + with pkgs.haskell.lib; + { + hlsDisabledPlugins = disabledPlugins; + # YOLO + mkDerivation = args: + hsuper.mkDerivation (args // { + jailbreak = true; + doCheck = false; + }); + } // (builtins.mapAttrs (_: drv: disableLibraryProfiling drv) { + # ptr-poker breaks on MacOS without SSE2 optimizations + # https://github.com/nikita-volkov/ptr-poker/issues/11 + ptr-poker = hself.callCabal2nix "ptr-poker" inputs.ptr-poker { }; + + ghc-exactprint = + hself.callCabal2nix "ghc-exactprint" inputs.ghc-exactprint-150 { }; + # Hlint is still broken + hlint = doJailbreak (hself.callCabal2nix "hlint" inputs.hlint { }); + + stylish-haskell = appendConfigureFlag hsuper.stylish-haskell "-fghc-lib"; + + # Re-generate HLS drv excluding some plugins + haskell-language-server = + hself.callCabal2nixWithOptions "haskell-language-server" ./. + (pkgs.lib.concatStringsSep " " [ "-fpedantic" "-f-hlint" ]) { }; + }); +in { + inherit disabledPlugins; + tweakHpkgs = hpkgs: hpkgs.extend hpkgsOverride; +} diff --git a/flake.nix b/flake.nix index 47dcc627986..5257bda8f89 100644 --- a/flake.nix +++ b/flake.nix @@ -215,6 +215,7 @@ ghc902Config = (import ./configuration-ghc-90.nix) { inherit pkgs inputs; }; ghc924Config = (import ./configuration-ghc-92.nix) { inherit pkgs inputs; }; + ghc941Config = (import ./configuration-ghc-94.nix) { inherit pkgs inputs; }; # GHC versions # While HLS still works fine with 8.10 GHCs, we only support the versions that are cached @@ -224,11 +225,13 @@ cases = { ghc902 = ghc902Config.tweakHpkgs (pkgs.hlsHpkgs "ghc902"); ghc924 = ghc924Config.tweakHpkgs (pkgs.hlsHpkgs "ghc924"); + ghc941 = ghc941Config.tweakHpkgs (pkgs.hlsHpkgs "ghc941"); }; in { default = cases."${ghcVersion}"; } // cases; ghc902 = supportedGHCs.ghc902; ghc924 = supportedGHCs.ghc924; + ghc941 = supportedGHCs.ghc941; ghcDefault = supportedGHCs.default; # For markdown support @@ -361,6 +364,7 @@ haskell-language-server-dev = mkDevShell ghcDefault "cabal.project"; haskell-language-server-902-dev = mkDevShell ghc902 "cabal.project"; haskell-language-server-924-dev = mkDevShell ghc924 "cabal.project"; + haskell-language-server-941-dev = mkDevShell ghc941 "cabal.project"; }; # Developement shell, haskell packages are also provided by nix @@ -368,12 +372,14 @@ haskell-language-server-dev-nix = mkDevShellWithNixDeps ghcDefault "cabal.project"; haskell-language-server-902-dev-nix = mkDevShellWithNixDeps ghc902 "cabal.project"; haskell-language-server-924-dev-nix = mkDevShellWithNixDeps ghc924 "cabal.project"; + haskell-language-server-941-dev-nix = mkDevShellWithNixDeps ghc941 "cabal.project"; }; allPackages = { haskell-language-server = mkExe ghcDefault; haskell-language-server-902 = mkExe ghc902; haskell-language-server-924 = mkExe ghc924; + haskell-language-server-941 = mkExe ghc941; }; devShells = simpleDevShells // nixDevShells // {