diff --git a/pkgs/development/libraries/haskell/attoparsec-binary/attoparsec-binary-ghc7.6.1.patch b/pkgs/development/libraries/haskell/attoparsec-binary/attoparsec-binary-ghc7.6.1.patch new file mode 100644 index 00000000000..dae949b2570 --- /dev/null +++ b/pkgs/development/libraries/haskell/attoparsec-binary/attoparsec-binary-ghc7.6.1.patch @@ -0,0 +1,20 @@ +diff --git a/Data/Attoparsec/Binary.hs b/Data/Attoparsec/Binary.hs +index fab76c6..01d6c8b 100644 +--- a/Data/Attoparsec/Binary.hs ++++ b/Data/Attoparsec/Binary.hs +@@ -23,7 +23,7 @@ import Data.Word + byteSize :: (Bits a) => a -> Int + byteSize = (`div` 8) . bitSize + +-pack :: (Bits a) => B.ByteString -> a ++pack :: (Bits a, Num a) => B.ByteString -> a + pack = B.foldl' (\n h -> (n `shiftL` 8) .|. fromIntegral h) 0 + + anyWordN :: (Bits a) => (B.ByteString -> a) -> Parser a +@@ -84,4 +84,4 @@ word64be = wordN unpack + + -- |Match a specific 64-bit little-endian word. + word64le :: Word64 -> Parser Word64 +-word64le = wordN $ B.reverse . unpack +\ No newline at end of file ++word64le = wordN $ B.reverse . unpack diff --git a/pkgs/development/libraries/haskell/attoparsec-binary/default.nix b/pkgs/development/libraries/haskell/attoparsec-binary/default.nix index 1faea022e9a..f4e85d5ebd5 100644 --- a/pkgs/development/libraries/haskell/attoparsec-binary/default.nix +++ b/pkgs/development/libraries/haskell/attoparsec-binary/default.nix @@ -5,6 +5,7 @@ cabal.mkDerivation (self: { version = "0.1.0.1"; sha256 = "1d3zjr8bh6d44v1vid0cvrrbyhn7xj4bn96vy36dzk7h7p87bzxa"; buildDepends = [ attoparsec ]; + patches = [ ./attoparsec-binary-ghc7.6.1.patch ]; meta = { description = "Binary processing extensions to Attoparsec"; license = self.stdenv.lib.licenses.bsd3;