[arch-commits] Commit in haskell-lsp-types/repos (3 files)

Felix Yan felixonmars at gemini.archlinux.org
Wed Sep 15 10:24:09 UTC 2021


    Date: Wednesday, September 15, 2021 @ 10:24:09
  Author: felixonmars
Revision: 1015443

archrelease: copy trunk to community-staging-x86_64

Added:
  haskell-lsp-types/repos/community-staging-x86_64/
  haskell-lsp-types/repos/community-staging-x86_64/PKGBUILD
    (from rev 1015442, haskell-lsp-types/trunk/PKGBUILD)
  haskell-lsp-types/repos/community-staging-x86_64/ghc9.patch
    (from rev 1015442, haskell-lsp-types/trunk/ghc9.patch)

------------+
 PKGBUILD   |   51 +++++++++++++++++++++++++++++++++
 ghc9.patch |   89 +++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
 2 files changed, 140 insertions(+)

Copied: haskell-lsp-types/repos/community-staging-x86_64/PKGBUILD (from rev 1015442, haskell-lsp-types/trunk/PKGBUILD)
===================================================================
--- community-staging-x86_64/PKGBUILD	                        (rev 0)
+++ community-staging-x86_64/PKGBUILD	2021-09-15 10:24:09 UTC (rev 1015443)
@@ -0,0 +1,51 @@
+# Maintainer: Felix Yan <felixonmars at archlinux.org>
+
+_hkgname=lsp-types
+pkgname=haskell-lsp-types
+pkgver=1.2.0.0
+pkgrel=35
+pkgdesc="Haskell library for the Microsoft Language Server Protocol, data types"
+url="https://github.com/haskell/lsp"
+license=("MIT")
+arch=('x86_64')
+depends=('ghc-libs' 'haskell-aeson' 'haskell-data-default' 'haskell-dependent-sum'
+         'haskell-dependent-sum-template' 'haskell-hashable' 'haskell-hslogger' 'haskell-lens'
+         'haskell-network-uri' 'haskell-rope-utf16-splay' 'haskell-scientific' 'haskell-some'
+         'haskell-temporary' 'haskell-unordered-containers')
+makedepends=('ghc' 'uusi')
+source=("https://hackage.haskell.org/packages/archive/$_hkgname/$pkgver/$_hkgname-$pkgver.tar.gz"
+        ghc9.patch)
+sha512sums=('c413f16dac35e7096e439cf7e1b8ec8f1c80b0a7dfea681512ff1dccf9e1d8a436bab38ce2c6ab15a584a5ebceebd96a85a5694ef30889df6275163843cef18a'
+            '9e1ae0c72dba23b7065bc82e412392427aeba8a0cf2ec514b1918570d03f038c42c3dc2d0e23dc9e9efb081238e11c7f82083ee03b6625b683ae257f776c08a5')
+
+prepare() {
+  cd $_hkgname-$pkgver
+  gen-setup
+  patch -p2 -i ../ghc9.patch
+}
+
+build() {
+  cd $_hkgname-$pkgver
+
+  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 $MAKEFLAGS
+  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
+}
+
+package() {
+  cd $_hkgname-$pkgver
+
+  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
+}

