[arch-commits] Commit in haskell-persistent-qq/trunk (PKGBUILD persistent-2.11.patch)

Felix Yan felixonmars at archlinux.org
Thu Nov 19 16:57:54 UTC 2020


    Date: Thursday, November 19, 2020 @ 16:57:53
  Author: felixonmars
Revision: 757627

upgpkg: haskell-persistent-qq 2.9.2-28: rebuild with persistent 2.11.0.0, persistent-sqlite 2.11.0.0, persistent-template 2.9.1.0, persistent-test 2.0.3.4

Added:
  haskell-persistent-qq/trunk/persistent-2.11.patch
Modified:
  haskell-persistent-qq/trunk/PKGBUILD

-----------------------+
 PKGBUILD              |   14 +++++++++++---
 persistent-2.11.patch |   27 +++++++++++++++++++++++++++
 2 files changed, 38 insertions(+), 3 deletions(-)

Modified: PKGBUILD
===================================================================
--- PKGBUILD	2020-11-19 16:54:02 UTC (rev 757626)
+++ PKGBUILD	2020-11-19 16:57:53 UTC (rev 757627)
@@ -3,7 +3,7 @@
 _hkgname=persistent-qq
 pkgname=haskell-persistent-qq
 pkgver=2.9.2
-pkgrel=27
+pkgrel=28
 pkgdesc="Provides a quasi-quoter for raw SQL for persistent"
 url="https://github.com/yesod-web/persistent"
 license=('MIT')
@@ -12,9 +12,17 @@
 makedepends=('ghc' 'haskell-aeson' 'haskell-fast-logger' 'haskell-hspec' 'haskell-hunit'
              'haskell-monad-logger' 'haskell-persistent-sqlite' 'haskell-persistent-template'
              'haskell-resourcet' 'haskell-unliftio')
-source=(https://hackage.haskell.org/packages/archive/${_hkgname}/${pkgver}/${_hkgname}-${pkgver}.tar.gz)
-sha512sums=('48d6783abf366b327e68e5a1619585c056836885e552b6596eda056cf7758a8b426c3cf27ac7c67cb772bd482de9afbe7365b7647bbf31c529089810b5d5dd97')
+source=(https://hackage.haskell.org/packages/archive/${_hkgname}/${pkgver}/${_hkgname}-${pkgver}.tar.gz
+        persistent-2.11.patch)
+sha512sums=('48d6783abf366b327e68e5a1619585c056836885e552b6596eda056cf7758a8b426c3cf27ac7c67cb772bd482de9afbe7365b7647bbf31c529089810b5d5dd97'
+            '9f628d9119daa4a20fedc7ba8422b019bc7c9eb22fd8854c27dc0e61ea14bbb75bf0ff9d8cd9018d79878571ec6e53f3898d874ed26616e675c4dff421c29fa4')
 
+prepare() {
+    cd $_hkgname-$pkgver
+    patch -p2 -i ../persistent-2.11.patch
+    sed -i '/LANGUAGE FlexibleContexts/a {-# LANGUAGE DataKinds #-}' test/PersistentTestModels.hs
+}
+
 build() {
     cd $_hkgname-$pkgver
 

Added: persistent-2.11.patch
===================================================================
--- persistent-2.11.patch	                        (rev 0)
+++ persistent-2.11.patch	2020-11-19 16:57:53 UTC (rev 757627)
@@ -0,0 +1,27 @@
+diff --git a/persistent-qq/test/PersistentTestModels.hs b/persistent-qq/test/PersistentTestModels.hs
+index 53256dd5..da333603 100644
+--- a/persistent-qq/test/PersistentTestModels.hs
++++ b/persistent-qq/test/PersistentTestModels.hs
+@@ -15,6 +15,7 @@ module PersistentTestModels where
+ import Control.Monad.Reader
+ import Data.Aeson
+ import Data.Text (Text)
++import Data.Proxy
+ 
+ import Database.Persist.Sql
+ import Database.Persist.TH
+@@ -140,9 +141,11 @@ instance (PersistEntity a) => PersistEntity (ReverseFieldOrder a) where
+     keyFromValues = fmap RFOKey . fromPersistValue . head
+     keyToValues   = (:[]) . toPersistValue . unRFOKey
+ 
+-    entityDef = revFields . entityDef . liftM unRFO
+-        where
+-          revFields ed = ed { entityFields = reverse (entityFields ed) }
++    entityDef = revFields . entityDef . unRfoProxy
++      where
++        revFields ed = ed { entityFields = reverse (entityFields ed) }
++        unRfoProxy :: proxy (ReverseFieldOrder a) -> Proxy a
++        unRfoProxy _ = Proxy
+ 
+     toPersistFields = reverse . toPersistFields . unRFO
+     newtype EntityField (ReverseFieldOrder a) b = EFRFO {unEFRFO :: EntityField a b}



More information about the arch-commits mailing list