summary refs log tree commit diff
path: root/pkgs/development/haskell-modules/patches
diff options
context:
space:
mode:
authorPeter Simons <simons@cryp.to>2015-09-01 18:01:34 +0200
committerPeter Simons <simons@cryp.to>2015-09-01 18:02:50 +0200
commit2b71e4643e33c427c26efc16b69765170b292cca (patch)
tree5afa0eab0e4666e6defd1e5889467bf7abba028e /pkgs/development/haskell-modules/patches
parent66563862ec3e0ac22a0cc6369eec587fa6dd0fec (diff)
downloadnixpkgs-2b71e4643e33c427c26efc16b69765170b292cca.tar
nixpkgs-2b71e4643e33c427c26efc16b69765170b292cca.tar.gz
nixpkgs-2b71e4643e33c427c26efc16b69765170b292cca.tar.bz2
nixpkgs-2b71e4643e33c427c26efc16b69765170b292cca.tar.lz
nixpkgs-2b71e4643e33c427c26efc16b69765170b292cca.tar.xz
nixpkgs-2b71e4643e33c427c26efc16b69765170b292cca.tar.zst
nixpkgs-2b71e4643e33c427c26efc16b69765170b292cca.zip
haskell-bloomfilter: patch to fix build on 32 bit platforms
Diffstat (limited to 'pkgs/development/haskell-modules/patches')
-rw-r--r--pkgs/development/haskell-modules/patches/bloomfilter-fix-on-32bit.patch28
1 files changed, 28 insertions, 0 deletions
diff --git a/pkgs/development/haskell-modules/patches/bloomfilter-fix-on-32bit.patch b/pkgs/development/haskell-modules/patches/bloomfilter-fix-on-32bit.patch
new file mode 100644
index 00000000000..7b32dcb4ab6
--- /dev/null
+++ b/pkgs/development/haskell-modules/patches/bloomfilter-fix-on-32bit.patch
@@ -0,0 +1,28 @@
+From 35d972b3dc5056110d55315f2256d9c5046299c7 Mon Sep 17 00:00:00 2001
+From: Peter Simons <simons@cryp.to>
+Date: Tue, 1 Sep 2015 17:58:36 +0200
+Subject: [PATCH] Revert "Fix maximum sizing calculation."
+
+This reverts commit 44b01ba38b4fcdb5a85f44fa2f3af1f29cde8f40. The change breaks
+this package on 32 bit platforms. See https://github.com/bos/bloomfilter/issues/7
+for further details.
+---
+ Data/BloomFilter/Easy.hs | 2 +-
+ 1 file changed, 1 insertion(+), 1 deletion(-)
+
+diff --git a/Data/BloomFilter/Easy.hs b/Data/BloomFilter/Easy.hs
+index 5143c6e..a349168 100644
+--- a/Data/BloomFilter/Easy.hs
++++ b/Data/BloomFilter/Easy.hs
+@@ -72,7 +72,7 @@ safeSuggestSizing capacity errRate
+             minimum [((-k) * cap / log (1 - (errRate ** (1 / k))), k)
+                      | k <- [1..100]]
+         roundedBits = nextPowerOfTwo (ceiling bits)
+-    in if roundedBits <= 0 || roundedBits > 0xffffffff
++    in if roundedBits <= 0
+        then Left  "capacity too large to represent"
+        else Right (roundedBits, truncate hashes)
+ 
+-- 
+2.5.1
+