haskell-language-server: Fix build for 1.9.0.0

This commit is contained in:
maralorn 2022-12-30 09:15:08 +01:00
parent e3134c8180
commit aaf6118fd5
5 changed files with 42 additions and 16 deletions

View file

@ -1358,7 +1358,9 @@ self: super: {
haskell-language-server = (lib.pipe super.haskell-language-server [
dontCheck
(disableCabalFlag "stan") # Sorry stan is totally unmaintained and terrible to get to run. It only works on ghc 8.8 or 8.10 anyways …
(disableCabalFlag "callHierarchy") # Disabled temporarily: https://github.com/haskell/haskell-language-server/pull/3431
]).overrideScope (lself: lsuper: {
hls-call-hierarchy-plugin = null;
hlint = enableCabalFlag "ghc-lib" lsuper.hlint;
# For most ghc versions, we overrideScope Cabal in the configuration-ghc-???.nix,
# because some packages, like ormolu, need a newer Cabal version.
@ -1375,6 +1377,7 @@ self: super: {
hls-hlint-plugin = super.hls-hlint-plugin.overrideScope (lself: lsuper: {
# For "ghc-lib" flag see https://github.com/haskell/haskell-language-server/issues/3185#issuecomment-1250264515
hlint = enableCabalFlag "ghc-lib" lsuper.hlint;
apply-refact = lsuper.apply-refact_0_11_0_0;
});
# For -f-auto see cabal.project in haskell-language-server.
@ -1398,9 +1401,6 @@ self: super: {
# 2022-09-19: https://github.com/haskell/haskell-language-server/issues/3200
hls-refactor-plugin = dontCheck super.hls-refactor-plugin;
# 2022-11-18: https://github.com/haskell/haskell-language-server/commit/c1a7527c4fb348bee6093d9794b7d3e0c8d563f2
hls-fourmolu-plugin = assert super.hls-fourmolu-plugin.version == "1.1.0.0"; doJailbreak super.hls-fourmolu-plugin;
# tests require network
ghcide = dontCheck super.ghcide;

View file

@ -2322,7 +2322,6 @@ broken-packages:
- hls-brittany-plugin
- hls-haddock-comments-plugin
- hls-selection-range-plugin
- hls-splice-plugin
- hls-stan-plugin
- hls-tactics-plugin
- hlwm

View file

@ -88,6 +88,8 @@ default-package-overrides:
- hnix-store-remote == 0.5.0.0 # 2022-06-17: Until hnix 0.17
# reflex-dom-core 0.7.0.2 has no reflex 0.9 compatible release and most likely most people will want to use them together
- reflex < 0.9.0.0
# reqired by haskell-language-server 1.9.0.0
- implicit-hie < 0.1.3
extra-packages:
- Cabal == 2.2.* # required for jailbreak-cabal etc.

View file

@ -694,13 +694,7 @@ self: super: builtins.intersectAttrs super {
retrie_1_2_0_0 = addTestToolDepends [pkgs.git pkgs.mercurial] super.retrie_1_2_0_0;
retrie_1_2_1_1 = addTestToolDepends [pkgs.git pkgs.mercurial] super.retrie_1_2_1_1;
haskell-language-server = let
# This wrapper will be included in the sdist in the next release, then we can remove this custom fetch.
abi-compat-check-wrapper = assert super.haskell-language-server.version == "1.8.0.0"; pkgs.fetchurl {
url = "https://raw.githubusercontent.com/haskell/haskell-language-server/c12379c57ab8f0abd606e9f397de54e508d024a0/bindist/wrapper.in";
sha256 = "sha256-vHi6+s8/V4WJSCxIqjP+thumEpttokpCc+a823WEPPk=";
}; in
overrideCabal (drv: {
haskell-language-server = overrideCabal (drv: {
# starting with 1.6.1.1 haskell-language-server wants to be linked dynamically
# by default. Unless we reflect this in the generic builder, GHC is going to
# produce some illegal references to /build/.
@ -717,7 +711,7 @@ self: super: builtins.intersectAttrs super {
-e "s/@@BOOT_PKGS@@/$BOOT_PKGS/" \
-e "s/@@ABI_HASHES@@/$(for dep in $BOOT_PKGS; do printf "%s:" "$dep" && ghc-pkg-${self.ghc.version} field $dep abi --simple-output ; done | tr '\n' ' ' | xargs)/" \
-e "s!Consider installing ghc.* via ghcup or build HLS from source.!Visit https://haskell4nix.readthedocs.io/nixpkgs-users-guide.html#how-to-install-haskell-language-server to learn how to correctly install a matching hls for your ghc with nix.!" \
${abi-compat-check-wrapper} > "$out/bin/haskell-language-server"
bindist/wrapper.in > "$out/bin/haskell-language-server"
ln -s "$out/bin/haskell-language-server" "$out/bin/haskell-language-server-${self.ghc.version}"
chmod +x "$out/bin/haskell-language-server"
'';
@ -1089,13 +1083,18 @@ self: super: builtins.intersectAttrs super {
hls-module-name-plugin
hls-splice-plugin
hls-refactor-plugin
hls-code-range-plugin
hls-explicit-fixity-plugin;
hls-cabal-plugin;
# Tests have file permissions expections that dont work with the nix store.
hls-stylish-haskell-plugin = dontCheck super.hls-stylish-haskell-plugin;
hls-gadt-plugin = dontCheck super.hls-gadt-plugin;
# https://github.com/haskell/haskell-language-server/pull/3431
hls-cabal-fmt-plugin = dontCheck super.hls-cabal-fmt-plugin;
hls-code-range-plugin = dontCheck super.hls-code-range-plugin;
hls-explicit-record-fields-plugin = dontCheck super.hls-explicit-record-fields-plugin;
# Flaky tests
hls-explicit-fixity-plugin = dontCheck super.hls-explicit-fixity-plugin;
hls-hlint-plugin = dontCheck super.hls-hlint-plugin;
hls-pragmas-plugin = dontCheck super.hls-pragmas-plugin;
hls-class-plugin = dontCheck super.hls-class-plugin;

View file

@ -141775,8 +141775,6 @@ self: {
testHaskellDepends = [ base filepath hls-test-utils text ];
description = "HLS Plugin to expand TemplateHaskell Splices and QuasiQuotes";
license = lib.licenses.asl20;
hydraPlatforms = lib.platforms.none;
broken = true;
}) {};
"hls-stan-plugin" = callPackage
@ -159416,6 +159414,33 @@ self: {
}) {};
"implicit-hie" = callPackage
({ mkDerivation, attoparsec, base, directory, filepath, filepattern
, hspec, hspec-attoparsec, text, transformers, yaml
}:
mkDerivation {
pname = "implicit-hie";
version = "0.1.2.7";
sha256 = "0yb457n26455kbq6kv8g48q66pmmaxcpikmpg9gm00sd6adgq6gl";
isLibrary = true;
isExecutable = true;
libraryHaskellDepends = [
attoparsec base directory filepath filepattern text transformers
yaml
];
executableHaskellDepends = [
attoparsec base directory filepath filepattern text transformers
yaml
];
testHaskellDepends = [
attoparsec base directory filepath filepattern hspec
hspec-attoparsec text transformers yaml
];
description = "Auto generate hie-bios cradles & hie.yaml";
license = lib.licenses.bsd3;
mainProgram = "gen-hie";
}) {};
"implicit-hie_0_1_4_0" = callPackage
({ mkDerivation, attoparsec, base, directory, filepath, filepattern
, hspec, hspec-attoparsec, text, transformers, yaml
}:
@ -159439,6 +159464,7 @@ self: {
];
description = "Auto generate hie-bios cradles & hie.yaml";
license = lib.licenses.bsd3;
hydraPlatforms = lib.platforms.none;
mainProgram = "gen-hie";
}) {};