Package Details: haskell-language-server-static 1.7.0.0-1

Git Clone URL: https://aur.archlinux.org/haskell-language-server-static.git (read-only, click to copy)
Package Base: haskell-language-server-static
Description: Official haskell ide support via language server (LSP). Successor of ghcide & haskell-ide-engine.
Upstream URL: https://github.com/haskell/haskell-language-server
Keywords: haskell
Licenses: Apache
Conflicts: haskell-language-server, haskell-language-server-git
Provides: haskell-language-server
Submitter: carbolymer
Maintainer: carbolymer (mrzeznicki)
Last Packager: mrzeznicki
Votes: 7
Popularity: 0.80
First Submitted: 2021-10-06 06:35 (UTC)
Last Updated: 2022-05-05 18:00 (UTC)

Latest Comments

mrzeznicki commented on 2022-05-08 11:54 (UTC)

If you happen to use 9.0.2 GHC and get the GHC ABIs don't match error - this is a known bug, use this as a workaround: https://github.com/haskell/vscode-haskell#ghc-abis-dont-match

mrzeznicki commented on 2022-05-05 18:27 (UTC)

Thanks to @carbolymer I will be co-maintaining this package. With the release of 1.7.0.0, many things have changed in the way haskell-language-server is built and distributed. Binaries are now dynamically linked and checked at runtime to match the GHC ABI used in the project. Therefore, we provide distribution of prebuilt binaries for UnknownLinux (identical to fedora27 version; suitable for Arch) linked in a way suitable for Stack/Cabal projects using a supported GHC version (this means that if you use Stack to download GHC for you, hls should be available for projects using local GHC. Or, if you installed your GHC via ghcup or official downloads, hls should also work fine). If in doubt, run HLS_WRAPPER_DEBUG=1 haskell-language-server-wrapper typecheck in your project directory to see what it is trying to do. Feel free to report any packaging related errors here.

mrzeznicki commented on 2022-05-01 21:58 (UTC)

With 1.7.0.0 HLS changed the way they build and distribute binaries. Executables are not now completely static, but are dynamically linked to match the GHC version. Long story short, I have success using the following PKGBUILD:

# Maintainer: Marcin Rzeźnicki <marcin.rzeznicki@gmail.com>

pkgname=haskell-language-server-bin
pkgver=1.7.0.0
pkgrel=1
pkgdesc="Official haskell ide support via language server (LSP). Successor of ghcide & haskell-ide-engine."
arch=('x86_64')
url='https://github.com/haskell/haskell-language-server'
license=('Apache')
depends=('sh' 'zlib' 'gmp')
provides=('haskell-language-server')
conflicts=('haskell-language-server' 'haskell-language-server-git')
replaces=('haskell-language-server-static')
source=("https://downloads.haskell.org/~hls/haskell-language-server-${pkgver}/haskell-language-server-${pkgver}-${arch}-linux-fedora27.tar.xz")
sha512sums=('7d50282ba7253d548998b8bc364a8cc6cec0accfbc0cfba3d7a6be903c16a81b8ed0baeb346fb72c176ca6f39edde3a3f61290aa3aaa2acc9f9c43d0e7e51b67')
options=(!strip)

package() {
  cd "${srcdir}/haskell-language-server-${pkgver}"
  make DESTDIR="$pkgdir/" PREFIX="/usr" install
}

This changes the package name etc. for my own purposes, but you may adapt it to this package if you want to maintain it further (I am not sure if -static is the correct name now though, but, well ...). I tested the resulting binaries with stack and various projects and they seem to work. Of course, there are some combinations I have not tested e.g. using it with Arch's GHC but I don't think many people use it.

mrzeznicki commented on 2021-10-08 16:26 (UTC)

Thanks for taking over! I'll open a PR to HLS to update their documentation to point to this package as an installation method on Arch. Thank you!

carbolymer commented on 2021-10-08 14:30 (UTC)

@mrzeznicki yes. Well, not suddenly. My orphan request got rejected by @polyzen with comment stating that haskell-language-server-bin is a duplicate of existing package, and it will be deleted. Well, this package name states more clearly that HLS is built statically. I've applied patch with the new version update from you. Thanks for submitting it there.

mrzeznicki commented on 2021-10-08 14:03 (UTC)

Is this a successor to haskell-language-server-bin which suddenly vanished from AUR?