Merge pull request #97744 from galagora/hls-ghc-8102
haskell-language-server, stylish-haskell: Fix build on GHC 8.10.*
This commit is contained in:
commit
20766242f8
@ -1470,32 +1470,36 @@ self: super: {
|
||||
pandoc-types = doDistribute self.pandoc-types_1_21;
|
||||
rfc5051 = doDistribute self.rfc5051_0_2;
|
||||
|
||||
# Upstream forgot to change the Cabal version bounds in the test suite.
|
||||
# See: https://github.com/jaspervdj/stylish-haskell/pull/297
|
||||
# Will be fixed whenever they next bump the version number
|
||||
stylish-haskell = appendPatch super.stylish-haskell (pkgs.fetchpatch {
|
||||
url = "https://github.com/jaspervdj/stylish-haskell/commit/9550aa1cd177aa6fe271d075177109d66a79e67f.patch";
|
||||
sha256 = "159jr80k40hdq5gpqfjknqx6vj2licx1l0f57l5r3k4264lnxjdb";
|
||||
});
|
||||
# INSERT NEW OVERRIDES ABOVE THIS LINE
|
||||
|
||||
} // (let
|
||||
inherit (self) hls-ghcide;
|
||||
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 = hls-ghcide;
|
||||
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_5;
|
||||
# fourmolu can‘t compile with an older aeson
|
||||
aeson = dontCheck super.aeson_1_5_2_0;
|
||||
# brittany has an aeson upper bound of 1.5
|
||||
brittany = doJailbreak super.brittany;
|
||||
brittany = hls-brittany;
|
||||
data-tree-print = doJailbreak super.data-tree-print;
|
||||
ghc-exactprint = dontCheck super.ghc-exactprint_0_6_3_2;
|
||||
};
|
||||
in {
|
||||
# jailbreaking for hie-bios 0.7.0 (upstream PR: https://github.com/haskell/haskell-language-server/pull/357)
|
||||
haskell-language-server = dontCheck (doJailbreak (super.haskell-language-server.overrideScope hlsScopeOverride));
|
||||
hls-ghcide = appendPatch (dontCheck (super.hls-ghcide.overrideScope hlsScopeOverride))
|
||||
(pkgs.fetchpatch {
|
||||
# This patch loosens the hie-bios upper bound.
|
||||
# It is already merged into upstream and won‘t be needed for ghcide 0.4.0
|
||||
url = "https://github.com/haskell/ghcide/commit/3e1b3620948870a4da8808ca0c0897fbd3ecad16.patch";
|
||||
sha256 = "1jwn7jgi740x6wwv1k0mz9d4z0b9p3mzs54pdg4nfq0h2v7zxchz";
|
||||
});
|
||||
fourmolu = super.fourmolu.overrideScope hlsScopeOverride;
|
||||
hls-ghcide = dontCheck (super.hls-ghcide.overrideScope hlsScopeOverride);
|
||||
hls-brittany = dontCheck (super.hls-brittany.overrideScope hlsScopeOverride);
|
||||
fourmolu = dontCheck (super.fourmolu.overrideScope hlsScopeOverride);
|
||||
}
|
||||
) // import ./configuration-tensorflow.nix {inherit pkgs haskellLib;} self super
|
||||
|
@ -23,6 +23,7 @@ self: super: {
|
||||
# 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 { };
|
||||
|
||||
# cabal2nix --revision <rev> https://github.com/hasura/ci-info-hs.git
|
||||
ci-info = self.callPackage ../misc/haskell/hasura/ci-info {};
|
||||
|
@ -14,8 +14,8 @@ mkDerivation {
|
||||
version = "0.4.0.0";
|
||||
src = fetchgit {
|
||||
url = "https://github.com/haskell/haskell-language-server.git";
|
||||
sha256 = "157bsq6i824bl6krw7znp0byd8ibaqsq7mfwnkl741dmrflsxpa9";
|
||||
rev = "cb861b878ae01911b066182ff0d8080050c3b2d6";
|
||||
sha256 = "1fh9k9b3880m6ql4i10yn2yanskk9xhrakrrddqvainhcf2ik8hl";
|
||||
rev = "c4576992f443a9abe48ffcfa0e2d2b9bce15d7ae";
|
||||
fetchSubmodules = true;
|
||||
};
|
||||
isLibrary = true;
|
||||
|
@ -0,0 +1,36 @@
|
||||
{ mkDerivation, aeson, base, butcher, bytestring, cmdargs
|
||||
, containers, czipwith, data-tree-print, deepseq, directory, extra
|
||||
, fetchgit, filepath, ghc, ghc-boot-th, ghc-exactprint, ghc-paths
|
||||
, hspec, monad-memo, mtl, multistate, parsec, pretty, random, safe
|
||||
, semigroups, stdenv, strict, syb, text, transformers, uniplate
|
||||
, unsafe, yaml
|
||||
}:
|
||||
mkDerivation {
|
||||
pname = "brittany";
|
||||
version = "0.12.1.1";
|
||||
src = fetchgit {
|
||||
url = "https://github.com/bubba/brittany";
|
||||
sha256 = "1rkk09f8750qykrmkqfqbh44dbx1p8aq1caznxxlw8zqfvx39cxl";
|
||||
rev = "c59655f10d5ad295c2481537fc8abf0a297d9d1c";
|
||||
fetchSubmodules = true;
|
||||
};
|
||||
isLibrary = true;
|
||||
isExecutable = true;
|
||||
libraryHaskellDepends = [
|
||||
aeson base butcher bytestring cmdargs containers czipwith
|
||||
data-tree-print deepseq directory extra filepath ghc ghc-boot-th
|
||||
ghc-exactprint ghc-paths monad-memo mtl multistate pretty random
|
||||
safe semigroups strict syb text transformers uniplate unsafe yaml
|
||||
];
|
||||
executableHaskellDepends = [ base ];
|
||||
testHaskellDepends = [
|
||||
aeson base butcher bytestring cmdargs containers czipwith
|
||||
data-tree-print deepseq directory extra filepath ghc ghc-boot-th
|
||||
ghc-exactprint ghc-paths hspec monad-memo mtl multistate parsec
|
||||
pretty safe semigroups strict syb text transformers uniplate unsafe
|
||||
yaml
|
||||
];
|
||||
homepage = "https://github.com/lspitzner/brittany/";
|
||||
description = "Haskell source code formatter";
|
||||
license = stdenv.lib.licenses.agpl3;
|
||||
}
|
@ -5,21 +5,20 @@
|
||||
, ghc-boot-th, ghc-check, ghc-paths, ghc-typelits-knownnat, gitrev
|
||||
, haddock-library, hashable, haskell-lsp, haskell-lsp-types
|
||||
, hie-bios, hslogger, lens, lsp-test, mtl, network-uri
|
||||
, opentelemetry, optparse-applicative, prettyprinter
|
||||
, prettyprinter-ansi-terminal, process, QuickCheck
|
||||
, quickcheck-instances, regex-tdfa, rope-utf16-splay, safe
|
||||
, safe-exceptions, shake, sorted-list, stdenv, stm, syb, tasty
|
||||
, tasty-expected-failure, tasty-hunit, tasty-quickcheck
|
||||
, tasty-rerun, text, time, transformers, unix, unordered-containers
|
||||
, utf8-string, yaml
|
||||
, optparse-applicative, prettyprinter, prettyprinter-ansi-terminal
|
||||
, process, QuickCheck, quickcheck-instances, regex-tdfa
|
||||
, rope-utf16-splay, safe, safe-exceptions, shake, sorted-list
|
||||
, stdenv, stm, syb, tasty, tasty-expected-failure, tasty-hunit
|
||||
, tasty-quickcheck, tasty-rerun, text, time, transformers, unix
|
||||
, unordered-containers, utf8-string, yaml
|
||||
}:
|
||||
mkDerivation {
|
||||
pname = "ghcide";
|
||||
version = "0.2.0";
|
||||
version = "0.3.0";
|
||||
src = fetchgit {
|
||||
url = "https://github.com/haskell/ghcide";
|
||||
sha256 = "1zq7ngaak8il91a309rl51dghzasnk4m2sm3av6d93cyqyra1hfc";
|
||||
rev = "078e3d3c0d319f83841ccbcdc60ff5f0e243f6be";
|
||||
sha256 = "15v3g3i5v0xbq50lfvl4bv3rx01nixiqx02sddqi5lj2idgmg24g";
|
||||
rev = "96cf8c53d0bdc16d3d2cd0559b74962593ce6dc5";
|
||||
fetchSubmodules = true;
|
||||
};
|
||||
isLibrary = true;
|
||||
@ -29,10 +28,10 @@ mkDerivation {
|
||||
containers cryptohash-sha1 data-default deepseq directory extra
|
||||
filepath fuzzy ghc ghc-boot ghc-boot-th ghc-check ghc-paths
|
||||
haddock-library hashable haskell-lsp haskell-lsp-types hie-bios
|
||||
hslogger mtl network-uri opentelemetry prettyprinter
|
||||
prettyprinter-ansi-terminal regex-tdfa rope-utf16-splay safe
|
||||
safe-exceptions shake sorted-list stm syb text time transformers
|
||||
unix unordered-containers utf8-string
|
||||
hslogger mtl network-uri prettyprinter prettyprinter-ansi-terminal
|
||||
regex-tdfa rope-utf16-splay safe safe-exceptions shake sorted-list
|
||||
stm syb text time transformers unix unordered-containers
|
||||
utf8-string
|
||||
];
|
||||
executableHaskellDepends = [
|
||||
aeson base bytestring containers data-default directory extra
|
||||
@ -52,7 +51,7 @@ mkDerivation {
|
||||
aeson base Chart Chart-diagrams diagrams diagrams-svg directory
|
||||
extra filepath shake text yaml
|
||||
];
|
||||
homepage = "https://github.com/digital-asset/ghcide#readme";
|
||||
homepage = "https://github.com/haskell/ghcide#readme";
|
||||
description = "The core of an IDE";
|
||||
license = stdenv.lib.licenses.asl20;
|
||||
}
|
||||
|
@ -7,6 +7,8 @@
|
||||
# Note that you should always try building haskell-language-server after updating it here, since
|
||||
# some of the overrides in pkgs/development/haskell/configuration-nix.nix may
|
||||
# need to be updated/changed.
|
||||
#
|
||||
# Remember to split out different updates into multiple commits
|
||||
|
||||
set -eo pipefail
|
||||
|
||||
@ -31,6 +33,22 @@ echo "Running cabal2nix and outputting to ${ghcide_derivation_file}..."
|
||||
|
||||
cabal2nix --revision "$ghcide_new_version" "https://github.com/haskell/ghcide" > "$ghcide_derivation_file"
|
||||
|
||||
# ===========================
|
||||
# HLS maintainer's Brittany fork
|
||||
# ===========================
|
||||
|
||||
# brittany derivation created with cabal2nix.
|
||||
brittany_derivation_file="${script_dir}/hls-brittany.nix"
|
||||
|
||||
# This is the current revision of the brittany fork in Nixpkgs.
|
||||
brittany_old_version="$(sed -En 's/.*\bversion = "(.*?)".*/\1/p' "$brittany_derivation_file")"
|
||||
|
||||
brittany_new_version=$(curl --silent "https://api.github.com/repos/bubba/brittany/commits/ghc-8.10.1" | jq '.sha' --raw-output)
|
||||
|
||||
echo "Updating haskell-language-server's brittany from old version $brittany_old_version to new version $brittany_new_version."
|
||||
echo "Running cabal2nix and outputting to ${brittany_derivation_file}..."
|
||||
|
||||
cabal2nix --revision "$brittany_new_version" "https://github.com/bubba/brittany" > "$brittany_derivation_file"
|
||||
|
||||
# ===========================
|
||||
# HLS
|
||||
|
Loading…
Reference in New Issue
Block a user