haskellPackages.bloomfilter: patch for GHC >= 9.2

The applied patch seems sensible, using the stock unchecked shifting
functions introduced in base 4.5 instead of a custom implementation
based on GHC internal that changed in 9.2. Sadly upstream maintainer is
inactive, so we need to take action.

Tested for 9.2 and 9.0.
This commit is contained in:
sternenseemann 2022-12-19 12:13:56 +01:00
parent 259fe227c8
commit 189fa87ed2

View file

@ -598,8 +598,24 @@ self: super: {
# https://github.com/basvandijk/concurrent-extra/issues/12
concurrent-extra = dontCheck super.concurrent-extra;
# https://github.com/bos/bloomfilter/issues/7
bloomfilter = appendPatch ./patches/bloomfilter-fix-on-32bit.patch super.bloomfilter;
bloomfilter = appendPatches [
# https://github.com/bos/bloomfilter/issues/7
./patches/bloomfilter-fix-on-32bit.patch
# Fix build with GHC >= 9.2 by using stock unsafeShift* functions
# https://github.com/bos/bloomfilter/pull/20
(pkgs.fetchpatch {
name = "bloomfilter-ghc-9.2-shift.patch";
url = "https://github.com/bos/bloomfilter/pull/20/commits/fb79b39c44404fd791a3bed973e9d844fb084f1e.patch";
sha256 = "0clmr5iar4mhp8nbgh1c1rh4fl7dy0g2kbqqh0af8aqmhjpqzrq3";
})
] (overrideCabal (drv: {
# Make sure GHC 9.2 patch applies correctly
revision = null;
editedCabalFile = null;
prePatch = drv.prePatch or "" + ''
"${pkgs.buildPackages.dos2unix}/bin/dos2unix" *.cabal
'';
}) super.bloomfilter);
# https://github.com/pxqr/base32-bytestring/issues/4
base32-bytestring = dontCheck super.base32-bytestring;