diff options
Diffstat (limited to 'dev-haskell/aws')
-rw-r--r-- | dev-haskell/aws/Manifest | 5 | ||||
-rw-r--r-- | dev-haskell/aws/aws-0.22-r5.ebuild (renamed from dev-haskell/aws/aws-0.22-r4.ebuild) | 53 | ||||
-rw-r--r-- | dev-haskell/aws/files/aws-0.22-aeson-2.patch | 185 |
3 files changed, 204 insertions, 39 deletions
diff --git a/dev-haskell/aws/Manifest b/dev-haskell/aws/Manifest index 03368a0d048e..ce9524dd0c80 100644 --- a/dev-haskell/aws/Manifest +++ b/dev-haskell/aws/Manifest @@ -1,4 +1,5 @@ -DIST aws-0.22-r4.cabal 15515 BLAKE2B 7936d1ba22ef5d60baf8804d5d77b5202f6fcef31b63cba9c06ffe5f66aae8d584c3877887e408033efe36bc9cf04c738c545ca61e9eceeaee61bb168ac1e062 SHA512 a6a1d639cedf6929f60cf4b4187fbefb72f7024cbdaa3c3d383acc933be1f03b139c4b58a34afaf7ecdc355ee507f4411e9953f98127850d4978a6ba859f4e8e +AUX aws-0.22-aeson-2.patch 7603 BLAKE2B 6c3247b7b9e580fa462e11d41bad7b42131a4212a9a8c678f74a337cc15099694e565d6019e8b90f28fc9568827dcac97c99fe25569e7efc4ae5ddece42d079c SHA512 b439e8178c5a70278e23b9dbc7eb74c26358a81bdba27e8b12584439c2e59c52c0c662575f70c56e150f487d6d4094739a1e7816eb89583a893d15b37aa3892a +DIST aws-0.22-rev3.cabal 15515 BLAKE2B 7936d1ba22ef5d60baf8804d5d77b5202f6fcef31b63cba9c06ffe5f66aae8d584c3877887e408033efe36bc9cf04c738c545ca61e9eceeaee61bb168ac1e062 SHA512 a6a1d639cedf6929f60cf4b4187fbefb72f7024cbdaa3c3d383acc933be1f03b139c4b58a34afaf7ecdc355ee507f4411e9953f98127850d4978a6ba859f4e8e DIST aws-0.22.tar.gz 106122 BLAKE2B b4ff46e2742d53323c80952c303a4605d13600fd60085a2e0501af2fc0a74f0c2769c6bf0692710bbfd972c474b9cab26fd97e9126fdcfb3eaff90afbab1d9ae SHA512 e7ff376c47a7ca7a65c8f10f19e591d4a4b4d2cfa333b4727f88f0b170d7acb0aff402617f2d617c522fe5d16ce92b249a23f1fb0a8bfe5bbefaef2931b786bd -EBUILD aws-0.22-r4.ebuild 3863 BLAKE2B 3e1e457a7126651235c945c17f758470000a0498276f59449b2d7bc2bd999849c5e895ec9333ea1f3e4b9a8ec6f0fbf0c4125eb8beed9d0cd5c77423cbae92e3 SHA512 ab0c5bb4340b2352e768a946bbb8694697213d65d6e6e2d2e2f9f6d64f801cc5b565b3b963f01b5dad279d45633ab03bb4fde440dfb95018956f6fe6cc207c57 +EBUILD aws-0.22-r5.ebuild 2952 BLAKE2B 0a9870774db31fa319d06c8ccec73c4004bbbcc5b41b81403cc719a216a839fed11413844f53ca0ab2f2df638be69dc2c9cc4bdcb63e3e511b6ed6819152bcfc SHA512 52c53474b8e03065f9b6cbb6776cdd20f7b94291d23b967a33ec8e4e8e7ad7f32f36dfe587b5ee969eb6fdb57b6c011d9512a899ea495316d15d4305e5a61679 MISC metadata.xml 580 BLAKE2B 2f6f53f53684dd447ad3c69e408afb8740a8ff0d565c75fa4c5aa55e271f73d79eb42969a7c48320b80096ea53daacaaf5fb22e52de91e388ec96b8b12129b85 SHA512 f3f8d31ba04946e95357b929e5aa611cfe8b58ee484837767eceb2aab10fd07b20e7c7cb2f6fa60f8a409980ef5fdc5294aeaa9656e61365ed2674c9b63b0391 diff --git a/dev-haskell/aws/aws-0.22-r4.ebuild b/dev-haskell/aws/aws-0.22-r5.ebuild index 78feeaf7c7df..fa12e302fc1c 100644 --- a/dev-haskell/aws/aws-0.22-r4.ebuild +++ b/dev-haskell/aws/aws-0.22-r5.ebuild @@ -3,28 +3,28 @@ EAPI=8 -# ebuild generated by hackport 0.6.4.9999 +# ebuild generated by hackport 0.7.1.2.9999 #hackport: flags: +networkbsd -CABAL_FEATURES="lib profile haddock hoogle hscolour" # test-suite requires deps porting + +CABAL_HACKAGE_REVISION=3 + +CABAL_FEATURES="lib profile haddock hoogle hscolour" inherit haskell-cabal DESCRIPTION="Amazon Web Services (AWS) for Haskell" HOMEPAGE="https://github.com/aristidb/aws" -HACKAGE_REV="3" -SRC_URI="https://hackage.haskell.org/package/${P}/${P}.tar.gz - https://hackage.haskell.org/package/${P}/revision/${HACKAGE_REV}.cabal -> ${PF}.cabal" LICENSE="BSD" SLOT="0/${PV}" -KEYWORDS="~amd64 ~x86" +KEYWORDS="~amd64 ~ppc64 ~x86" IUSE="examples" RESTRICT=test # requires aws account -RDEPEND=">=dev-haskell/aeson-0.6:=[profile?] - >=dev-haskell/attoparsec-0.11:=[profile?] <dev-haskell/attoparsec-0.14:=[profile?] - >=dev-haskell/base16-bytestring-0.1:=[profile?] <dev-haskell/base16-bytestring-0.2:=[profile?] - >=dev-haskell/base64-bytestring-1.0:=[profile?] +RDEPEND=">=dev-haskell/aeson-2.0:=[profile?] <dev-haskell/aeson-2.1:=[profile?] + >=dev-haskell/attoparsec-0.11:=[profile?] <dev-haskell/attoparsec-0.15:=[profile?] + >=dev-haskell/base16-bytestring-0.1:=[profile?] <dev-haskell/base16-bytestring-1.1:=[profile?] + >=dev-haskell/base64-bytestring-1.0:=[profile?] <dev-haskell/base64-bytestring-1.3:=[profile?] >=dev-haskell/blaze-builder-0.2.1.4:=[profile?] <dev-haskell/blaze-builder-0.5:=[profile?] >=dev-haskell/byteable-0.1:=[profile?] <dev-haskell/byteable-0.2:=[profile?] >=dev-haskell/case-insensitive-0.2:=[profile?] <dev-haskell/case-insensitive-1.3:=[profile?] @@ -33,52 +33,31 @@ RDEPEND=">=dev-haskell/aeson-0.6:=[profile?] >=dev-haskell/conduit-extra-1.3:=[profile?] <dev-haskell/conduit-extra-1.4:=[profile?] >=dev-haskell/cryptonite-0.11:=[profile?] >=dev-haskell/data-default-0.5.3:=[profile?] <dev-haskell/data-default-0.8:=[profile?] - >=dev-haskell/exceptions-0.8:=[profile?] <dev-haskell/exceptions-0.11:=[profile?] >=dev-haskell/http-client-tls-0.3:=[profile?] <dev-haskell/http-client-tls-0.4:=[profile?] >=dev-haskell/http-conduit-2.3:=[profile?] <dev-haskell/http-conduit-2.4:=[profile?] >=dev-haskell/http-types-0.7:=[profile?] <dev-haskell/http-types-1.0:=[profile?] >=dev-haskell/lifted-base-0.1:=[profile?] <dev-haskell/lifted-base-0.3:=[profile?] dev-haskell/memory:=[profile?] >=dev-haskell/monad-control-0.3:=[profile?] - >=dev-haskell/mtl-2:=[profile?] <dev-haskell/mtl-3:=[profile?] + >=dev-haskell/network-3:=[profile?] <dev-haskell/network-4:=[profile?] + >=dev-haskell/network-bsd-2.8:=[profile?] <dev-haskell/network-bsd-2.9:=[profile?] >=dev-haskell/old-locale-1:=[profile?] <dev-haskell/old-locale-2:=[profile?] >=dev-haskell/resourcet-1.2:=[profile?] <dev-haskell/resourcet-1.3:=[profile?] >=dev-haskell/safe-0.3:=[profile?] <dev-haskell/safe-0.4:=[profile?] >=dev-haskell/scientific-0.3:=[profile?] - >=dev-haskell/semigroups-0.18:=[profile?] <dev-haskell/semigroups-0.19:=[profile?] >=dev-haskell/tagged-0.7:=[profile?] <dev-haskell/tagged-0.9:=[profile?] - >=dev-haskell/text-0.11:=[profile?] >=dev-haskell/unordered-containers-0.2:=[profile?] >=dev-haskell/utf8-string-0.3:=[profile?] <dev-haskell/utf8-string-1.1:=[profile?] >=dev-haskell/vector-0.10:=[profile?] >=dev-haskell/xml-conduit-1.8:=[profile?] <dev-haskell/xml-conduit-2.0:=[profile?] - >=dev-lang/ghc-7.8.2:= + >=dev-lang/ghc-8.10.1:= examples? ( >=dev-haskell/errors-2.0:=[profile?] ) - >=dev-haskell/network-3:=[profile?] <dev-haskell/network-4:=[profile?] - >=dev-haskell/network-bsd-2.8:=[profile?] <dev-haskell/network-bsd-2.9:=[profile?] " DEPEND="${RDEPEND} - >=dev-haskell/cabal-1.18.1.3" -# test? ( >=dev-haskell/aeson-0.7 -# >=dev-haskell/http-client-0.3 <dev-haskell/http-client-0.8 -# >=dev-haskell/lifted-base-0.2 -# >=dev-haskell/mtl-2.1 -# >=dev-haskell/quickcheck-2.7 -# >=dev-haskell/quickcheck-instances-0.3 -# >=dev-haskell/tasty-0.8 -# >=dev-haskell/tasty-hunit-0.8 -# >=dev-haskell/tasty-quickcheck-0.8 -# >=dev-haskell/text-1.1 -# >=dev-haskell/transformers-base-0.4 -# !examples? ( >=dev-haskell/errors-2.0 ) ) - -src_prepare() { - # pull revised cabal from upstream - cp "${DISTDIR}/${PF}.cabal" "${S}/${PN}.cabal" || die + >=dev-haskell/cabal-3.2.0.0 +" - # Apply patches *after* pulling the revised cabal - default -} +PATCHES=( "${FILESDIR}"/${P}-aeson-2.patch ) src_configure() { haskell-cabal_src_configure \ diff --git a/dev-haskell/aws/files/aws-0.22-aeson-2.patch b/dev-haskell/aws/files/aws-0.22-aeson-2.patch new file mode 100644 index 000000000000..25d5966ed0a7 --- /dev/null +++ b/dev-haskell/aws/files/aws-0.22-aeson-2.patch @@ -0,0 +1,185 @@ +From 7af7586c5d244d07f77d49e5fdc739e6e8e54816 Mon Sep 17 00:00:00 2001 +From: Joey Hess <joeyh@joeyh.name> +Date: Mon, 18 Oct 2021 14:35:30 -0400 +Subject: [PATCH] build with aeson 2 + +--- + Aws/DynamoDb/Commands/Table.hs | 4 +-- + Aws/DynamoDb/Commands/UpdateItem.hs | 5 ++-- + Aws/DynamoDb/Core.hs | 39 +++++++++++++++-------------- + aws.cabal | 2 +- + 4 files changed, 26 insertions(+), 24 deletions(-) + +diff --git a/Aws/DynamoDb/Commands/Table.hs b/Aws/DynamoDb/Commands/Table.hs +index 5fb42e0..a5fe025 100644 +--- a/Aws/DynamoDb/Commands/Table.hs ++++ b/Aws/DynamoDb/Commands/Table.hs +@@ -35,9 +35,9 @@ module Aws.DynamoDb.Commands.Table + import Control.Applicative + import Data.Aeson ((.!=), (.:), (.:?), (.=)) + import qualified Data.Aeson as A ++import qualified Data.Aeson.KeyMap as KM + import qualified Data.Aeson.Types as A + import Data.Char (toUpper) +-import qualified Data.HashMap.Strict as M + import Data.Scientific (Scientific) + import qualified Data.Text as T + import Data.Time +@@ -281,7 +281,7 @@ data TableDescription + + instance A.FromJSON TableDescription where + parseJSON = A.withObject "Table must be an object" $ \o -> do +- t <- case (M.lookup "Table" o, M.lookup "TableDescription" o) of ++ t <- case (KM.lookup "Table" o, KM.lookup "TableDescription" o) of + (Just (A.Object t), _) -> return t + (_, Just (A.Object t)) -> return t + _ -> fail "Table description must have key 'Table' or 'TableDescription'" +diff --git a/Aws/DynamoDb/Commands/UpdateItem.hs b/Aws/DynamoDb/Commands/UpdateItem.hs +index 0d94a59..1152b5a 100644 +--- a/Aws/DynamoDb/Commands/UpdateItem.hs ++++ b/Aws/DynamoDb/Commands/UpdateItem.hs +@@ -31,6 +31,7 @@ module Aws.DynamoDb.Commands.UpdateItem + ------------------------------------------------------------------------------- + import Control.Applicative + import Data.Aeson ++import qualified Data.Aeson.Key as AK + import Data.Default + import qualified Data.Text as T + import Prelude +@@ -91,9 +92,9 @@ instance ToJSON AttributeUpdates where + toJSON = object . map mk . getAttributeUpdates + where + mk AttributeUpdate { auAction = UDelete, auAttr = auAttr } = +- (attrName auAttr) .= object ++ (AK.fromText (attrName auAttr)) .= object + ["Action" .= UDelete] +- mk AttributeUpdate { .. } = (attrName auAttr) .= object ++ mk AttributeUpdate { .. } = AK.fromText (attrName auAttr) .= object + ["Value" .= (attrVal auAttr), "Action" .= auAction] + + +diff --git a/Aws/DynamoDb/Core.hs b/Aws/DynamoDb/Core.hs +index 1c116d3..b9a6cc4 100644 +--- a/Aws/DynamoDb/Core.hs ++++ b/Aws/DynamoDb/Core.hs +@@ -128,6 +128,8 @@ import Control.Monad.Trans.Resource (throwM) + import qualified Crypto.Hash as CH + import Data.Aeson + import qualified Data.Aeson as A ++import qualified Data.Aeson.Key as AK ++import qualified Data.Aeson.KeyMap as KM + import Data.Aeson.Types (Pair, parseEither) + import qualified Data.Aeson.Types as A + import qualified Data.Attoparsec.ByteString as AttoB (endOfInput) +@@ -141,7 +143,6 @@ import Data.Conduit + import Data.Conduit.Attoparsec (sinkParser) + import Data.Default + import Data.Function (on) +-import qualified Data.HashMap.Strict as HM + import Data.Int + import Data.IORef + import Data.List +@@ -536,7 +537,7 @@ instance ToJSON PrimaryKey where + toJSON (PrimaryKey h (Just r)) = + let Object p1 = toJSON h + Object p2 = toJSON r +- in Object (p1 `HM.union` p2) ++ in Object (p1 `KM.union` p2) + + instance FromJSON PrimaryKey where + parseJSON p = do +@@ -544,8 +545,8 @@ instance FromJSON PrimaryKey where + case length l of + 1 -> return $ head l + _ -> fail "Unable to parse PrimaryKey" +- where listPKey p'= map (\(txt,dval)-> hk txt dval) +- . HM.toList <$> parseJSON p' ++ where listPKey p'= map (\(k,dval)-> hk (AK.toText k) dval) ++ . KM.toList <$> parseJSON p' + + + -- | A key-value pair +@@ -661,9 +662,9 @@ instance ToJSON Attribute where + ------------------------------------------------------------------------------- + -- | Parse a JSON object that contains attributes + parseAttributeJson :: Value -> A.Parser [Attribute] +-parseAttributeJson (Object v) = mapM conv $ HM.toList v ++parseAttributeJson (Object v) = mapM conv $ KM.toList v + where +- conv (k, o) = Attribute k <$> parseJSON o ++ conv (k, o) = Attribute (AK.toText k) <$> parseJSON o + parseAttributeJson _ = error "Attribute JSON must be an Object" + + +@@ -674,7 +675,7 @@ attributesJson as = object $ map attributeJson as + + -- | Convert into JSON pair + attributeJson :: Attribute -> Pair +-attributeJson (Attribute nm v) = nm .= v ++attributeJson (Attribute nm v) = AK.fromText nm .= v + + + ------------------------------------------------------------------------------- +@@ -962,7 +963,7 @@ conditionsJson key (Conditions op es) = b ++ a + where + a = if null es + then [] +- else [key .= object (map conditionJson es)] ++ else [AK.fromText key .= object (map conditionJson es)] + + b = if length (take 2 es) > 1 + then ["ConditionalOperator" .= String (rendCondOp op) ] +@@ -1046,7 +1047,7 @@ renderCondOp c = case c of + + + conditionJson :: Condition -> Pair +-conditionJson Condition{..} = condAttr .= condOp ++conditionJson Condition{..} = AK.fromText condAttr .= condOp + + + instance ToJSON CondOp where +@@ -1076,12 +1077,12 @@ data ConsumedCapacity = ConsumedCapacity { + + + instance FromJSON ConsumedCapacity where +- parseJSON (Object v) = ConsumedCapacity +- <$> v .: "CapacityUnits" +- <*> (HM.toList <$> v .:? "GlobalSecondaryIndexes" .!= mempty) +- <*> (HM.toList <$> v .:? "LocalSecondaryIndexes" .!= mempty) +- <*> (v .:? "Table" >>= maybe (return Nothing) (.: "CapacityUnits")) +- <*> v .: "TableName" ++ parseJSON (Object o) = ConsumedCapacity ++ <$> o .: "CapacityUnits" ++ <*> (map (\(k, v) -> (AK.toText k, v)) . KM.toList <$> o .:? "GlobalSecondaryIndexes" .!= mempty) ++ <*> (map (\(k, v) -> (AK.toText k, v)) . KM.toList <$> o .:? "LocalSecondaryIndexes" .!= mempty) ++ <*> (o .:? "Table" >>= maybe (return Nothing) (.: "CapacityUnits")) ++ <*> o .: "TableName" + parseJSON _ = fail "ConsumedCapacity must be an Object." + + +@@ -1115,8 +1116,8 @@ data ItemCollectionMetrics = ItemCollectionMetrics { + + + instance FromJSON ItemCollectionMetrics where +- parseJSON (Object v) = ItemCollectionMetrics +- <$> (do m <- v .: "ItemCollectionKey" +- return $ head $ HM.toList m) +- <*> v .: "SizeEstimateRangeGB" ++ parseJSON (Object o) = ItemCollectionMetrics ++ <$> (do m <- o .: "ItemCollectionKey" ++ return $ (\(k, v) -> (AK.toText k, v)) $ head $ KM.toList m) ++ <*> o .: "SizeEstimateRangeGB" + parseJSON _ = fail "ItemCollectionMetrics must be an Object." + + +--- a/aws.cabal 2022-07-25 08:47:06.270139909 +1000 ++++ b/aws.cabal 2022-07-25 08:47:28.497479783 +1000 +@@ -35,7 +35,7 @@ + Default: True + + Library +- build-depends: aeson <1.6 ++ build-depends: aeson >= 2.0 + + Exposed-modules: + Aws |