diff options
Diffstat (limited to 'gnu/packages/haskell.scm')
-rw-r--r-- | gnu/packages/haskell.scm | 74 |
1 files changed, 70 insertions, 4 deletions
diff --git a/gnu/packages/haskell.scm b/gnu/packages/haskell.scm index 0ddaad9d52..32691b608e 100644 --- a/gnu/packages/haskell.scm +++ b/gnu/packages/haskell.scm @@ -20,6 +20,8 @@ ;;; Copyright © 2019 Robert Vollmert <rob@vllmrt.net> ;;; Copyright © 2019 Jacob MacDonald <jaccarmac@gmail.com> ;;; Copyright © 2020 Marius Bakke <mbakke@fastmail.com> +;;; Copyright © 2021 Matthew James Kraai <kraai@ftbfs.org> +;;; Copyright © 2021 Xinglu Chen <public@yoctocell.xyz> ;;; ;;; This file is part of GNU Guix. ;;; @@ -609,17 +611,22 @@ interactive environment for the functional language Haskell.") (file-pattern ".*\\.conf\\.d$") (file-type 'directory)))))) +;; Versions newer than ghc defined below (i.e. the compiler +;; haskell-build-system uses) should use ghc-next as their name to +;; ensure ghc (without version specification) and ghc-* packages are +;; always compatible. See https://issues.guix.gnu.org/issue/47335. + (define-public ghc-8.8 (package (inherit ghc-8.6) - (name "ghc") - (version "8.8.3") + (name "ghc-next") + (version "8.8.4") (source (origin (method url-fetch) (uri (string-append "https://www.haskell.org/ghc/dist/" version "/ghc-" version "-src.tar.xz")) (sha256 - (base32 "128g932i3wix6ic03v04nh5755vyjiidzri9iybwad72yfmc1p70")))) + (base32 "0bgwbxxvdn56l91bp9p5d083gzcfdi6z8l8b17qzjpr3n8w5wl7h")))) (native-inputs `(("ghc-bootstrap" ,ghc-8.6) ("ghc-testsuite" @@ -631,7 +638,7 @@ interactive environment for the functional language Haskell.") (patches (search-patches "ghc-testsuite-dlopen-pie.patch")) (sha256 (base32 - "1l32mp94ll72skfsq1g2fqax4bkiw8b85gr3wd0bbqsqyi9a9jpr")))) + "0c55pj2820q26rikhpf636sn4mjgqsxjrl94vsywrh79dxp3k14z")))) ("git" ,git) ; invoked during tests ,@(filter (match-lambda (("ghc-bootstrap" . _) #f) @@ -642,6 +649,11 @@ interactive environment for the functional language Haskell.") (substitute-keyword-arguments (package-arguments ghc-8.6) ((#:phases phases '%standard-phases) `(modify-phases ,phases + (add-after 'fix-references 'fix-cc-reference + (lambda _ + (substitute* "utils/hsc2hs/Common.hs" + (("\"cc\"") "\"gcc\"")) + #t)) (add-after 'unpack-testsuite 'skip-more-tests (lambda _ ;; XXX: This test fails because our ld-wrapper script @@ -656,6 +668,60 @@ interactive environment for the functional language Haskell.") (file-pattern ".*\\.conf\\.d$") (file-type 'directory)))))) +(define-public ghc-8.10 + (package + (inherit ghc-8.8) + (name "ghc-next") + (version "8.10.7") + (source + (origin + (method url-fetch) + (uri (string-append "https://www.haskell.org/ghc/dist/" + version "/ghc-" version "-src.tar.xz")) + (sha256 + (base32 "179ws2q0dinl1a39wm9j37xzwm84zfz3c5543vz8v479khigdvp3")))) + (native-inputs + `(("ghc-bootstrap" ,ghc-8.8) + ("ghc-testsuite" + ,(origin + (method url-fetch) + (uri (string-append + "https://www.haskell.org/ghc/dist/" + version "/ghc-" version "-testsuite.tar.xz")) + (patches (search-patches "ghc-testsuite-dlopen-pie.patch")) + (sha256 + (base32 + "1zl25gg6bpx5601k8h3cqnns1xfc0nqgwnh8jvn2s65ra3f2g1nz")))) + ("git" ,git-minimal) ; invoked during tests + ,@(filter (match-lambda + (("ghc-bootstrap" . _) #f) + (("ghc-testsuite" . _) #f) + (_ #t)) + (package-native-inputs ghc-8.8)))) + (arguments + (substitute-keyword-arguments (package-arguments ghc-8.8) + ((#:phases phases '%standard-phases) + `(modify-phases ,phases + (add-after 'unpack-testsuite 'patch-more-shebangs + (lambda* (#:key inputs #:allow-other-keys) + (let ((bash (assoc-ref inputs "bash"))) + (substitute* '("testsuite/tests/driver/T8602/T8602.script") + (("/bin/sh") + (string-append bash "/bin/sh")))))) + ;; Mark failing tests as broken. Reason for failure is unknown. + (add-after 'skip-more-tests 'skip-even-more-tests + (lambda _ + (substitute* '("testsuite/tests/driver/T16521/all.T") + (("extra_files" all) (string-append "[" all)) + (("\\]\\), " all) + (string-append all "expect_broken(0)], "))))))))) + (native-search-paths (list (search-path-specification + (variable "GHC_PACKAGE_PATH") + (files (list + (string-append "lib/ghc-" version))) + (file-pattern ".*\\.conf\\.d$") + (file-type 'directory)))))) + (define-public ghc-8 ghc-8.6) (define-public ghc ghc-8) |