haskell-language-server/configuration-ghc-92.nix
Matthieu Coudron 100b53a474
build(nix): ghc922 -> ghc923 (#3049)
* build(nix): ghc922 -> ghc923

bumped nixpkgs and add support for ghc923 (replacing ghc922)

* fixes

* fixing for ghc90?

Co-authored-by: mergify[bot] <37929162+mergify[bot]@users.noreply.github.com>
Co-authored-by: Michael Peyton Jones <me@michaelpj.com>
2022-07-20 16:59:54 +00:00

43 lines
1.4 KiB
Nix

{ 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;
}