[arch-commits] Commit in postgrest/trunk (PKGBUILD protolude-0.3.1.patch)

Felix Yan felixonmars at gemini.archlinux.org
Tue Aug 9 13:15:03 UTC 2022


    Date: Tuesday, August 9, 2022 @ 13:15:03
  Author: felixonmars
Revision: 1263534

upgpkg: postgrest 9.0.1-1

Modified:
  postgrest/trunk/PKGBUILD
Deleted:
  postgrest/trunk/protolude-0.3.1.patch

-----------------------+
 PKGBUILD              |   38 +++++++++++---------------
 protolude-0.3.1.patch |   69 ------------------------------------------------
 2 files changed, 16 insertions(+), 91 deletions(-)

Modified: PKGBUILD
===================================================================
--- PKGBUILD	2022-08-09 13:14:46 UTC (rev 1263533)
+++ PKGBUILD	2022-08-09 13:15:03 UTC (rev 1263534)
@@ -2,41 +2,35 @@
 # Contributor: Arch Haskell Team <arch-haskell at haskell.org>
 
 pkgname=postgrest
-pkgver=9.0.0
-pkgrel=15
+pkgver=9.0.1
+pkgrel=1
 pkgdesc="REST API for any Postgres database"
 url="https://github.com/begriffs/postgrest"
 license=("MIT")
 arch=('x86_64')
-depends=('ghc-libs' 'haskell-http' 'haskell-ranged-sets' 'haskell-aeson' 'haskell-ansi-wl-pprint'
-         'haskell-base64-bytestring' 'haskell-case-insensitive' 'haskell-cassava'
-         'haskell-configurator-pg' 'haskell-contravariant' 'haskell-contravariant-extras'
-         'haskell-cookie' 'haskell-either' 'haskell-fast-logger' 'haskell-gitrev' 'haskell-hasql'
-         'haskell-hasql-dynamic-statements' 'haskell-hasql-notifications' 'haskell-hasql-pool'
-         'haskell-hasql-transaction' 'haskell-heredoc' 'haskell-http-types'
+depends=('ghc-libs' 'haskell-http' 'haskell-ranged-sets' 'haskell-aeson' 'haskell-base64-bytestring'
+         'haskell-case-insensitive' 'haskell-cassava' 'haskell-configurator-pg'
+         'haskell-contravariant-extras' 'haskell-cookie' 'haskell-either' 'haskell-gitrev'
+         'haskell-hasql' 'haskell-hasql-dynamic-statements' 'haskell-hasql-notifications'
+         'haskell-hasql-pool' 'haskell-hasql-transaction' 'haskell-heredoc' 'haskell-http-types'
          'haskell-insert-ordered-containers' 'haskell-interpolatedstring-perl6' 'haskell-jose'
          'haskell-lens' 'haskell-lens-aeson' 'haskell-network-uri' 'haskell-optparse-applicative'
-         'haskell-protolude' 'haskell-regex-tdfa' 'haskell-scientific'
-         'haskell-swagger2' 'haskell-unordered-containers' 'haskell-vector' 'haskell-wai'
-         'haskell-wai-cors' 'haskell-wai-extra' 'haskell-wai-logger' 'haskell-wai-middleware-static'
-         'haskell-auto-update' 'haskell-retry' 'haskell-warp')
-makedepends=('ghc' 'uusi' 'haskell-aeson-qq' 'haskell-async' 'haskell-doctest' 'haskell-hspec'
-             'haskell-hspec-wai' 'haskell-hspec-wai-json' 'haskell-monad-control'
-             'haskell-pretty-simple' 'haskell-transformers-base')
+         'haskell-protolude' 'haskell-regex-tdfa' 'haskell-scientific' 'haskell-swagger2'
+         'haskell-unordered-containers' 'haskell-vector' 'haskell-wai' 'haskell-wai-cors'
+         'haskell-wai-extra' 'haskell-auto-update' 'haskell-retry' 'haskell-warp')
+makedepends=('ghc' 'uusi' 'haskell-aeson-qq' 'haskell-async' 'haskell-contravariant'
+             'haskell-doctest' 'haskell-hspec' 'haskell-hspec-wai' 'haskell-hspec-wai-json'
+             'haskell-monad-control' 'haskell-pretty-simple' 'haskell-transformers-base')
 checkdepends=('pifpaf' 'postgresql' 'procps-ng')
