[arch-commits] Commit in haskell-esqueleto/trunk (PKGBUILD persistent-2.5.patch)
Felix Yan
fyan at archlinux.org
Fri Jun 10 05:42:21 UTC 2016
Date: Friday, June 10, 2016 @ 07:42:21
Author: fyan
Revision: 179043
upgpkg: haskell-esqueleto 2.4.3-24
rebuild with persistent-2.5, http-api-data-0.2.3, microlens-0.4.4.1, monads-tf-0.1.0.3, persistent-sqlite-2.5.0.2, persistent-template-2.5.1.3, unordered-containers-0.2.7.1, yaml-0.8.17.2
Added:
haskell-esqueleto/trunk/persistent-2.5.patch
Modified:
haskell-esqueleto/trunk/PKGBUILD
----------------------+
PKGBUILD | 11 +++-
persistent-2.5.patch | 119 +++++++++++++++++++++++++++++++++++++++++++++++++
2 files changed, 127 insertions(+), 3 deletions(-)
Modified: PKGBUILD
===================================================================
--- PKGBUILD 2016-06-10 05:42:06 UTC (rev 179042)
+++ PKGBUILD 2016-06-10 05:42:21 UTC (rev 179043)
@@ -5,7 +5,7 @@
_hkgname=esqueleto
pkgname=haskell-esqueleto
pkgver=2.4.3
-pkgrel=23
+pkgrel=24
pkgdesc="Type-safe EDSL for SQL queries on persistent backends."
url="https://github.com/prowdsponsor/esqueleto"
license=("custom:BSD3")
@@ -13,10 +13,15 @@
depends=("ghc=8.0.1" "haskell-blaze-html" "haskell-conduit" "haskell-monad-logger"
"haskell-persistent" "haskell-resourcet" "haskell-tagged" "haskell-text"
"haskell-unordered-containers")
-source=("http://hackage.haskell.org/packages/archive/${_hkgname}/${pkgver}/${_hkgname}-${pkgver}.tar.gz")
-sha256sums=('bf555cfb40519ed1573f7bb90c65f693b9639dfa93fc2222230d3ded6e897434')
+source=("http://hackage.haskell.org/packages/archive/${_hkgname}/${pkgver}/${_hkgname}-${pkgver}.tar.gz"
+ persistent-2.5.patch)
+sha256sums=('bf555cfb40519ed1573f7bb90c65f693b9639dfa93fc2222230d3ded6e897434'
+ '101534ae4db348978b427a5a5b06a51765a680c4c8ae038ce283214fcd44f9e4')
prepare() {
+ # https://github.com/prowdsponsor/esqueleto/pull/139
+ (cd $_hkgname-$pkgver && patch -p1 -i ../persistent-2.5.patch)
+
sed -i 's/base >= 4.5 && < 4.9/base >= 4.5 \&\& < 4.10/' ${_hkgname}-${pkgver}/${_hkgname}.cabal
}
Added: persistent-2.5.patch
===================================================================
--- persistent-2.5.patch (rev 0)
+++ persistent-2.5.patch 2016-06-10 05:42:21 UTC (rev 179043)
@@ -0,0 +1,119 @@
+From 811f3722818b56ae5a4fb4601a2a772532201571 Mon Sep 17 00:00:00 2001
+From: Hao Lian <hi at haolian.org>
+Date: Mon, 2 May 2016 13:19:33 -0400
+Subject: [PATCH] upgrade to persistent 2.5
+
+---
+ esqueleto.cabal | 10 +++++-----
+ src/Database/Esqueleto.hs | 21 +++++++++++++++------
+ src/Database/Esqueleto/Internal/PersistentImport.hs | 2 +-
+ stack.yaml | 16 +++++++++++++++-
+ test/Test.hs | 5 +++--
+ 5 files changed, 39 insertions(+), 15 deletions(-)
+
+diff --git a/esqueleto.cabal b/esqueleto.cabal
+index 65aa237..6494349 100644
+--- a/esqueleto.cabal
++++ b/esqueleto.cabal
+@@ -66,7 +66,7 @@ library
+ base >= 4.5 && < 4.9
+ , bytestring
+ , text >= 0.11 && < 1.3
+- , persistent >= 2.1.1.7 && < 2.3
++ , persistent >= 2.5 && < 2.6
+ , transformers >= 0.2
+ , unordered-containers >= 0.2
+ , tagged >= 0.2
+@@ -94,8 +94,8 @@ test-suite test
+ , HUnit
+ , QuickCheck
+ , hspec >= 1.8
+- , persistent-sqlite >= 2.1
+- , persistent-template >= 2.1
++ , persistent-sqlite >= 2.5
++ , persistent-template >= 2.5
+ , monad-control
+ , monad-logger >= 0.3
+
+@@ -106,7 +106,7 @@ test-suite test
+ build-depends:
+ postgresql-simple >= 0.2
+ , postgresql-libpq >= 0.6
+- , persistent-postgresql >= 2.0
++ , persistent-postgresql >= 2.5
+
+ cpp-options: -DWITH_POSTGRESQL
+
+@@ -114,6 +114,6 @@ test-suite test
+ build-depends:
+ mysql-simple >= 0.2.2.3
+ , mysql >= 0.1.1.3
+- , persistent-mysql >= 2.0
++ , persistent-mysql >= 2.5
+
+ cpp-options: -DWITH_MYSQL
+diff --git a/src/Database/Esqueleto.hs b/src/Database/Esqueleto.hs
+index eb135c2..bfceffc 100644
+--- a/src/Database/Esqueleto.hs
++++ b/src/Database/Esqueleto.hs
+@@ -101,6 +101,7 @@ module Database.Esqueleto
+ -- * Re-exports
+ -- $reexports
+ , deleteKey
++ , countWhere
+ , module Database.Esqueleto.Internal.PersistentImport
+ ) where
+
+@@ -428,10 +429,18 @@ valJ = val . unValue
+ ----------------------------------------------------------------------
+
+
+--- | Synonym for 'Database.Persist.Store.delete' that does not
+--- clash with @esqueleto@'s 'delete'.
+-deleteKey :: ( PersistStore (PersistEntityBackend val)
+- , MonadIO m
+- , PersistEntity val )
+- => Key val -> ReaderT (PersistEntityBackend val) m ()
++-- | Synonym for 'Database.Persist.delete' that does not clash with
++-- @esqueleto@'s 'delete'.
++deleteKey :: ( BaseBackend backend ~ PersistEntityBackend val
++ , PersistStoreWrite backend
++ , PersistEntity val
++ , MonadIO m) => Key val -> ReaderT backend m ()
+ deleteKey = Database.Persist.delete
++
++-- | Synonym for 'Database.Persist.count' that does not clash with
++-- @esqueleto@'s 'count'.
++countWhere :: ( BaseBackend backend ~ PersistEntityBackend val
++ , PersistQueryRead backend
++ , PersistEntity val
++ , MonadIO m) => [Database.Persist.Filter val] -> ReaderT backend m Int
++countWhere = Database.Persist.count
+diff --git a/src/Database/Esqueleto/Internal/PersistentImport.hs b/src/Database/Esqueleto/Internal/PersistentImport.hs
+index ad193e0..cfc48ec 100644
+--- a/src/Database/Esqueleto/Internal/PersistentImport.hs
++++ b/src/Database/Esqueleto/Internal/PersistentImport.hs
+@@ -10,4 +10,4 @@ import Database.Persist.Sql hiding
+ , selectKeysList, deleteCascadeWhere, (=.), (+=.), (-=.), (*=.), (/=.)
+ , (==.), (!=.), (<.), (>.), (<=.), (>=.), (<-.), (/<-.), (||.)
+ , listToJSON, mapToJSON, getPersistMap, limitOffsetOrder, selectSource
+- , update )
++ , update, count)
+diff --git a/test/Test.hs b/test/Test.hs
+index 80c6784..619e539 100644
+--- a/test/Test.hs
++++ b/test/Test.hs
+@@ -1396,10 +1396,11 @@ main = do
+
+
+ insert' :: ( Functor m
+- , PersistStore (PersistEntityBackend val)
++ , BaseBackend backend ~ PersistEntityBackend val
++ , PersistStore backend
+ , MonadIO m
+ , PersistEntity val )
+- => val -> ReaderT (PersistEntityBackend val) m (Entity val)
++ => val -> ReaderT backend m (Entity val)
+ insert' v = flip Entity v <$> insert v
+
+
More information about the arch-commits
mailing list