Skip to content

Commit e2c02b0

Browse files
rvlKtorZ
authored andcommitted
nix-shell: Replace ghcide-0.4.0 with haskell-language-server-0.5.0
1 parent 23e9257 commit e2c02b0

File tree

2 files changed

+38
-2
lines changed

2 files changed

+38
-2
lines changed

default.nix

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -93,11 +93,10 @@ let
9393
ruby
9494
sqlite-interactive
9595
yq
96-
]);
96+
]) ++ attrValues hls;
9797
tools = {
9898
cabal = "3.2.0.0";
9999
ghcid = "0.8.7";
100-
ghcide = "0.4.0";
101100
hlint = "3.2";
102101
lentil = "1.3.2.0";
103102
stylish-haskell = "0.11.0.3";
@@ -118,6 +117,11 @@ let
118117
'';
119118
};
120119

120+
# Build latest release of haskell-language-server from github
121+
hls = pkgs.callPackages ./nix/hls.nix {
122+
compiler-nix-name = haskellPackages._config.compiler.nix-name;
123+
};
124+
121125
self = {
122126
inherit pkgs commonLib src haskellPackages profiledHaskellPackages coveredHaskellPackages;
123127
# Jormungandr

nix/hls.nix

Lines changed: 32 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,32 @@
1+
{ haskell-nix, fetchFromGitHub, compiler-nix-name }:
2+
3+
let
4+
hlsPkgs = haskell-nix.cabalProject {
5+
src = fetchFromGitHub {
6+
name = "haskell-language-server";
7+
owner = "haskell";
8+
repo = "haskell-language-server";
9+
rev = "0.5.0";
10+
sha256 = "0vkh5ff6l5wr4450xmbki3cfhlwf041fjaalnwmj7zskd72s9p7p";
11+
fetchSubmodules = true;
12+
};
13+
14+
# Fix source info of brittany dep
15+
lookupSha256 = { location, tag, ... } : {
16+
"https://github.com/bubba/brittany.git"."c59655f10d5ad295c2481537fc8abf0a297d9d1c" = "1rkk09f8750qykrmkqfqbh44dbx1p8aq1caznxxlw8zqfvx39cxl";
17+
}."${location}"."${tag}";
18+
19+
# Use same GHC as the project
20+
inherit compiler-nix-name;
21+
22+
# # Materialization voodoo (disabled for now).
23+
# inherit index-state checkMaterialization;
24+
# Invalidate and update if you change the version
25+
# plan-sha256 = "144p19wpydc6c56f0zw5b7c17151n0cghimr9wd8rlhifymmky2h";
26+
};
27+
28+
in
29+
{
30+
inherit (hlsPkgs.haskell-language-server.components.exes) haskell-language-server;
31+
inherit (hlsPkgs.hie-bios.components.exes) hie-bios;
32+
}

0 commit comments

Comments
 (0)