summary refs log tree commit diff
path: root/gnu/packages/haskell.scm
diff options
context:
space:
mode:
Diffstat (limited to 'gnu/packages/haskell.scm')
-rw-r--r--gnu/packages/haskell.scm43
1 files changed, 35 insertions, 8 deletions
diff --git a/gnu/packages/haskell.scm b/gnu/packages/haskell.scm
index 8a3c8d44c7..ed2eaea984 100644
--- a/gnu/packages/haskell.scm
+++ b/gnu/packages/haskell.scm
@@ -423,7 +423,11 @@ libraries are included in this package.")
     (inputs
      `(("gmp" ,gmp)
        ("ncurses" ,ncurses)
-       ("libffi" ,libffi)
+
+       ;; Use a LibFFI variant without static trampolines to work around
+       ;; <https://gitlab.haskell.org/ghc/ghc/-/issues/20051>.
+       ("libffi" ,libffi-sans-static-trampolines)
+
        ("ghc-testsuite"
         ,(origin
            (method url-fetch)
@@ -587,7 +591,9 @@ interactive environment for the functional language Haskell.")
     (supported-systems '("i686-linux" "x86_64-linux"))
     (outputs '("out" "doc"))
     (inputs
-     (list gmp ncurses libffi))
+     ;; Use a LibFFI variant without static trampolines to work around
+     ;; <https://gitlab.haskell.org/ghc/ghc/-/issues/20051>.
+     (list gmp ncurses libffi-sans-static-trampolines))
     (native-inputs
      `(("perl" ,perl)
        ("python" ,python-2)                ; for tests
@@ -757,10 +763,17 @@ interactive environment for the functional language Haskell.")
            (uri (string-append
                  "https://www.haskell.org/ghc/dist/"
                  version "/" name "-" version "-testsuite.tar.xz"))
-           (patches (search-patches "ghc-testsuite-dlopen-pie.patch"))
+           (patches (search-patches "ghc-testsuite-dlopen-pie.patch"
+                                    "ghc-testsuite-grep-compat.patch"))
            (sha256
             (base32
-             "0pw9r91g2np3i806g2f4f8z4jfdd7mx226cmdizk4swa7av1qf91"))))
+             "0pw9r91g2np3i806g2f4f8z4jfdd7mx226cmdizk4swa7av1qf91"))
+           (modules '((guix build utils)))
+           (snippet
+            ;; collections.Iterable was moved to collections.abc in Python 3.10.
+            '(substitute* "testsuite/driver/testlib.py"
+               (("collections\\.Iterable")
+                "collections.abc.Iterable")))))
        ,@(filter (match-lambda
                    (("ghc-bootstrap" . _) #f)
                    (("ghc-testsuite" . _) #f)
@@ -832,10 +845,17 @@ interactive environment for the functional language Haskell.")
            (uri (string-append
                  "https://www.haskell.org/ghc/dist/"
                  version "/ghc-" version "-testsuite.tar.xz"))
-           (patches (search-patches "ghc-testsuite-dlopen-pie.patch"))
+           (patches (search-patches "ghc-testsuite-dlopen-pie.patch"
+                                    "ghc-testsuite-grep-compat.patch"))
            (sha256
             (base32
-             "0c55pj2820q26rikhpf636sn4mjgqsxjrl94vsywrh79dxp3k14z"))))
+             "0c55pj2820q26rikhpf636sn4mjgqsxjrl94vsywrh79dxp3k14z"))
+           (modules '((guix build utils)))
+           (snippet
+            ;; collections.Iterable was moved to collections.abc in Python 3.10.
+            '(substitute* "testsuite/driver/testlib.py"
+               (("collections\\.Iterable")
+                "collections.abc.Iterable")))))
        ("git" ,git-minimal/fixed)                 ; invoked during tests
        ,@(filter (match-lambda
                    (("ghc-bootstrap" . _) #f)
@@ -884,10 +904,17 @@ interactive environment for the functional language Haskell.")
            (uri (string-append
                  "https://www.haskell.org/ghc/dist/"
                  version "/ghc-" version "-testsuite.tar.xz"))
-           (patches (search-patches "ghc-testsuite-dlopen-pie.patch"))
+           (patches (search-patches "ghc-testsuite-dlopen-pie.patch"
+                                    "ghc-testsuite-grep-compat.patch"))
            (sha256
             (base32
-             "1zl25gg6bpx5601k8h3cqnns1xfc0nqgwnh8jvn2s65ra3f2g1nz"))))
+             "1zl25gg6bpx5601k8h3cqnns1xfc0nqgwnh8jvn2s65ra3f2g1nz"))
+           (modules '((guix build utils)))
+           (snippet
+            ;; collections.Iterable was moved to collections.abc in Python 3.10.
+            '(substitute* "testsuite/driver/testlib.py"
+               (("collections\\.Iterable")
+                "collections.abc.Iterable")))))
        ("git" ,git-minimal/fixed)                 ; invoked during tests
        ,@(filter (match-lambda
                    (("ghc-bootstrap" . _) #f)