Copied: haskell-lsp-types/repos/community-staging-x86_64/ghc9.patch (from rev 1015442, haskell-lsp-types/trunk/ghc9.patch)
===================================================================
--- community-staging-x86_64/ghc9.patch	                        (rev 0)
+++ community-staging-x86_64/ghc9.patch	2021-09-15 10:24:09 UTC (rev 1015443)
@@ -0,0 +1,89 @@
+From 8f499cec4148da2295f214bac44fe6a2ed8eea55 Mon Sep 17 00:00:00 2001
+From: =?UTF-8?q?Andreas=20K=C3=A4llberg?= <anka.213 at gmail.com>
+Date: Tue, 30 Mar 2021 10:58:50 +0800
+Subject: [PATCH] Shuffle around TH lines, since ghc-9 seems to have stricter
+ staging rules
+
+---
+ lsp-types/lsp-types.cabal                        | 2 +-
+ lsp-types/src/Language/LSP/Types/Method.hs       | 3 ++-
+ lsp-types/src/Language/LSP/Types/TextDocument.hs | 4 ++--
+ lsp-types/src/Language/LSP/Types/WatchedFiles.hs | 5 ++---
+ lsp/lsp.cabal                                    | 2 +-
+ 5 files changed, 8 insertions(+), 8 deletions(-)
+
+diff --git a/lsp-types/lsp-types.cabal b/lsp-types/lsp-types.cabal
+index 36a383c3..55020743 100644
+--- a/lsp-types/lsp-types.cabal
++++ b/lsp-types/lsp-types.cabal
+@@ -69,7 +69,7 @@ library
+                      , Language.LSP.Types.WorkspaceSymbol
+  -- other-extensions:
+   ghc-options:         -Wall
+-  build-depends:       base >= 4.11 && < 4.15
++  build-depends:       base >= 4.11 && < 4.16
+                      , aeson >=1.2.2.0
+                      , binary
+                      , bytestring
+diff --git a/lsp-types/src/Language/LSP/Types/Method.hs b/lsp-types/src/Language/LSP/Types/Method.hs
+index 89462f5a..90897283 100644
+--- a/lsp-types/src/Language/LSP/Types/Method.hs
++++ b/lsp-types/src/Language/LSP/Types/Method.hs
+@@ -312,7 +312,6 @@ instance A.FromJSON SomeServerMethod where
+   parseJSON _                                                = fail "SomeServerMethod"
+ 
+ -- instance FromJSON (SMethod m)
+-makeSingletonFromJSON 'SomeMethod ''SMethod
+ 
+ -- ---------------------------------------------------------------------
+ -- TO JSON
+@@ -396,3 +395,5 @@ instance A.ToJSON (SMethod m) where
+   toJSON SCancelRequest                      = A.String "$/cancelRequest"
+ -- Custom
+   toJSON (SCustomMethod m)                   = A.String m
++
++makeSingletonFromJSON 'SomeMethod ''SMethod
+diff --git a/lsp-types/src/Language/LSP/Types/TextDocument.hs b/lsp-types/src/Language/LSP/Types/TextDocument.hs
+index 465377a7..b3d7d051 100644
+--- a/lsp-types/src/Language/LSP/Types/TextDocument.hs
++++ b/lsp-types/src/Language/LSP/Types/TextDocument.hs
+@@ -84,6 +84,7 @@ data SaveOptions =
+   { -- | The client is supposed to include the content on save.
+     _includeText :: Maybe Bool
+   } deriving (Show, Read, Eq)
++deriveJSON lspOptions ''SaveOptions
+ 
+ -- -------------------------------------
+ 
+@@ -234,7 +235,6 @@ deriveJSON lspOptions ''WillSaveTextDocumentParams
+ 
+ -- -------------------------------------
+ 
+-deriveJSON lspOptions ''SaveOptions
+ 
+ makeExtendingDatatype "TextDocumentSaveRegistrationOptions"
+   [''TextDocumentRegistrationOptions]
+diff --git a/lsp-types/src/Language/LSP/Types/WatchedFiles.hs b/lsp-types/src/Language/LSP/Types/WatchedFiles.hs
+index 74d26526..38a16bf6 100644
+--- a/lsp-types/src/Language/LSP/Types/WatchedFiles.hs
++++ b/lsp-types/src/Language/LSP/Types/WatchedFiles.hs
+@@ -2,7 +2,7 @@
+ {-# LANGUAGE DuplicateRecordFields #-}
+ 
+ module Language.LSP.Types.WatchedFiles where
+-  
++
+ import Data.Aeson
+ import Data.Aeson.TH
+ import Data.Bits
+@@ -71,9 +71,8 @@ instance FromJSON WatchKind where
+     | otherwise = fail "WatchKind"
+   parseJSON _            = fail "WatchKind"
+ 
+-deriveJSON lspOptions ''DidChangeWatchedFilesRegistrationOptions
+ deriveJSON lspOptions ''FileSystemWatcher
+-
++deriveJSON lspOptions ''DidChangeWatchedFilesRegistrationOptions
+ -- | The file event type.
+ data FileChangeType = FcCreated -- ^ The file got created.
+                     | FcChanged -- ^ The file got changed.



More information about the arch-commits mailing list