1 # Maintainer: Felix Yan <felixonmars@archlinux.org>
4 pkgname=haskell-lsp-test
7 pkgdesc="Functional test framework for LSP servers."
8 url="https://github.com/haskell/lsp/blob/master/lsp-test/README.md"
11 depends=('ghc-libs' 'haskell-diff' 'haskell-glob' 'haskell-aeson' 'haskell-aeson-pretty'
12 'haskell-ansi-terminal' 'haskell-async' 'haskell-co-log-core' 'haskell-conduit'
13 'haskell-conduit-parse' 'haskell-data-default' 'haskell-lens' 'haskell-lsp'
14 'haskell-lsp-types' 'haskell-parser-combinators' 'haskell-some' 'haskell-unliftio'
15 'haskell-unordered-containers')
16 makedepends=('ghc' 'uusi' 'haskell-hspec')
17 source=("https://hackage.haskell.org/packages/archive/$_hkgname/$pkgver/$_hkgname-$pkgver.tar.gz")
18 sha512sums=('2b4ba5c8d8cfcad3f1edb8fc410078cb483e6a837023fe2746b1188f485b849d24840d9ad1cfaa06a3cee1fa41e53516d8f7fd867494cf5f1f8d3464c784c2fe')
28 runhaskell Setup configure -O --enable-shared --enable-executable-dynamic --disable-library-vanilla \
29 --prefix=/usr --docdir=/usr/share/doc/$pkgname --datasubdir=$pkgname --enable-tests \
30 --dynlibdir=/usr/lib --libsubdir=\$compiler/site-local/\$pkgid --ghc-option=-fllvm \
31 --ghc-option=-optl-Wl\,-z\,relro\,-z\,now \
34 runhaskell Setup build $MAKEFLAGS
35 runhaskell Setup register --gen-script
36 runhaskell Setup unregister --gen-script
37 sed -i -r -e "s|ghc-pkg.*update[^ ]* |&'--force' |" register.sh
38 sed -i -r -e "s|ghc-pkg.*unregister[^ ]* |&'--force' |" unregister.sh
43 runhaskell Setup test --show-details=direct
49 install -D -m744 register.sh "$pkgdir"/usr/share/haskell/register/$pkgname.sh
50 install -D -m744 unregister.sh "$pkgdir"/usr/share/haskell/unregister/$pkgname.sh
51 runhaskell Setup copy --destdir="$pkgdir"
52 install -D -m644 LICENSE -t "$pkgdir"/usr/share/licenses/$pkgname/
53 rm -f "$pkgdir"/usr/share/doc/$pkgname/LICENSE