From 1d7552697a1a4ed80d4328653a7449f7195791b8 Mon Sep 17 00:00:00 2001 From: Lars-Dominik Braun Date: Sat, 31 Dec 2022 11:20:41 +0100 Subject: gnu: Add ghc-9.2. * gnu/packages/haskell.scm (ghc-9.2): New variable. --- gnu/packages/haskell.scm | 49 +++++++++++++++++++++++++++++++++++++++++++++++- 1 file changed, 48 insertions(+), 1 deletion(-) (limited to 'gnu') diff --git a/gnu/packages/haskell.scm b/gnu/packages/haskell.scm index 692b27a097..28d6fa0d39 100644 --- a/gnu/packages/haskell.scm +++ b/gnu/packages/haskell.scm @@ -1241,6 +1241,8 @@ interactive environment for the functional language Haskell.") (define-public ghc-8 ghc-8.10) +(define-public ghc ghc-8) + (define-public ghc-9.0 (package (inherit ghc-8.10) @@ -1277,6 +1279,51 @@ interactive environment for the functional language Haskell.") (file-pattern ".*\\.conf\\.d$") (file-type 'directory)))))) -(define-public ghc ghc-8) +(define-public ghc-9.2 + ;; Use 8.10 to shorten the build chain. + (let ((base ghc-8.10)) + (package + (inherit base) + (name "ghc-next") + (version "9.2.5") + (source (origin + (method url-fetch) + (uri (string-append "https://www.haskell.org/ghc/dist/" version + "/ghc-" version "-src.tar.xz")) + (sha256 + (base32 + "07028i0hm74svvq9b3jpkczaj6lsdgn3hgr4wa7diqiq3dypj1h6")))) + (arguments + (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\"")))))))) + (native-inputs + `(;; GHC 9.2 must be built with GHC >= 8.6. + ("ghc-bootstrap" ,base) + ("ghc-testsuite" + ,(origin + (method url-fetch) + (uri (string-append + "https://www.haskell.org/ghc/dist/" + version "/ghc-" version "-testsuite.tar.xz")) + (sha256 + (base32 + "19ha0hidrijawy53vm2r0sgml5zkl8126mqy7p0pyacmw3k7913l")))) + ,@(filter (match-lambda + (("ghc-bootstrap" . _) #f) + (("ghc-testsuite" . _) #f) + (_ #t)) + (package-native-inputs base)))) + (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))))))) ;;; haskell.scm ends here -- cgit 1.4.1