[arch-commits] Commit in haskell-yesod-persistent/trunk (2 files)

Felix Yan fyan at archlinux.org
Sat Apr 16 05:05:06 UTC 2016


    Date: Saturday, April 16, 2016 @ 07:05:06
  Author: fyan
Revision: 171155

upgpkg: haskell-yesod-persistent 1.4.0.4-7

rebuild with fast-logger-2.4.5, persistent-2.5, persistent-sqlite-2.5, persistent-template-2.5, yaml-0.8.17.1, http-client-0.4.28, http-client-tls-0.2.4, http-conduit-2.1.10, shakespeare-2.0.8.1, wai-3.2.1, wai-logger-2.2.6

Added:
  haskell-yesod-persistent/trunk/persistent-2.5.patch
Modified:
  haskell-yesod-persistent/trunk/PKGBUILD

----------------------+
 PKGBUILD             |   13 ++++++++---
 persistent-2.5.patch |   55 +++++++++++++++++++++++++++++++++++++++++++++++++
 2 files changed, 65 insertions(+), 3 deletions(-)

Modified: PKGBUILD
===================================================================
--- PKGBUILD	2016-04-16 04:57:04 UTC (rev 171154)
+++ PKGBUILD	2016-04-16 05:05:06 UTC (rev 171155)
@@ -5,7 +5,7 @@
 _hkgname=yesod-persistent
 pkgname=haskell-yesod-persistent
 pkgver=1.4.0.4
-pkgrel=6
+pkgrel=7
 pkgdesc="Some helpers for using Persistent from Yesod."
 url="http://www.yesodweb.com/"
 license=("MIT")
@@ -14,10 +14,17 @@
          "haskell-persistent-template" "haskell-resource-pool" "haskell-resourcet"
          "haskell-yesod-core")
 options=('staticlibs')
-source=("http://hackage.haskell.org/packages/archive/${_hkgname}/${pkgver}/${_hkgname}-${pkgver}.tar.gz")
+source=("http://hackage.haskell.org/packages/archive/${_hkgname}/${pkgver}/${_hkgname}-${pkgver}.tar.gz"
+        persistent-2.5.patch)
 install="${pkgname}.install"
-sha256sums=('840dac8758176dd2b27bbff49a8cdd724b6f99cdf1b723a1eae5d2a18898d25d')
+sha256sums=('840dac8758176dd2b27bbff49a8cdd724b6f99cdf1b723a1eae5d2a18898d25d'
+            '72d45f93507459dd2d5742ba5727e337affe45eaf097c318c94f1d1f5b75e831')
 
+prepare() {
+    cd "${srcdir}/${_hkgname}-${pkgver}"
+    patch -p2 -i ../persistent-2.5.patch
+}
+
 build() {
     cd "${srcdir}/${_hkgname}-${pkgver}"
     

Added: persistent-2.5.patch
===================================================================
--- persistent-2.5.patch	                        (rev 0)
+++ persistent-2.5.patch	2016-04-16 05:05:06 UTC (rev 171155)
@@ -0,0 +1,55 @@
+From 7e7cba8fc60db30789d75182cbc6cad1bdbb6f44 Mon Sep 17 00:00:00 2001
+From: Erik de Castro Lopo <erikd at mega-nerd.com>
+Date: Fri, 15 Apr 2016 14:41:55 +1000
+Subject: [PATCH] yesod-persistent: Make it work with persistent 2.5
+
+---
+ yesod-persistent/Yesod/Persist/Core.hs  | 12 ++++++------
+ yesod-persistent/yesod-persistent.cabal |  4 ++--
+ 2 files changed, 8 insertions(+), 8 deletions(-)
+
+diff --git a/yesod-persistent/Yesod/Persist/Core.hs b/yesod-persistent/Yesod/Persist/Core.hs
+index c566707..1a4f51d 100644
+--- a/yesod-persistent/Yesod/Persist/Core.hs
++++ b/yesod-persistent/Yesod/Persist/Core.hs
+@@ -124,9 +124,9 @@ respondSourceDB :: YesodPersistRunner site
+ respondSourceDB ctype = respondSource ctype . runDBSource
+ 
+ -- | Get the given entity by ID, or return a 404 not found if it doesn't exist.
+-get404 :: (MonadIO m, PersistStore (PersistEntityBackend val), PersistEntity val)
+-       => Key val
+-       -> ReaderT (PersistEntityBackend val) m val
++get404 :: (PersistEntityBackend val ~ BaseBackend backend, MonadIO m
++          , PersistEntity val, PersistStoreRead backend)
++        => Key val -> ReaderT backend m val
+ get404 key = do
+     mres <- get key
+     case mres of
+@@ -135,9 +135,9 @@ get404 key = do
+ 
+ -- | Get the given entity by unique key, or return a 404 not found if it doesn't
+ --   exist.
+-getBy404 :: (PersistUnique (PersistEntityBackend val), PersistEntity val, MonadIO m)
+-         => Unique val
+-         -> ReaderT (PersistEntityBackend val) m (Entity val)
++getBy404 :: (PersistEntityBackend val ~ BaseBackend backend, MonadIO m
++            , PersistEntity val, PersistUniqueRead backend)
++            => Unique val -> ReaderT backend m (Entity val)
+ getBy404 key = do
+     mres <- getBy key
+     case mres of
+diff --git a/yesod-persistent/yesod-persistent.cabal b/yesod-persistent/yesod-persistent.cabal
+index a12ca07..b056555 100644
+--- a/yesod-persistent/yesod-persistent.cabal
++++ b/yesod-persistent/yesod-persistent.cabal
+@@ -16,8 +16,8 @@ extra-source-files: README.md ChangeLog.md
+ library
+     build-depends:   base                      >= 4        && < 5
+                    , yesod-core                >= 1.4.0    && < 1.5
+-                   , persistent                >= 2.1      && < 2.3
+-                   , persistent-template       >= 2.1      && < 2.2
++                   , persistent                >= 2.5      && < 2.6
++                   , persistent-template       >= 2.5      && < 2.6
+                    , transformers              >= 0.2.2
+                    , blaze-builder
+                    , conduit



More information about the arch-commits mailing list