summary refs log tree commit diff
path: root/pkgs/development/tools/haskell/haskell-language-server
diff options
context:
space:
mode:
Diffstat (limited to 'pkgs/development/tools/haskell/haskell-language-server')
-rw-r--r--pkgs/development/tools/haskell/haskell-language-server/default.nix28
-rw-r--r--pkgs/development/tools/haskell/haskell-language-server/hls-ghcide.nix60
-rw-r--r--pkgs/development/tools/haskell/haskell-language-server/hls-hlint-plugin.nix26
-rw-r--r--pkgs/development/tools/haskell/haskell-language-server/hls-tactics-plugin.nix32
-rwxr-xr-xpkgs/development/tools/haskell/haskell-language-server/update.sh20
5 files changed, 74 insertions, 92 deletions
diff --git a/pkgs/development/tools/haskell/haskell-language-server/default.nix b/pkgs/development/tools/haskell/haskell-language-server/default.nix
index 0c1b6d0dbcc..a19e0575913 100644
--- a/pkgs/development/tools/haskell/haskell-language-server/default.nix
+++ b/pkgs/development/tools/haskell/haskell-language-server/default.nix
@@ -1,22 +1,22 @@
 { mkDerivation, aeson, base, binary, blaze-markup, brittany
 , bytestring, containers, data-default, deepseq, directory, extra
-, fetchgit, filepath, fingertree, floskell, fourmolu, ghc
-, ghc-boot-th, ghc-exactprint, ghc-paths, ghc-source-gen, ghcide
-, gitrev, hashable, haskell-lsp, hie-bios, hls-plugin-api, hslogger
+, fetchgit, filepath, floskell, fourmolu, ghc, ghc-boot-th
+, ghc-paths, ghcide, gitrev, hashable, haskell-lsp, hie-bios
+, hls-hlint-plugin, hls-plugin-api, hls-tactics-plugin, hslogger
 , hspec, hspec-core, lens, lsp-test, mtl, optparse-applicative
-, optparse-simple, ormolu, process, refinery, regex-tdfa, retrie
-, safe-exceptions, shake, stdenv, stm, stylish-haskell, syb, tasty
+, optparse-simple, ormolu, process, regex-tdfa, retrie
+, safe-exceptions, shake, stdenv, stm, stylish-haskell, tasty
 , tasty-ant-xml, tasty-expected-failure, tasty-golden, tasty-hunit
 , tasty-rerun, temporary, text, time, transformers
 , unordered-containers, yaml
 }:
 mkDerivation {
   pname = "haskell-language-server";
-  version = "0.5.0.0";
+  version = "0.6.0.0";
   src = fetchgit {
     url = "https://github.com/haskell/haskell-language-server.git";
-    sha256 = "1qi762fa72487i8fspxmr8xizm9n2s1shxsvnvsl67vj9if573r9";
-    rev = "3ca2a6cd267f373aae19f59e1cf9e04b6524eff3";
+    sha256 = "027fq6752024wzzq9izsilm5lkq9gmpxf82rixbimbijw0yk4pwj";
+    rev = "372a12e797069dc3ac4fa33dcaabe3b992999d7c";
     fetchSubmodules = true;
   };
   isLibrary = true;
@@ -29,12 +29,12 @@ mkDerivation {
   ];
   executableHaskellDepends = [
     aeson base binary brittany bytestring containers deepseq directory
-    extra filepath fingertree floskell fourmolu ghc ghc-boot-th
-    ghc-exactprint ghc-paths ghc-source-gen ghcide gitrev hashable
-    haskell-lsp hie-bios hls-plugin-api hslogger lens mtl
-    optparse-applicative optparse-simple ormolu process refinery
-    regex-tdfa retrie safe-exceptions shake stylish-haskell syb
-    temporary text time transformers unordered-containers
+    extra filepath floskell fourmolu ghc ghc-boot-th ghc-paths ghcide
+    gitrev hashable haskell-lsp hie-bios hls-hlint-plugin
+    hls-plugin-api hls-tactics-plugin hslogger lens mtl
+    optparse-applicative optparse-simple ormolu process regex-tdfa
+    retrie safe-exceptions shake stylish-haskell temporary text time
+    transformers unordered-containers
   ];
   testHaskellDepends = [
     aeson base blaze-markup bytestring containers data-default
diff --git a/pkgs/development/tools/haskell/haskell-language-server/hls-ghcide.nix b/pkgs/development/tools/haskell/haskell-language-server/hls-ghcide.nix
deleted file mode 100644
index 450c665bef8..00000000000
--- a/pkgs/development/tools/haskell/haskell-language-server/hls-ghcide.nix
+++ /dev/null
@@ -1,60 +0,0 @@
-{ mkDerivation, aeson, array, async, base, base16-bytestring
-, binary, bytestring, Chart, Chart-diagrams, containers
-, cryptohash-sha1, data-default, deepseq, diagrams, diagrams-svg
-, directory, extra, fetchgit, filepath, fingertree, fuzzy, ghc
-, ghc-boot, ghc-boot-th, ghc-check, ghc-paths
-, ghc-typelits-knownnat, gitrev, Glob, haddock-library, hashable
-, haskell-lsp, haskell-lsp-types, hie-bios, hslogger
-, implicit-hie-cradle, lens, lsp-test, mtl, network-uri
-, optparse-applicative, prettyprinter, prettyprinter-ansi-terminal
-, process, QuickCheck, quickcheck-instances
-, record-dot-preprocessor, record-hasfield, 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.4.0";
-  src = fetchgit {
-    url = "https://github.com/haskell/ghcide";
-    sha256 = "0zv14mvfhmwwkhyzkr38qpvyffa8ywzp41lr1k55pbrc5b10fjr6";
-    rev = "0bfce3114c28bd00f7bf5729c32ec0f23a8d8854";
-    fetchSubmodules = true;
-  };
-  isLibrary = true;
-  isExecutable = true;
-  libraryHaskellDepends = [
-    aeson array async base base16-bytestring binary bytestring
-    containers cryptohash-sha1 data-default deepseq directory extra
-    filepath fingertree fuzzy ghc ghc-boot ghc-boot-th ghc-check
-    ghc-paths Glob haddock-library hashable haskell-lsp
-    haskell-lsp-types hie-bios hslogger implicit-hie-cradle 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
-    filepath gitrev hashable haskell-lsp haskell-lsp-types hie-bios
-    lens lsp-test optparse-applicative process safe-exceptions text
-    unordered-containers
-  ];
-  testHaskellDepends = [
-    aeson base binary bytestring containers directory extra filepath
-    ghc ghc-typelits-knownnat haddock-library haskell-lsp
-    haskell-lsp-types lens lsp-test network-uri optparse-applicative
-    process QuickCheck quickcheck-instances record-dot-preprocessor
-    record-hasfield rope-utf16-splay safe safe-exceptions shake tasty
-    tasty-expected-failure tasty-hunit tasty-quickcheck tasty-rerun
-    text
-  ];
-  benchmarkHaskellDepends = [
-    aeson base Chart Chart-diagrams diagrams diagrams-svg directory
-    extra filepath shake text yaml
-  ];
-  homepage = "https://github.com/haskell/ghcide#readme";
-  description = "The core of an IDE";
-  license = stdenv.lib.licenses.asl20;
-}
diff --git a/pkgs/development/tools/haskell/haskell-language-server/hls-hlint-plugin.nix b/pkgs/development/tools/haskell/haskell-language-server/hls-hlint-plugin.nix
new file mode 100644
index 00000000000..3a730dc7164
--- /dev/null
+++ b/pkgs/development/tools/haskell/haskell-language-server/hls-hlint-plugin.nix
@@ -0,0 +1,26 @@
+{ mkDerivation, aeson, apply-refact, base, binary, bytestring
+, containers, data-default, deepseq, Diff, directory, extra
+, fetchgit, filepath, ghc, ghc-lib, ghc-lib-parser-ex, ghcide
+, hashable, haskell-lsp, hlint, hls-plugin-api, hslogger, lens
+, regex-tdfa, shake, stdenv, temporary, text, transformers
+, unordered-containers
+}:
+mkDerivation {
+  pname = "hls-hlint-plugin";
+  version = "0.1.0.0";
+  src = fetchgit {
+    url = "https://github.com/haskell/haskell-language-server.git";
+    sha256 = "027fq6752024wzzq9izsilm5lkq9gmpxf82rixbimbijw0yk4pwj";
+    rev = "372a12e797069dc3ac4fa33dcaabe3b992999d7c";
+    fetchSubmodules = true;
+  };
+  postUnpack = "sourceRoot+=/plugins/hls-hlint-plugin; echo source root reset to $sourceRoot";
+  libraryHaskellDepends = [
+    aeson apply-refact base binary bytestring containers data-default
+    deepseq Diff directory extra filepath ghc ghc-lib ghc-lib-parser-ex
+    ghcide hashable haskell-lsp hlint hls-plugin-api hslogger lens
+    regex-tdfa shake temporary text transformers unordered-containers
+  ];
+  description = "Hlint integration plugin with Haskell Language Server";
+  license = stdenv.lib.licenses.asl20;
+}
diff --git a/pkgs/development/tools/haskell/haskell-language-server/hls-tactics-plugin.nix b/pkgs/development/tools/haskell/haskell-language-server/hls-tactics-plugin.nix
new file mode 100644
index 00000000000..3d168622fb7
--- /dev/null
+++ b/pkgs/development/tools/haskell/haskell-language-server/hls-tactics-plugin.nix
@@ -0,0 +1,32 @@
+{ mkDerivation, aeson, base, checkers, containers, deepseq
+, directory, extra, fetchgit, filepath, fingertree, generic-lens
+, ghc, ghc-boot-th, ghc-exactprint, ghc-source-gen, ghcide
+, haskell-lsp, hie-bios, hls-plugin-api, hspec, lens, mtl
+, QuickCheck, refinery, retrie, shake, stdenv, syb, text
+, transformers
+}:
+mkDerivation {
+  pname = "hls-tactics-plugin";
+  version = "0.5.1.0";
+  src = fetchgit {
+    url = "https://github.com/haskell/haskell-language-server.git";
+    sha256 = "027fq6752024wzzq9izsilm5lkq9gmpxf82rixbimbijw0yk4pwj";
+    rev = "372a12e797069dc3ac4fa33dcaabe3b992999d7c";
+    fetchSubmodules = true;
+  };
+  postUnpack = "sourceRoot+=/plugins/tactics; echo source root reset to $sourceRoot";
+  libraryHaskellDepends = [
+    aeson base containers deepseq directory extra filepath fingertree
+    generic-lens ghc ghc-boot-th ghc-exactprint ghc-source-gen ghcide
+    haskell-lsp hls-plugin-api lens mtl refinery retrie shake syb text
+    transformers
+  ];
+  testHaskellDepends = [
+    base checkers containers ghc hie-bios hls-plugin-api hspec mtl
+    QuickCheck
+  ];
+  homepage = "https://github.com/isovector/hls-tactics-plugin#readme";
+  description = "LSP server for GHC";
+  license = "unknown";
+  hydraPlatforms = stdenv.lib.platforms.none;
+}
diff --git a/pkgs/development/tools/haskell/haskell-language-server/update.sh b/pkgs/development/tools/haskell/haskell-language-server/update.sh
index fd22a80126d..fbd97b5488a 100755
--- a/pkgs/development/tools/haskell/haskell-language-server/update.sh
+++ b/pkgs/development/tools/haskell/haskell-language-server/update.sh
@@ -16,24 +16,6 @@ set -eo pipefail
 script_dir="$( cd "$( dirname "${BASH_SOURCE[0]}" )" >/dev/null 2>&1 && pwd )"
 
 # ===========================
-# ghcide fork on https://github.com/wz1000/ghcide
-# ===========================
-
-# ghcide derivation created with cabal2nix.
-ghcide_derivation_file="${script_dir}/hls-ghcide.nix"
-
-# This is the current revision of hls in Nixpkgs.
-ghcide_old_version="$(sed -En 's/.*\bversion = "(.*?)".*/\1/p' "$ghcide_derivation_file")"
-
-# This is the revision of ghcide used by hls on GitHub.
-ghcide_new_version=$(curl --silent "https://api.github.com/repos/haskell/haskell-language-server/contents/ghcide" | jq '.sha' --raw-output)
-
-echo "Updating haskell-language-server's ghcide from old version $ghcide_old_version to new version $ghcide_new_version."
-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
 # ===========================
 
@@ -67,5 +49,7 @@ echo "Updating haskell-language-server from old version $hls_old_version to new
 echo "Running cabal2nix and outputting to ${hls_derivation_file}..."
 
 cabal2nix --revision "$hls_new_version" "https://github.com/haskell/haskell-language-server.git" > "$hls_derivation_file"
+cabal2nix --revision "$hls_new_version" --subpath plugins/tactics "https://github.com/haskell/haskell-language-server.git" > "${script_dir}/hls-tactics-plugin.nix"
+cabal2nix --revision "$hls_new_version" --subpath plugins/hls-hlint-plugin "https://github.com/haskell/haskell-language-server.git" > "${script_dir}/hls-hlint-plugin.nix"
 
 echo "Finished."