haskellPackages.foundation: fix on ghcjs

This commit is contained in:
Alexandre Esteves
2026-02-18 02:43:38 +00:00
parent de44764f21
commit 5bda4227ab
2 changed files with 18 additions and 0 deletions

View File

@@ -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 [

View File

@@ -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