summaryrefslogtreecommitdiff
path: root/gnu/packages/haskell.scm
diff options
context:
space:
mode:
Diffstat (limited to 'gnu/packages/haskell.scm')
-rw-r--r--gnu/packages/haskell.scm92
1 files changed, 65 insertions, 27 deletions
diff --git a/gnu/packages/haskell.scm b/gnu/packages/haskell.scm
index dddc85459a..5f2e36b9ba 100644
--- a/gnu/packages/haskell.scm
+++ b/gnu/packages/haskell.scm
@@ -23,6 +23,7 @@
;;; Copyright © 2021 Matthew James Kraai <kraai@ftbfs.org>
;;; Copyright © 2021 Xinglu Chen <public@yoctocell.xyz>
;;; Copyright © 2021 Simon Tournier <zimon.toutoune@gmail.com>
+;;; Copyright © 2023 Maxim Cournoyer <maxim.cournoyer@gmail.com>
;;;
;;; This file is part of GNU Guix.
;;;
@@ -730,7 +731,11 @@ interactive environment for the functional language Haskell.")
(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)
@@ -894,7 +899,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
@@ -1002,7 +1009,13 @@ interactive environment for the functional language Haskell.")
version "/" name "-" version "-testsuite.tar.xz"))
(sha256
(base32
- "0s8lf9sxj7n89pjagi58b3fahnp34qvmwhnn0j1fbg6955vbrfj6"))))))
+ "0s8lf9sxj7n89pjagi58b3fahnp34qvmwhnn0j1fbg6955vbrfj6"))
+ (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")))))))
(arguments
(substitute-keyword-arguments (package-arguments ghc-8.0)
((#:phases phases)
@@ -1064,10 +1077,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)
@@ -1139,10 +1159,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/pinned) ; invoked during tests
,@(filter (match-lambda
(("ghc-bootstrap" . _) #f)
@@ -1191,10 +1218,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/pinned) ; invoked during tests
,@(filter (match-lambda
(("ghc-bootstrap" . _) #f)
@@ -1260,7 +1294,14 @@ interactive environment for the functional language Haskell.")
version "/ghc-" version "-testsuite.tar.xz"))
(sha256
(base32
- "1m5fzhr4gjn9ni8gxx7ag3fkbw1rspjzgv39mnfb0nkm5mw70v3s"))))
+ "1m5fzhr4gjn9ni8gxx7ag3fkbw1rspjzgv39mnfb0nkm5mw70v3s"))
+ (patches (search-patches "ghc-9.2-grep-warnings.patch"))
+ (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)
@@ -1292,20 +1333,16 @@ interactive environment for the functional language Haskell.")
(substitute-keyword-arguments (package-arguments base)
((#:phases phases '%standard-phases)
#~(modify-phases #$phases
- ;; File Common.hs has been moved to src/ in this release.
- (replace 'fix-cc-reference
- (lambda _
- (substitute* "utils/hsc2hs/src/Common.hs"
- (("\"cc\"") "\"gcc\""))))
- ;; FIXME: Remove i686-specific match on the next rebuild cycle.
- #$@(match (%current-system)
- ("i686-linux"
- #~((add-after 'skip-more-tests 'skip-T21694-i686
- (lambda _
- (substitute* '("testsuite/tests/simplCore/should_compile/all.T")
- (("^test\\('T21694', \\[ " all)
- (string-append all "when(arch('i386'), skip), ")))))))
- (_ #~()))))
+ ;; File Common.hs has been moved to src/ in this release.
+ (replace 'fix-cc-reference
+ (lambda _
+ (substitute* "utils/hsc2hs/src/Common.hs"
+ (("\"cc\"") "\"gcc\""))))
+ (add-after 'skip-more-tests 'skip-T21694-i686
+ (lambda _
+ (substitute* '("testsuite/tests/simplCore/should_compile/all.T")
+ (("^test\\('T21694', \\[ " all)
+ (string-append all "when(arch('i386'), skip), ")))))))
;; Increase verbosity, so running the test suite does not time out on CI.
((#:make-flags make-flags ''())
#~(cons "VERBOSE=4" #$make-flags))))
@@ -1317,11 +1354,12 @@ interactive environment for the functional language Haskell.")
,(origin
(method url-fetch)
(uri (string-append
- "https://www.haskell.org/ghc/dist/"
- version "/ghc-" version "-testsuite.tar.xz"))
+ "https://www.haskell.org/ghc/dist/"
+ version "/ghc-" version "-testsuite.tar.xz"))
(sha256
(base32
- "19ha0hidrijawy53vm2r0sgml5zkl8126mqy7p0pyacmw3k7913l"))))
+ "19ha0hidrijawy53vm2r0sgml5zkl8126mqy7p0pyacmw3k7913l"))
+ (patches (search-patches "ghc-9.2-grep-warnings.patch"))))
,@(filter (match-lambda
(("ghc-bootstrap" . _) #f)
(("ghc-testsuite" . _) #f)