diff options
author | Eelco Dolstra <eelco.dolstra@logicblox.com> | 2012-03-06 11:34:11 +0000 |
---|---|---|
committer | Eelco Dolstra <eelco.dolstra@logicblox.com> | 2012-03-06 11:34:11 +0000 |
commit | 3c56e571afe9ffa30822de8cc31a71d7be1a13f2 (patch) | |
tree | 6e7f5b26a365bc841e9e7f6dce6ccd8a1ff273b4 /pkgs/development/libraries/haskell/Crypto | |
parent | 17fe5f329af13cbeed61774e6eaded595d2d3560 (diff) | |
parent | 88d14c0e29a5966dcf16b307eaa71b583ac7ea50 (diff) |
* Final sync with the trunk. backups/stdenv-updates@32824
svn path=/nixpkgs/branches/stdenv-updates/; revision=32820
Diffstat (limited to 'pkgs/development/libraries/haskell/Crypto')
-rw-r--r-- | pkgs/development/libraries/haskell/Crypto/class-constraints.diff | 27 | ||||
-rw-r--r-- | pkgs/development/libraries/haskell/Crypto/default.nix | 1 |
2 files changed, 28 insertions, 0 deletions
diff --git a/pkgs/development/libraries/haskell/Crypto/class-constraints.diff b/pkgs/development/libraries/haskell/Crypto/class-constraints.diff new file mode 100644 index 0000000000000..77035322678ad --- /dev/null +++ b/pkgs/development/libraries/haskell/Crypto/class-constraints.diff @@ -0,0 +1,27 @@ +--- a/Data/Digest/SHA2.hs ++++ b/Data/Digest/SHA2.hs +@@ -106,7 +106,7 @@ + data Hash384 = Hash384 !Word64 !Word64 !Word64 !Word64 !Word64 !Word64 deriving (Eq, Ord) + data Hash224 = Hash224 !Word32 !Word32 !Word32 !Word32 !Word32 !Word32 !Word32 deriving (Eq, Ord) + +-instance (Integral a) => Show (Hash8 a) where ++instance (Integral a, Show a) => Show (Hash8 a) where + showsPrec _ (Hash8 a b c d e f g h) = + (showHex a) . (' ':) . + (showHex b) . (' ':) . +@@ -146,7 +146,7 @@ + where + bs = bitSize (head r) + +-instance (Integral h, Bits h) => Hash (Hash8 h) where ++instance (Integral h, Bits h, Show h) => Hash (Hash8 h) where + toOctets (Hash8 x0 x1 x2 x3 x4 x5 x6 x7) = bitsToOctets =<< [x0, x1, x2, x3, x4, x5, x6, x7] + + instance Hash Hash384 where +@@ -282,4 +282,4 @@ + + -- Test with: + -- ghc -no-recomp -O --make Data/Digest/SHA2.hs -main-is Data.Digest.SHA2.moduleTest -o moduleTest && ./moduleTest && rm moduleTest +-moduleTest = runTestTT test_sha2 +\ No newline at end of file ++moduleTest = runTestTT test_sha2 diff --git a/pkgs/development/libraries/haskell/Crypto/default.nix b/pkgs/development/libraries/haskell/Crypto/default.nix index 0adb00ccc8624..01bc1a1a01265 100644 --- a/pkgs/development/libraries/haskell/Crypto/default.nix +++ b/pkgs/development/libraries/haskell/Crypto/default.nix @@ -7,6 +7,7 @@ cabal.mkDerivation (self: { isLibrary = true; isExecutable = true; buildDepends = [ HUnit QuickCheck random ]; + patches = [ ./class-constraints.diff ]; meta = { description = "Collects together existing Haskell cryptographic functions into a package"; license = "unknown"; |