Date: Tuesday, June 22, 2021 @ 07:03:24 Author: felixonmars Revision: 966809
upgpkg: haskell-githash 0.1.6.0-4: rebuild with ghc 9.0.1 Added: haskell-githash/trunk/ghc9.patch Modified: haskell-githash/trunk/PKGBUILD ------------+ PKGBUILD | 9 +++++-- ghc9.patch | 69 +++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ 2 files changed, 75 insertions(+), 3 deletions(-) Modified: PKGBUILD =================================================================== --- PKGBUILD 2021-06-22 06:59:49 UTC (rev 966808) +++ PKGBUILD 2021-06-22 07:03:24 UTC (rev 966809) @@ -3,7 +3,7 @@ _hkgname=githash pkgname=haskell-githash pkgver=0.1.6.0 -pkgrel=3 +pkgrel=4 pkgdesc="Some handy Template Haskell splices for including the current git hash and branch in the code of your project" url="https://github.com/snoyberg/githash" license=('BSD') @@ -10,11 +10,14 @@ arch=('x86_64') depends=('ghc-libs' 'git') makedepends=('ghc' 'haskell-hpack' 'haskell-hspec' 'haskell-temporary' 'haskell-unliftio') -source=("git+https://github.com/snoyberg/githash.git#tag=githash-$pkgver") -sha512sums=('SKIP') +source=("git+https://github.com/snoyberg/githash.git#tag=githash-$pkgver" + ghc9.patch) +sha512sums=('SKIP' + 'a3ae967a52cb0e110310e6d13cbbf0275e145c1e437a59378a15e270ebe14569a6513e3a6cdfc0f24d1fdf40207a50584a73f8310db774720810264638054ea6') prepare() { cd $_hkgname + patch -p1 -i ../ghc9.patch hpack } Added: ghc9.patch =================================================================== --- ghc9.patch (rev 0) +++ ghc9.patch 2021-06-22 07:03:24 UTC (rev 966809) @@ -0,0 +1,69 @@ +commit 23bf04593610702813dd8f266aff218197c0506e +Author: Felix Yan <[email protected]> +Date: Tue Jun 22 15:00:01 2021 +0800 + + Add support for template-haskell 2.17 + + Builds fine and all tests pass. + +diff --git a/package.yaml b/package.yaml +index 6d211e4..293d19f 100644 +--- a/package.yaml ++++ b/package.yaml +@@ -18,6 +18,7 @@ dependencies: + - directory + - filepath + - template-haskell ++- th-compat + - process + + library: +diff --git a/src/GitHash.hs b/src/GitHash.hs +index 5167a91..d1beb5f 100644 +--- a/src/GitHash.hs ++++ b/src/GitHash.hs +@@ -65,6 +65,7 @@ import qualified Data.ByteString.Char8 as B8 + import Data.Typeable (Typeable) + import Language.Haskell.TH + import Language.Haskell.TH.Syntax ++import Language.Haskell.TH.Syntax.Compat + import System.Directory + import System.Exit + import System.FilePath +@@ -256,8 +257,8 @@ instance Exception GitHashException + -- directory. Compilation fails if no info is available. + -- + -- @since 0.1.0.0 +-tGitInfo :: FilePath -> Q (TExp GitInfo) +-tGitInfo fp = unsafeTExpCoerce $ do ++tGitInfo :: FilePath -> SpliceQ GitInfo ++tGitInfo fp = unsafeSpliceCoerce $ do + gi <- runIO $ + getGitRoot fp >>= + either throwIO return >>= +@@ -270,8 +271,8 @@ tGitInfo fp = unsafeTExpCoerce $ do + -- directory. + -- + -- @since 0.1.2.0 +-tGitInfoTry :: FilePath -> Q (TExp (Either String GitInfo)) +-tGitInfoTry fp = unsafeTExpCoerce $ do ++tGitInfoTry :: FilePath -> SpliceQ (Either String GitInfo) ++tGitInfoTry fp = unsafeSpliceCoerce $ do + egi <- runIO $ do + eroot <- getGitRoot fp + case eroot of +@@ -290,12 +291,12 @@ tGitInfoTry fp = unsafeTExpCoerce $ do + -- working directory. + -- + -- @since 0.1.0.0 +-tGitInfoCwd :: Q (TExp GitInfo) ++tGitInfoCwd :: SpliceQ GitInfo + tGitInfoCwd = tGitInfo "." + + -- | Try to load up the 'GitInfo' value at compile time for the current + -- working directory. + -- + -- @since 0.1.2.0 +-tGitInfoCwdTry :: Q (TExp (Either String GitInfo)) ++tGitInfoCwdTry :: SpliceQ (Either String GitInfo) + tGitInfoCwdTry = tGitInfoTry "."
