summarylogtreecommitdiffstats
path: root/PKGBUILD
blob: 77da5c112a5b25473e1c5b86a51bc2e9ded0eb8a (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
# Maintainer: Poscat <poscat@mail.poscat.moe>

pkgname=haskell-language-server-git
pkgver=r77.80bc2e8
pkgrel=1
pkgdesc="Integration point for ghcide and haskell-ide-engine."
arch=('x86_64' 'aarch64')
url="https://github.com/haskell/haskell-language-server"
license=('Apache')
provides=('haskell-language-server')
makedepends=('stack' 'git')
source=(${pkgname}::git+https://github.com/haskell/haskell-language-server.git)
md5sums=('SKIP')

pkgver() {
  cd "${srcdir}/${pkgname}"
  printf "r%s.%s" "$(git rev-list --count HEAD)" "$(git rev-parse --short HEAD)"
}

prepare() {
  cd "${srcdir}/${pkgname}"
  git submodule update --init --recursive
}

build() {
  cd "${srcdir}/${pkgname}"
  stack build --stack-yaml=stack-8.8.2.yaml
}

package() {
  cd "${srcdir}/${pkgname}"
  install -D -m 644 LICENSE "${pkgdir}/usr/share/licenses/${pkgname}/LICENSE"
  stack --local-bin-path "${pkgdir}/usr/bin/" install
}