From c31e766a24f78e8fb03ad261422e3710c1b37550 Mon Sep 17 00:00:00 2001 From: Joe Hermaszewski Date: Sat, 12 Dec 2020 10:41:47 +0800 Subject: haskellPackages.haskell-language-server: 0.6.0 -> 0.7.0 Remove hls-brittany as it's no longer necessary Fix the update script to include hls-explicit-imports-plugin and hls-retrhls-retrie-plugin --- .../haskell-modules/configuration-common.nix | 7 +---- .../haskell-modules/configuration-hackage2nix.yaml | 1 - .../haskell-modules/non-hackage-packages.nix | 3 +- .../haskell/haskell-language-server/default.nix | 36 +++++++++++----------- .../haskell-language-server/hls-brittany.nix | 36 ---------------------- .../hls-explicit-imports-plugin.nix | 21 +++++++++++++ .../haskell-language-server/hls-hlint-plugin.nix | 4 +-- .../haskell-language-server/hls-retrie-plugin.nix | 23 ++++++++++++++ .../haskell-language-server/hls-tactics-plugin.nix | 12 ++++---- .../haskell/haskell-language-server/update.sh | 19 ++---------- 10 files changed, 75 insertions(+), 87 deletions(-) delete mode 100644 pkgs/development/tools/haskell/haskell-language-server/hls-brittany.nix create mode 100644 pkgs/development/tools/haskell/haskell-language-server/hls-explicit-imports-plugin.nix create mode 100644 pkgs/development/tools/haskell/haskell-language-server/hls-retrie-plugin.nix diff --git a/pkgs/development/haskell-modules/configuration-common.nix b/pkgs/development/haskell-modules/configuration-common.nix index 323284829b3a..9b0dfaa44282 100644 --- a/pkgs/development/haskell-modules/configuration-common.nix +++ b/pkgs/development/haskell-modules/configuration-common.nix @@ -1402,6 +1402,7 @@ self: super: { # https://github.com/haskell/haskell-language-server/issues/611 haskell-language-server = dontCheck (super.haskell-language-server.override { lsp-test = dontCheck self.lsp-test_0_11_0_7; + fourmolu = self.fourmolu_0_3_0_0; }); fourmolu = dontCheck super.fourmolu; @@ -1412,12 +1413,6 @@ self: super: { )); refinery = doDistribute super.refinery_0_3_0_0; data-tree-print = doJailbreak super.data-tree-print; - # the hls brittany is objectively better, because there hasn‘t been a - # brittany release in a while and this version works with 8.10. - # And we need to build it anyways. - # 2020-11-15: jailbreaking because we have strict 0.4 which is to new - brittany = self.hls-brittany; - hls-brittany = dontCheck (doJailbreak super.hls-brittany); # 2020-11-15: aeson 1.5.4.1 needs to new quickcheck-instances for testing aeson = dontCheck super.aeson; diff --git a/pkgs/development/haskell-modules/configuration-hackage2nix.yaml b/pkgs/development/haskell-modules/configuration-hackage2nix.yaml index 2e89a72b182f..9ffe8dff3450 100644 --- a/pkgs/development/haskell-modules/configuration-hackage2nix.yaml +++ b/pkgs/development/haskell-modules/configuration-hackage2nix.yaml @@ -6401,7 +6401,6 @@ broken-packages: - hlrdb - hlrdb-core - hls - - hls-brittany - hlwm - hly - hmark diff --git a/pkgs/development/haskell-modules/non-hackage-packages.nix b/pkgs/development/haskell-modules/non-hackage-packages.nix index 30f00cc6ea2c..fe7fad15ce37 100644 --- a/pkgs/development/haskell-modules/non-hackage-packages.nix +++ b/pkgs/development/haskell-modules/non-hackage-packages.nix @@ -19,9 +19,10 @@ self: super: { # HLS and its fork of ghcide that it uses # 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-brittany = self.callPackage ../tools/haskell/haskell-language-server/hls-brittany.nix { }; hls-hlint-plugin = self.callPackage ../tools/haskell/haskell-language-server/hls-hlint-plugin.nix { }; hls-tactics-plugin = self.callPackage ../tools/haskell/haskell-language-server/hls-tactics-plugin.nix { }; + hls-explicit-imports-plugin = self.callPackage ../tools/haskell/haskell-language-server/hls-explicit-imports-plugin.nix { }; + hls-retrie-plugin = self.callPackage ../tools/haskell/haskell-language-server/hls-retrie-plugin.nix { }; nix-output-monitor = self.callPackage ../../tools/nix/nix-output-monitor { }; diff --git a/pkgs/development/tools/haskell/haskell-language-server/default.nix b/pkgs/development/tools/haskell/haskell-language-server/default.nix index a19e05759136..3a140d940028 100644 --- a/pkgs/development/tools/haskell/haskell-language-server/default.nix +++ b/pkgs/development/tools/haskell/haskell-language-server/default.nix @@ -2,39 +2,39 @@ , bytestring, containers, data-default, deepseq, directory, extra , 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, 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 +, hls-explicit-imports-plugin, hls-hlint-plugin, hls-plugin-api +, hls-retrie-plugin, hls-tactics-plugin, hslogger, hspec +, hspec-core, lens, lsp-test, mtl, optparse-applicative +, optparse-simple, ormolu, process, regex-tdfa, 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.6.0.0"; + version = "0.7.0.0"; src = fetchgit { url = "https://github.com/haskell/haskell-language-server.git"; - sha256 = "027fq6752024wzzq9izsilm5lkq9gmpxf82rixbimbijw0yk4pwj"; - rev = "372a12e797069dc3ac4fa33dcaabe3b992999d7c"; + sha256 = "0w37792wkq4ys7afgali4jg1kwgkbpk8q0y95fd2j1vgpk0pndlr"; + rev = "6a692de3308c06d8eb7bdf0f7b8a35b6e9a92610"; fetchSubmodules = true; }; isLibrary = true; isExecutable = true; libraryHaskellDepends = [ base containers data-default directory extra filepath ghc ghcide - gitrev haskell-lsp hie-bios hls-plugin-api hslogger - optparse-applicative optparse-simple process text - unordered-containers + gitrev haskell-lsp hls-plugin-api hslogger optparse-applicative + optparse-simple process text unordered-containers ]; executableHaskellDepends = [ aeson base binary brittany bytestring containers deepseq directory 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 + gitrev hashable haskell-lsp hie-bios hls-explicit-imports-plugin + hls-hlint-plugin hls-plugin-api hls-retrie-plugin + hls-tactics-plugin hslogger lens mtl optparse-applicative + optparse-simple ormolu process regex-tdfa 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-brittany.nix b/pkgs/development/tools/haskell/haskell-language-server/hls-brittany.nix deleted file mode 100644 index 0519cf42dd8c..000000000000 --- a/pkgs/development/tools/haskell/haskell-language-server/hls-brittany.nix +++ /dev/null @@ -1,36 +0,0 @@ -{ 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; -} diff --git a/pkgs/development/tools/haskell/haskell-language-server/hls-explicit-imports-plugin.nix b/pkgs/development/tools/haskell/haskell-language-server/hls-explicit-imports-plugin.nix new file mode 100644 index 000000000000..72d5e109cbdc --- /dev/null +++ b/pkgs/development/tools/haskell/haskell-language-server/hls-explicit-imports-plugin.nix @@ -0,0 +1,21 @@ +{ mkDerivation, aeson, base, containers, deepseq, fetchgit, ghc +, ghcide, haskell-lsp-types, hls-plugin-api, shake, stdenv, text +, unordered-containers +}: +mkDerivation { + pname = "hls-explicit-imports-plugin"; + version = "0.1.0.0"; + src = fetchgit { + url = "https://github.com/haskell/haskell-language-server.git"; + sha256 = "0w37792wkq4ys7afgali4jg1kwgkbpk8q0y95fd2j1vgpk0pndlr"; + rev = "6a692de3308c06d8eb7bdf0f7b8a35b6e9a92610"; + fetchSubmodules = true; + }; + postUnpack = "sourceRoot+=/plugins/hls-explicit-imports-plugin; echo source root reset to $sourceRoot"; + libraryHaskellDepends = [ + aeson base containers deepseq ghc ghcide haskell-lsp-types + hls-plugin-api shake text unordered-containers + ]; + description = "Explicit imports plugin for Haskell Language Server"; + 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 index 3a730dc71642..6267bb4b6fbf 100644 --- a/pkgs/development/tools/haskell/haskell-language-server/hls-hlint-plugin.nix +++ b/pkgs/development/tools/haskell/haskell-language-server/hls-hlint-plugin.nix @@ -10,8 +10,8 @@ mkDerivation { version = "0.1.0.0"; src = fetchgit { url = "https://github.com/haskell/haskell-language-server.git"; - sha256 = "027fq6752024wzzq9izsilm5lkq9gmpxf82rixbimbijw0yk4pwj"; - rev = "372a12e797069dc3ac4fa33dcaabe3b992999d7c"; + sha256 = "0w37792wkq4ys7afgali4jg1kwgkbpk8q0y95fd2j1vgpk0pndlr"; + rev = "6a692de3308c06d8eb7bdf0f7b8a35b6e9a92610"; fetchSubmodules = true; }; postUnpack = "sourceRoot+=/plugins/hls-hlint-plugin; echo source root reset to $sourceRoot"; diff --git a/pkgs/development/tools/haskell/haskell-language-server/hls-retrie-plugin.nix b/pkgs/development/tools/haskell/haskell-language-server/hls-retrie-plugin.nix new file mode 100644 index 000000000000..f1bfe57d6049 --- /dev/null +++ b/pkgs/development/tools/haskell/haskell-language-server/hls-retrie-plugin.nix @@ -0,0 +1,23 @@ +{ mkDerivation, aeson, base, containers, deepseq, directory, extra +, fetchgit, ghc, ghcide, hashable, haskell-lsp, haskell-lsp-types +, hls-plugin-api, retrie, safe-exceptions, shake, stdenv, text +, transformers, unordered-containers +}: +mkDerivation { + pname = "hls-retrie-plugin"; + version = "0.1.0.0"; + src = fetchgit { + url = "https://github.com/haskell/haskell-language-server.git"; + sha256 = "0w37792wkq4ys7afgali4jg1kwgkbpk8q0y95fd2j1vgpk0pndlr"; + rev = "6a692de3308c06d8eb7bdf0f7b8a35b6e9a92610"; + fetchSubmodules = true; + }; + postUnpack = "sourceRoot+=/plugins/hls-retrie-plugin; echo source root reset to $sourceRoot"; + libraryHaskellDepends = [ + aeson base containers deepseq directory extra ghc ghcide hashable + haskell-lsp haskell-lsp-types hls-plugin-api retrie safe-exceptions + shake text transformers unordered-containers + ]; + description = "Retrie integration plugin for 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 index 3d168622fb7d..a1af60a63f5c 100644 --- a/pkgs/development/tools/haskell/haskell-language-server/hls-tactics-plugin.nix +++ b/pkgs/development/tools/haskell/haskell-language-server/hls-tactics-plugin.nix @@ -1,8 +1,8 @@ { 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 +, haskell-lsp, hie-bios, hls-plugin-api, hspec, hspec-discover +, lens, mtl, QuickCheck, refinery, retrie, shake, stdenv, syb, text , transformers }: mkDerivation { @@ -10,8 +10,8 @@ mkDerivation { version = "0.5.1.0"; src = fetchgit { url = "https://github.com/haskell/haskell-language-server.git"; - sha256 = "027fq6752024wzzq9izsilm5lkq9gmpxf82rixbimbijw0yk4pwj"; - rev = "372a12e797069dc3ac4fa33dcaabe3b992999d7c"; + sha256 = "0w37792wkq4ys7afgali4jg1kwgkbpk8q0y95fd2j1vgpk0pndlr"; + rev = "6a692de3308c06d8eb7bdf0f7b8a35b6e9a92610"; fetchSubmodules = true; }; postUnpack = "sourceRoot+=/plugins/tactics; echo source root reset to $sourceRoot"; @@ -25,8 +25,8 @@ mkDerivation { 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"; + testToolDepends = [ hspec-discover ]; + description = "Tactics plugin for Haskell Language Server"; 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 fbd97b5488a8..8e4de49f00d6 100755 --- a/pkgs/development/tools/haskell/haskell-language-server/update.sh +++ b/pkgs/development/tools/haskell/haskell-language-server/update.sh @@ -15,23 +15,6 @@ set -eo pipefail # This is the directory of this update.sh script. script_dir="$( cd "$( dirname "${BASH_SOURCE[0]}" )" >/dev/null 2>&1 && pwd )" -# =========================== -# 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 # =========================== @@ -51,5 +34,7 @@ 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" +cabal2nix --revision "$hls_new_version" --subpath plugins/hls-explicit-imports-plugin "https://github.com/haskell/haskell-language-server.git" > "${script_dir}/hls-explicit-imports-plugin.nix" +cabal2nix --revision "$hls_new_version" --subpath plugins/hls-retrie-plugin "https://github.com/haskell/haskell-language-server.git" > "${script_dir}/hls-retrie-plugin.nix" echo "Finished." -- cgit v1.2.3