[arch-commits] Commit in (4 files)

Felix Yan felixonmars at archlinux.org
Mon Jun 14 17:14:31 UTC 2021


    Date: Monday, June 14, 2021 @ 17:14:31
  Author: felixonmars
Revision: 963488

addpkg: haskell-hls-refine-imports-plugin 1.0.0.0-1

Added:
  haskell-hls-refine-imports-plugin/
  haskell-hls-refine-imports-plugin/repos/
  haskell-hls-refine-imports-plugin/trunk/
  haskell-hls-refine-imports-plugin/trunk/PKGBUILD

----------+
 PKGBUILD |   55 +++++++++++++++++++++++++++++++++++++++++++++++++++++++
 1 file changed, 55 insertions(+)

Added: haskell-hls-refine-imports-plugin/trunk/PKGBUILD
===================================================================
--- haskell-hls-refine-imports-plugin/trunk/PKGBUILD	                        (rev 0)
+++ haskell-hls-refine-imports-plugin/trunk/PKGBUILD	2021-06-14 17:14:31 UTC (rev 963488)
@@ -0,0 +1,55 @@
+# Maintainer: Felix Yan <felixonmars at archlinux.org>
+
+_hkgname=hls-refine-imports-plugin
+pkgname=haskell-hls-refine-imports-plugin
+pkgver=1.0.0.0
+pkgrel=1
+pkgdesc="Refine imports plugin for Haskell Language Server"
+url="https://hackage.haskell.org/package/hls-refine-imports-plugin"
+license=("Apache")
+arch=('x86_64')
+depends=('ghc-libs' 'haskell-aeson' 'haskell-ghc' 'haskell-ghcide'
+         'haskell-hls-explicit-imports-plugin' 'haskell-hls-graph' 'haskell-hls-plugin-api'
+         'haskell-lsp' 'haskell-unordered-containers')
+makedepends=('ghc' 'uusi' 'haskell-hls-test-utils')
+checkdepends=('git')
+# https://github.com/haskell/haskell-language-server/pull/1922
+#source=("https://hackage.haskell.org/packages/archive/$_hkgname/$pkgver/$_hkgname-$pkgver.tar.gz")
+source=("https://github.com/haskell/haskell-language-server/archive/1.2.0/haskell-language-server-1.2.0.tar.gz")
+sha256sums=('8931fd95bf28300d3f18675b0f03aac9bda172becb67eaa8ef1f62e6d1c6238e')
+
+prepare() {
+  cd haskell-language-server-1.2.0/plugins/$_hkgname
+  gen-setup
+}
+
+build() {
+  cd haskell-language-server-1.2.0/plugins/$_hkgname
+
+  runhaskell Setup configure -O --enable-shared --enable-executable-dynamic --disable-library-vanilla \
+    --prefix=/usr --docdir=/usr/share/doc/$pkgname --enable-tests \
+    --dynlibdir=/usr/lib --libsubdir=\$compiler/site-local/\$pkgid \
+    --ghc-option=-optl-Wl\,-z\,relro\,-z\,now \
+    --ghc-option='-pie'
+
+  runhaskell Setup build
+  runhaskell Setup register --gen-script
+  runhaskell Setup unregister --gen-script
+  sed -i -r -e "s|ghc-pkg.*update[^ ]* |&'--force' |" register.sh
+  sed -i -r -e "s|ghc-pkg.*unregister[^ ]* |&'--force' |" unregister.sh
+}
+
+check() {
+  cd haskell-language-server-1.2.0/plugins/$_hkgname
+  runhaskell Setup test
+}
+
+package() {
+  cd haskell-language-server-1.2.0/plugins/$_hkgname
+
+  install -D -m744 register.sh "$pkgdir"/usr/share/haskell/register/$pkgname.sh
+  install -D -m744 unregister.sh "$pkgdir"/usr/share/haskell/unregister/$pkgname.sh
+  runhaskell Setup copy --destdir="$pkgdir"
+  install -D -m644 LICENSE -t "$pkgdir"/usr/share/licenses/$pkgname/
+  rm -f "$pkgdir"/usr/share/doc/$pkgname/LICENSE
+}



More information about the arch-commits mailing list