Skip to content

Commit

Permalink
nix-shell: Replace ghcide-0.4.0 with haskell-language-server-0.5.0
Browse files Browse the repository at this point in the history
  • Loading branch information
rvl authored and KtorZ committed Oct 16, 2020
1 parent 23e9257 commit e2c02b0
Show file tree
Hide file tree
Showing 2 changed files with 38 additions and 2 deletions.
8 changes: 6 additions & 2 deletions default.nix
Original file line number Diff line number Diff line change
Expand Up @@ -93,11 +93,10 @@ let
ruby
sqlite-interactive
yq
]);
]) ++ attrValues hls;
tools = {
cabal = "3.2.0.0";
ghcid = "0.8.7";
ghcide = "0.4.0";
hlint = "3.2";
lentil = "1.3.2.0";
stylish-haskell = "0.11.0.3";
Expand All @@ -118,6 +117,11 @@ let
'';
};

# Build latest release of haskell-language-server from github
hls = pkgs.callPackages ./nix/hls.nix {
compiler-nix-name = haskellPackages._config.compiler.nix-name;
};

self = {
inherit pkgs commonLib src haskellPackages profiledHaskellPackages coveredHaskellPackages;
# Jormungandr
Expand Down
32 changes: 32 additions & 0 deletions nix/hls.nix
Original file line number Diff line number Diff line change
@@ -0,0 +1,32 @@
{ haskell-nix, fetchFromGitHub, compiler-nix-name }:

let
hlsPkgs = haskell-nix.cabalProject {
src = fetchFromGitHub {
name = "haskell-language-server";
owner = "haskell";
repo = "haskell-language-server";
rev = "0.5.0";
sha256 = "0vkh5ff6l5wr4450xmbki3cfhlwf041fjaalnwmj7zskd72s9p7p";
fetchSubmodules = true;
};

# Fix source info of brittany dep
lookupSha256 = { location, tag, ... } : {
"https://github.com/bubba/brittany.git"."c59655f10d5ad295c2481537fc8abf0a297d9d1c" = "1rkk09f8750qykrmkqfqbh44dbx1p8aq1caznxxlw8zqfvx39cxl";
}."${location}"."${tag}";

# Use same GHC as the project
inherit compiler-nix-name;

# # Materialization voodoo (disabled for now).
# inherit index-state checkMaterialization;
# Invalidate and update if you change the version
# plan-sha256 = "144p19wpydc6c56f0zw5b7c17151n0cghimr9wd8rlhifymmky2h";
};

in
{
inherit (hlsPkgs.haskell-language-server.components.exes) haskell-language-server;
inherit (hlsPkgs.hie-bios.components.exes) hie-bios;
}

0 comments on commit e2c02b0

Please sign in to comment.