[arch-commits] Commit in haskell-th-env/trunk (PKGBUILD ghc9.patch)
Felix Yan
felixonmars at archlinux.org
Sun Jun 20 07:00:28 UTC 2021
Date: Sunday, June 20, 2021 @ 07:00:28
Author: felixonmars
Revision: 965829
upgpkg: haskell-th-env 0.1.0.2-39: rebuild with ghc 9.0.1
Added:
haskell-th-env/trunk/ghc9.patch
Modified:
haskell-th-env/trunk/PKGBUILD
------------+
PKGBUILD | 15 +++++++++++----
ghc9.patch | 25 +++++++++++++++++++++++++
2 files changed, 36 insertions(+), 4 deletions(-)
Modified: PKGBUILD
===================================================================
--- PKGBUILD 2021-06-20 05:28:03 UTC (rev 965828)
+++ PKGBUILD 2021-06-20 07:00:28 UTC (rev 965829)
@@ -3,16 +3,23 @@
_hkgname=th-env
pkgname=haskell-th-env
pkgver=0.1.0.2
-pkgrel=38
+pkgrel=39
pkgdesc="Template Haskell splice that expands to an environment variable"
url="https://github.com/dzhus/th-env#readme"
license=("BSD")
arch=('x86_64')
-depends=('ghc-libs')
+depends=('ghc-libs' 'haskell-th-compat')
makedepends=('ghc' 'haskell-markdown-unlit')
-source=("https://hackage.haskell.org/packages/archive/$_hkgname/$pkgver/$_hkgname-$pkgver.tar.gz")
-sha256sums=('c0d29be2104dd0964f534637841b8ceb665d594b02318062aa4a245ccb353a8f')
+source=("https://hackage.haskell.org/packages/archive/$_hkgname/$pkgver/$_hkgname-$pkgver.tar.gz"
+ ghc9.patch)
+sha256sums=('c0d29be2104dd0964f534637841b8ceb665d594b02318062aa4a245ccb353a8f'
+ '67f0ed6d9e5e84e81f679fbb394aeb7ac04b1a4a8de9ddb3ad37455bd74a6cf0')
+prepare() {
+ patch -d $_hkgname-$pkgver -p1 < ghc9.patch
+ sed -i '/template-haskell/a \ , th-compat' $_hkgname-$pkgver/$_hkgname.cabal
+}
+
build() {
cd $_hkgname-$pkgver
Added: ghc9.patch
===================================================================
--- ghc9.patch (rev 0)
+++ ghc9.patch 2021-06-20 07:00:28 UTC (rev 965829)
@@ -0,0 +1,25 @@
+diff --git a/src/Language/Haskell/TH/Env.hs b/src/Language/Haskell/TH/Env.hs
+index 38859e2..62c88fe 100644
+--- a/src/Language/Haskell/TH/Env.hs
++++ b/src/Language/Haskell/TH/Env.hs
+@@ -8,6 +8,7 @@ where
+
+ import Data.String
+ import Language.Haskell.TH
++import Language.Haskell.TH.Syntax.Compat
+ import System.Environment
+
+ -- | Produce a typed expression with the current value of an
+@@ -15,8 +16,8 @@ import System.Environment
+ envQ :: IsString a
+ => String
+ -- ^ Environment variable name.
+- -> TExpQ (Maybe a)
+-envQ name =
++ -> SpliceQ (Maybe a)
++envQ name = liftSplice $
+ runIO (lookupEnv name) >>= \case
+- Just v -> [|| Just (fromString v) ||]
+- Nothing -> [|| Nothing ||]
++ Just v -> fromCode $ toCode [|| Just (fromString v) ||]
++ Nothing -> fromCode $ toCode [|| Nothing ||]
More information about the arch-commits
mailing list