haskellPackages.haskell-language-server: Fix build
In preparation of the upcoming 0.6.0 release I wanted to fix hls. It introduces two new plugin packages, which are not on hackage yet. I remove apply-refact overrides, because current apply-refact versions are compatible with all ghcs we support, according to their changelog. I override more of the hls dependencies globally on the whole package set, to avoid a lot of duplicate compilations. And because @peti changed my mind about this being a good practice. hls now uses a released version of ghcide
This commit is contained in:
committed by
Peter Simons
parent
becd5f5bc3
commit
bf29c147c3
@@ -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.5.1.0";
|
||||
src = fetchgit {
|
||||
url = "https://github.com/haskell/haskell-language-server.git";
|
||||
sha256 = "1qi762fa72487i8fspxmr8xizm9n2s1shxsvnvsl67vj9if573r9";
|
||||
rev = "3ca2a6cd267f373aae19f59e1cf9e04b6524eff3";
|
||||
sha256 = "1w15p988a5h11fcp25lllaj7j78f35gzg5bixy1vs7ld0p6jj7n9";
|
||||
rev = "8682517e9ff92caa35e727e28445896f97c61e8d";
|
||||
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
|
||||
|
||||
@@ -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;
|
||||
}
|
||||
@@ -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 = "1w15p988a5h11fcp25lllaj7j78f35gzg5bixy1vs7ld0p6jj7n9";
|
||||
rev = "8682517e9ff92caa35e727e28445896f97c61e8d";
|
||||
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;
|
||||
}
|
||||
@@ -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 = "1w15p988a5h11fcp25lllaj7j78f35gzg5bixy1vs7ld0p6jj7n9";
|
||||
rev = "8682517e9ff92caa35e727e28445896f97c61e8d";
|
||||
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;
|
||||
}
|
||||
@@ -15,24 +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 )"
|
||||
|
||||
# ===========================
|
||||
# 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."
|
||||
|
||||
Reference in New Issue
Block a user