From 869cd7d44a275482640e1df027ff87eb2e28ee84 Mon Sep 17 00:00:00 2001 From: Oliver Charles Date: Fri, 20 Jun 2014 09:58:35 +0100 Subject: [PATCH] haskellPackages.authenticateOauth: Update to 1.5 --- .../haskell/authenticate-oauth/RSA2.patch | 57 ------------------- .../haskell/authenticate-oauth/default.nix | 15 ++--- 2 files changed, 6 insertions(+), 66 deletions(-) delete mode 100644 pkgs/development/libraries/haskell/authenticate-oauth/RSA2.patch diff --git a/pkgs/development/libraries/haskell/authenticate-oauth/RSA2.patch b/pkgs/development/libraries/haskell/authenticate-oauth/RSA2.patch deleted file mode 100644 index 6a888aa32778..000000000000 --- a/pkgs/development/libraries/haskell/authenticate-oauth/RSA2.patch +++ /dev/null @@ -1,57 +0,0 @@ -From c401c2c585b5345243211e981c123a92b995b448 Mon Sep 17 00:00:00 2001 -From: Sergei Trofimovich -Date: Sat, 25 Jan 2014 13:35:52 +0300 -Subject: [PATCH] authenticate-oauth.cabal: allow RSA-2 - -The only cosmetic change is rename of 'ha_SHA1' to 'hashSHA1' - -Signed-off-by: Sergei Trofimovich ---- - authenticate-oauth/Web/Authenticate/OAuth.hs | 10 ++++++++-- - authenticate-oauth/authenticate-oauth.cabal | 2 +- - 2 files changed, 9 insertions(+), 3 deletions(-) - -diff --git a/authenticate-oauth/Web/Authenticate/OAuth.hs b/authenticate-oauth/Web/Authenticate/OAuth.hs -index 3f38c8c..eccd0f1 100644 ---- a/authenticate-oauth/Web/Authenticate/OAuth.hs -+++ b/authenticate-oauth/Web/Authenticate/OAuth.hs -@@ -21,7 +21,7 @@ module Web.Authenticate.OAuth - paramEncode, addScope, addMaybeProxy - ) where - import Blaze.ByteString.Builder (toByteString, Builder) --import Codec.Crypto.RSA (ha_SHA1, rsassa_pkcs1_v1_5_sign) -+import qualified Codec.Crypto.RSA as RSA - import Control.Exception - import Control.Monad - import Control.Monad.IO.Class (MonadIO, liftIO) -@@ -346,7 +346,13 @@ genSign oa tok req = - PLAINTEXT -> - return $ BS.intercalate "&" $ map paramEncode [oauthConsumerSecret oa, tokenSecret tok] - RSASHA1 pr -> -- liftM (encode . toStrict . rsassa_pkcs1_v1_5_sign ha_SHA1 pr) (getBaseString tok req) -+ liftM (encode . toStrict . RSA.rsassa_pkcs1_v1_5_sign -+#if MIN_VERSION_RSA(2, 0, 0) -+ RSA.hashSHA1 -+#else -+ RSA.ha_SHA1 -+#endif -+ pr) (getBaseString tok req) - - #if MIN_VERSION_http_conduit(2, 0, 0) - addAuthHeader :: BS.ByteString -> Credential -> Request -> Request -diff --git a/authenticate-oauth/authenticate-oauth.cabal b/authenticate-oauth/authenticate-oauth.cabal -index 00507da..e11c3bd 100644 ---- a/authenticate-oauth/authenticate-oauth.cabal -+++ b/authenticate-oauth/authenticate-oauth.cabal -@@ -19,7 +19,7 @@ library - , transformers >= 0.1 && < 0.4 - , bytestring >= 0.9 - , crypto-pubkey-types >= 0.1 && < 0.5 -- , RSA >= 1.2 && < 1.3 -+ , RSA >= 1.2 && < 2.1 - , time - , data-default - , base64-bytestring >= 0.1 && < 1.1 --- -1.9.1 - diff --git a/pkgs/development/libraries/haskell/authenticate-oauth/default.nix b/pkgs/development/libraries/haskell/authenticate-oauth/default.nix index 9a75bd0cea50..364e81d9ee38 100644 --- a/pkgs/development/libraries/haskell/authenticate-oauth/default.nix +++ b/pkgs/development/libraries/haskell/authenticate-oauth/default.nix @@ -1,18 +1,15 @@ { cabal, base64Bytestring, blazeBuilder, blazeBuilderConduit -, conduit, cryptoPubkeyTypes, dataDefault, httpConduit, httpTypes -, monadControl, random, resourcet, RSA, SHA, time, transformers +, cryptoPubkeyTypes, dataDefault, httpClient, httpTypes, random +, RSA, SHA, time, transformers }: cabal.mkDerivation (self: { pname = "authenticate-oauth"; - version = "1.4.0.8"; - sha256 = "1mc36d6lkmqywzsxhzwv4445mmwdz0rr5ibd2a1nbgw5c5jw76fy"; - patches = [ ./RSA2.patch ]; - patchFlags = "-p2"; + version = "1.5"; + sha256 = "07y9zh4v9by588k86wlyj3czivj5jlb9jk6g4j9p8j1qgbv4hpk9"; buildDepends = [ - base64Bytestring blazeBuilder blazeBuilderConduit conduit - cryptoPubkeyTypes dataDefault httpConduit httpTypes monadControl - random resourcet RSA SHA time transformers + base64Bytestring blazeBuilder blazeBuilderConduit cryptoPubkeyTypes + dataDefault httpClient httpTypes random RSA SHA time transformers ]; meta = { homepage = "http://github.com/yesodweb/authenticate";