-source=("https://github.com/begriffs/postgrest/archive/v$pkgver/$pkgname-$pkgver.tar.gz"
-        protolude-0.3.1.patch)
-sha512sums=('28f6828cc47d295e37c06aa845b14de71f87fdd1380ece04ba928b8301be2ee9561e0ae4edf78025780cf0d3512ba2694fdcd1df0d05e31fa0e704384aa4717b'
-            'eeac3a9bc7547482539c14e87c08bafa8bb4acb5863286613af3af93ff1f55c7e7c6c8c18f222b0b7c1d8ecb67eac4c5cdbc0c69e885f7716014b7cb5b1d7d23')
+source=("https://github.com/begriffs/postgrest/archive/v$pkgver/$pkgname-$pkgver.tar.gz")
+sha512sums=('caa50771e935f7618d6dd5694f9d0b079a5d6f2463b3dc7fa1f408fdb4a5171ac4928fdc98e40564ae165f4030b099a2cbd86079b49ef7bee62b0d7da52101c4')
 
 prepare() {
     cd $pkgname-$pkgver
-    uusi -u hasql -u hasql-pool -u hspec -u HTTP -u lens $pkgname.cabal
+    uusi -u hasql -u hspec -u HTTP -u lens $pkgname.cabal
 
     # TODO: not a proper fix. probably newly added "column" should be shown too
     sed -i 's/SQL.RowError i/SQL.RowError i _/' src/PostgREST/Error.hs
-
-    patch -p1 -i ../protolude-0.3.1.patch
 }
 
 build() {

Deleted: protolude-0.3.1.patch
===================================================================
--- protolude-0.3.1.patch	2022-08-09 13:14:46 UTC (rev 1263533)
+++ protolude-0.3.1.patch	2022-08-09 13:15:03 UTC (rev 1263534)
@@ -1,69 +0,0 @@
-From de142b535530541476b73882f6ef5bdf3b73b76b Mon Sep 17 00:00:00 2001
-From: Laurence Isla <lau.isla.c at gmail.com>
-Date: Wed, 8 Jun 2022 11:41:39 -0500
-Subject: [PATCH] Upgrade protolude to 0.3.1
-
----
- nix/overlays/haskell-packages.nix         |  9 +++++++++
- postgrest.cabal                           | 10 +++++-----
- src/PostgREST/Config.hs                   |  6 +++---
- src/PostgREST/Request/ApiRequest.hs       |  4 ++--
- src/PostgREST/Request/DbRequestBuilder.hs |  2 +-
- stack.yaml                                |  1 +
- stack.yaml.lock                           | 24 ++++++++++++++++++-----
- 7 files changed, 40 insertions(+), 16 deletions(-)
-
-diff --git a/src/PostgREST/Config.hs b/src/PostgREST/Config.hs
-index d5d63cd92..06ed39d25 100644
---- a/src/PostgREST/Config.hs
-+++ b/src/PostgREST/Config.hs
-@@ -369,17 +369,17 @@ parser optPath env dbSettings =
- 
-     coerceInt :: (Read i, Integral i) => C.Value -> Maybe i
-     coerceInt (C.Number x) = rightToMaybe $ floatingOrInteger x
--    coerceInt (C.String x) = readMaybe $ toS x
-+    coerceInt (C.String x) = readMaybe x
-     coerceInt _            = Nothing
- 
-     coerceBool :: C.Value -> Maybe Bool
-     coerceBool (C.Bool b)   = Just b
-     coerceBool (C.String s) =
-       -- parse all kinds of text: True, true, TRUE, "true", ...
--      case readMaybe . toS $ T.toTitle $ T.filter isAlpha $ toS s of
-+      case readMaybe $ T.toTitle $ T.filter isAlpha $ toS s of
-         Just b  -> Just b
-         -- numeric instead?
--        Nothing -> (> 0) <$> (readMaybe $ toS s :: Maybe Integer)
-+        Nothing -> (> 0) <$> (readMaybe s :: Maybe Integer)
-     coerceBool _            = Nothing
- 
-     splitOnCommas :: C.Value -> [Text]
-diff --git a/src/PostgREST/Request/ApiRequest.hs b/src/PostgREST/Request/ApiRequest.hs
-index 00e076d1b..439a08aca 100644
---- a/src/PostgREST/Request/ApiRequest.hs
-+++ b/src/PostgREST/Request/ApiRequest.hs
-@@ -364,9 +364,9 @@ userApiRequest conf at AppConfig{..} dbStructure req reqBody
-   headerRange = rangeRequested hdrs
-   replaceLast x s = T.intercalate "." $ L.init (T.split (=='.') s) ++ [x]
-   limitParams :: M.HashMap Text NonnegRange
--  limitParams  = M.fromList [(toS (replaceLast "limit" k), restrictRange (readMaybe . toS =<< v) allRange) | (k,v) <- qParams, isJust v, endingIn ["limit"] k]
-+  limitParams  = M.fromList [(toS (replaceLast "limit" k), restrictRange (readMaybe =<< v) allRange) | (k,v) <- qParams, isJust v, endingIn ["limit"] k]
-   offsetParams :: M.HashMap Text NonnegRange
--  offsetParams = M.fromList [(toS (replaceLast "limit" k), maybe allRange rangeGeq (readMaybe . toS =<< v)) | (k,v) <- qParams, isJust v, endingIn ["offset"] k]
-+  offsetParams = M.fromList [(toS (replaceLast "limit" k), maybe allRange rangeGeq (readMaybe =<< v)) | (k,v) <- qParams, isJust v, endingIn ["offset"] k]
- 
-   urlRange = M.unionWith f limitParams offsetParams
-     where
-diff --git a/src/PostgREST/Request/DbRequestBuilder.hs b/src/PostgREST/Request/DbRequestBuilder.hs
-index 35af9962d..88819079d 100644
---- a/src/PostgREST/Request/DbRequestBuilder.hs
-+++ b/src/PostgREST/Request/DbRequestBuilder.hs
-@@ -56,7 +56,7 @@ import PostgREST.Request.Types
- 
- import qualified PostgREST.DbStructure.Relationship as Relationship
- 
--import Protolude hiding (from)
-+import Protolude hiding (from, isInfixOf)
- 
- -- | Builds the ReadRequest tree on a number of stages.
- -- | Adds filters, order, limits on its respective nodes.



More information about the arch-commits mailing list