haskellPackages.haskell-language-server: Fix build
In preparation of the upcoming 0.6.0 release I wanted to fix hls. It introduces two new plugin packages, which are not on hackage yet. I remove apply-refact overrides, because current apply-refact versions are compatible with all ghcs we support, according to their changelog. I override more of the hls dependencies globally on the whole package set, to avoid a lot of duplicate compilations. And because @peti changed my mind about this being a good practice. hls now uses a released version of ghcide
This commit is contained in:
committed by
Peter Simons
parent
becd5f5bc3
commit
bf29c147c3
@@ -1229,14 +1229,6 @@ self: super: {
|
||||
sha256 = "0xbfhzhzg94b4r5qy5dg1c40liswwpqarrc2chcwgfbfnrmwkfc2";
|
||||
});
|
||||
|
||||
# this will probably need to get updated with every ghcide update,
|
||||
# we need an override because ghcide is tracking haskell-lsp closely.
|
||||
ghcide = dontCheck (super.ghcide.overrideScope (self: super: {
|
||||
hie-bios = dontCheck super.hie-bios_0_7_1;
|
||||
lsp-test = dontCheck self.lsp-test_0_11_0_7;
|
||||
}));
|
||||
implicit-hie-cradle = super.implicit-hie-cradle.override { hie-bios = dontCheck super.hie-bios_0_7_1; };
|
||||
|
||||
# hasn‘t bumped upper bounds
|
||||
# upstream: https://github.com/obsidiansystems/which/pull/6
|
||||
which = doJailbreak super.which;
|
||||
@@ -1459,25 +1451,27 @@ self: super: {
|
||||
|
||||
# INSERT NEW OVERRIDES ABOVE THIS LINE
|
||||
} // (let
|
||||
inherit (self) hls-ghcide hls-brittany;
|
||||
hlsScopeOverride = self: super: {
|
||||
# haskell-language-server uses its own fork of ghcide
|
||||
# Test disabled: it seems to freeze (is it just that it takes a long time ?)
|
||||
ghcide = dontCheck hls-ghcide;
|
||||
# we are faster than stack here
|
||||
hie-bios = dontCheck super.hie-bios_0_7_1;
|
||||
lsp-test = dontCheck super.lsp-test_0_11_0_7;
|
||||
# fourmolu can‘t compile with an older aeson
|
||||
# fourmolu can‘t compile with an older aeson
|
||||
overrideAeson = name: value: value.overrideScope (self: super: {
|
||||
aeson = dontCheck super.aeson_1_5_2_0;
|
||||
# brittany has an aeson upper bound of 1.5
|
||||
brittany = hls-brittany;
|
||||
});
|
||||
in pkgs.lib.mapAttrs overrideAeson {
|
||||
# tons of overrides for bleeding edge versions for ghcide and hls
|
||||
# overriding aeson on all of them to prevent double compilations
|
||||
# this shouldn‘t break anything because nearly all their reverse deps are
|
||||
# in this list or marked as broken anyways
|
||||
haskell-language-server = dontCheck super.haskell-language-server;
|
||||
fourmolu = dontCheck super.fourmolu;
|
||||
stylish-haskell = super.stylish-haskell_0_12_2_0;
|
||||
ghcide = dontCheck super.ghcide;
|
||||
refinery = super.refinery_0_3_0_0;
|
||||
data-tree-print = doJailbreak super.data-tree-print;
|
||||
ghc-exactprint = dontCheck super.ghc-exactprint_0_6_3_2;
|
||||
};
|
||||
in {
|
||||
haskell-language-server = dontCheck (super.haskell-language-server.overrideScope hlsScopeOverride);
|
||||
hls-ghcide = dontCheck (super.hls-ghcide.overrideScope hlsScopeOverride);
|
||||
hls-brittany = dontCheck (super.hls-brittany.overrideScope hlsScopeOverride);
|
||||
fourmolu = dontCheck (super.fourmolu.overrideScope hlsScopeOverride);
|
||||
hie-bios = dontCheck super.hie-bios_0_7_1;
|
||||
lsp-test = dontCheck super.lsp-test_0_11_0_7;
|
||||
# the hls brittany is objectively better, because there hasn‘t been a
|
||||
# brittany release in a while and this version works with 8.10.
|
||||
# And we need to build it anyways.
|
||||
brittany = dontCheck super.hls-brittany;
|
||||
}
|
||||
) // import ./configuration-tensorflow.nix {inherit pkgs haskellLib;} self super
|
||||
|
||||
@@ -111,9 +111,6 @@ self: super: {
|
||||
sha256 = "0rgzrq0513nlc1vw7nw4km4bcwn4ivxcgi33jly4a7n3c1r32v1f";
|
||||
});
|
||||
|
||||
# Only 0.8 is compatible with ghc 8.10 https://hackage.haskell.org/package/apply-refact/changelog
|
||||
apply-refact = super.apply-refact_0_8_0_0;
|
||||
|
||||
# https://github.com/commercialhaskell/pantry/issues/21
|
||||
pantry = appendPatch super.pantry (pkgs.fetchpatch {
|
||||
name = "add-cabal-3.2.x-support.patch";
|
||||
|
||||
@@ -91,7 +91,4 @@ self: super: {
|
||||
|
||||
# ghc versions prior to 8.8.x needs additional dependency to compile successfully.
|
||||
ghc-lib-parser-ex = addBuildDepend super.ghc-lib-parser-ex self.ghc-lib-parser;
|
||||
|
||||
# Only 0.6 is compatible with ghc 8.6 https://hackage.haskell.org/package/apply-refact/changelog
|
||||
apply-refact = super.apply-refact_0_6_0_0;
|
||||
}
|
||||
|
||||
@@ -104,9 +104,6 @@ self: super: {
|
||||
# of issues with Cabal 3.x.
|
||||
darcs = dontDistribute super.darcs;
|
||||
|
||||
# Only 0.7 is compatible with ghc 8.7 https://hackage.haskell.org/package/apply-refact/changelog
|
||||
apply-refact = super.apply-refact_0_7_0_0;
|
||||
|
||||
# The package needs the latest Cabal version.
|
||||
cabal-install-parsers = super.cabal-install-parsers.overrideScope (self: super: { Cabal = self.Cabal_3_2_1_0; });
|
||||
|
||||
|
||||
@@ -2546,10 +2546,6 @@ extra-packages:
|
||||
- aeson-pretty < 0.8 # required by elm compiler
|
||||
- Agda == 2.6.1 # allows the agdaPackage set to be fixed to this version so that it won't break when another agda version is released.
|
||||
- ansi-terminal == 0.10.3 # required by cabal-plan, and policeman in ghc-8.8.x
|
||||
- apply-refact < 0.4 # newer versions don't work with GHC 8.0.x
|
||||
- apply-refact == 0.6.0.0 # works with GHC 8.6.x https://hackage.haskell.org/package/apply-refact/changelog
|
||||
- apply-refact == 0.7.0.0 # works with GHC 8.8.x https://hackage.haskell.org/package/apply-refact/changelog
|
||||
- apply-refact == 0.8.0.0 # works with GHC 8.10.x https://hackage.haskell.org/package/apply-refact/changelog
|
||||
- binary > 0.7 && < 0.8 # keep a 7.x major release around for older compilers
|
||||
- binary > 0.8 && < 0.9 # keep a 8.x major release around for older compilers
|
||||
- Cabal == 2.2.* # required for jailbreak-cabal etc.
|
||||
|
||||
@@ -22,8 +22,9 @@ self: super: {
|
||||
# HLS and its fork of ghcide that it uses
|
||||
# both are auto-generated by pkgs/development/tools/haskell/haskell-language-server/update.sh
|
||||
haskell-language-server = self.callPackage ../tools/haskell/haskell-language-server { };
|
||||
hls-ghcide = self.callPackage ../tools/haskell/haskell-language-server/hls-ghcide.nix { };
|
||||
hls-brittany = self.callPackage ../tools/haskell/haskell-language-server/hls-brittany.nix { };
|
||||
hls-hlint-plugin = self.callPackage ../tools/haskell/haskell-language-server/hls-hlint-plugin.nix { };
|
||||
hls-tactics-plugin = self.callPackage ../tools/haskell/haskell-language-server/hls-tactics-plugin.nix { };
|
||||
|
||||
nix-output-monitor = self.callPackage ../../tools/nix/nix-output-monitor { };
|
||||
|
||||
|
||||
Reference in New Issue
Block a user