diff --git a/pkgs/development/haskell-modules/configuration-common.nix b/pkgs/development/haskell-modules/configuration-common.nix index 3cb4d376fb13..eadc97a06776 100644 --- a/pkgs/development/haskell-modules/configuration-common.nix +++ b/pkgs/development/haskell-modules/configuration-common.nix @@ -509,6 +509,10 @@ with haskellLib; ] super.basement; + # Repo is archived, package is abandoned: https://github.com/haskell-foundation/foundation + # Fixes compilation on ghcjs + foundation = appendPatch ./patches/foundation-ghcjs.patch super.foundation; + # Fixes compilation of memory with GHC >= 9.4 on 32bit platforms # https://github.com/vincenthz/hs-memory/pull/99 memory = appendPatches [ diff --git a/pkgs/development/haskell-modules/patches/foundation-ghcjs.patch b/pkgs/development/haskell-modules/patches/foundation-ghcjs.patch new file mode 100644 index 000000000000..1b2cd33d63ab --- /dev/null +++ b/pkgs/development/haskell-modules/patches/foundation-ghcjs.patch @@ -0,0 +1,14 @@ +diff --git a/foundation.cabal b/foundation.cabal +index d33d874..654488b 100644 +--- a/foundation.cabal ++++ b/foundation.cabal +@@ -169,7 +169,8 @@ library + Foundation.System.Bindings.Hs + + include-dirs: cbits +- c-sources: cbits/foundation_random.c ++ if !os(ghcjs) ++ c-sources: cbits/foundation_random.c + cbits/foundation_network.c + cbits/foundation_time.c + cbits/foundation_utf8.c