From patchwork Thu Feb 15 08:50:03 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Saku Laesvuori X-Patchwork-Id: 60348 Return-Path: X-Original-To: patchwork@mira.cbaines.net Delivered-To: patchwork@mira.cbaines.net Received: by mira.cbaines.net (Postfix, from userid 113) id BA6ED27BBEA; Thu, 15 Feb 2024 08:53:14 +0000 (GMT) X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on mira.cbaines.net X-Spam-Level: X-Spam-Status: No, score=-2.7 required=5.0 tests=BAYES_00,DKIM_INVALID, DKIM_SIGNED,MAILING_LIST_MULTI,RCVD_IN_MSPIKE_H4,RCVD_IN_MSPIKE_WL, SPF_HELO_PASS,URIBL_BLOCKED autolearn=ham autolearn_force=no version=3.4.6 Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) by mira.cbaines.net (Postfix) with ESMTPS id 7D9EC27BBE2 for ; Thu, 15 Feb 2024 08:53:13 +0000 (GMT) Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1raXTG-0000W1-Ac; Thu, 15 Feb 2024 03:51:54 -0500 Received: from eggs.gnu.org ([2001:470:142:3::10]) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1raXTF-0000Ue-5H for guix-patches@gnu.org; Thu, 15 Feb 2024 03:51:53 -0500 Received: from debbugs.gnu.org ([2001:470:142:5::43]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1raXTE-00046Y-SV for guix-patches@gnu.org; Thu, 15 Feb 2024 03:51:52 -0500 Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1raXTX-0001AW-BK; Thu, 15 Feb 2024 03:52:11 -0500 X-Loop: help-debbugs@gnu.org Subject: [bug#67921] [PATCH v2 22/23] gnu: Add ghc-9.6 Resent-From: Saku Laesvuori Original-Sender: "Debbugs-submit" Resent-CC: lars@6xq.net, guix-patches@gnu.org Resent-Date: Thu, 15 Feb 2024 08:52:11 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 67921 X-GNU-PR-Package: guix-patches X-GNU-PR-Keywords: patch To: 67921@debbugs.gnu.org Cc: Saku Laesvuori , Lars-Dominik Braun X-Debbugs-Original-To: guix-patches@gnu.org, 67921@debbugs.gnu.org X-Debbugs-Original-Xcc: Lars-Dominik Braun Received: via spool by 67921-submit@debbugs.gnu.org id=B67921.17079871064285 (code B ref 67921); Thu, 15 Feb 2024 08:52:11 +0000 Received: (at 67921) by debbugs.gnu.org; 15 Feb 2024 08:51:46 +0000 Received: from localhost ([127.0.0.1]:54044 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1raXT7-00016x-Ey for submit@debbugs.gnu.org; Thu, 15 Feb 2024 03:51:45 -0500 Received: from vmi571514.contaboserver.net ([75.119.130.101]:55072 helo=mail.laesvuori.fi) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1raXSa-00012G-E9 for 67921@debbugs.gnu.org; Thu, 15 Feb 2024 03:51:13 -0500 Received: from X-kone.org.aalto.fi (unknown [130.233.144.187]) by mail.laesvuori.fi (Postfix) with ESMTPSA id 75DEB343681; Thu, 15 Feb 2024 09:51:31 +0100 (CET) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=laesvuori.fi; s=mail; t=1707987091; bh=8McD71PgWAmFv796ocCVx7tsA3u18Rw5tyFELJ25lxk=; h=From:To:Cc:Subject:Date:In-Reply-To:References; b=qpWDeAbd4NZ6qaCnNdhTuOA7M/BbahX8uAmbZ4bbhIq0yPXWsyZWiVVylvGxLBm3r hjJRypfuOYTHdzZhw3mhI1V/bQ4Kb8a01w6697FWlWCet2Kbvgpq1TlOjRhmiLPLQM GmVoNifdnoxvALsZoqmBvgY8cmI6oytsQRvK5P9w= Date: Thu, 15 Feb 2024 10:50:03 +0200 Message-ID: <073e883857858856f28e19843adbef915ab9df60.1707827100.git.saku@laesvuori.fi> X-Mailer: git-send-email 2.41.0 In-Reply-To: References: MIME-Version: 1.0 X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list X-BeenThere: guix-patches@gnu.org List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Reply-to: Saku Laesvuori X-ACL-Warn: , Saku Laesvuori via Guix-patches X-Patchwork-Original-From: Saku Laesvuori via Guix-patches via From: Saku Laesvuori Errors-To: guix-patches-bounces+patchwork=mira.cbaines.net@gnu.org Sender: guix-patches-bounces+patchwork=mira.cbaines.net@gnu.org X-getmail-retrieved-from-mailbox: Patches * gnu/packages/haskell.scm (ghc-9.6): New variable. Change-Id: I6883ed973bdd1d6eaf981605c1bc8f855f850187 --- gnu/packages/haskell.scm | 108 ++++++++++++++++++++++++++++++++++++++- 1 file changed, 107 insertions(+), 1 deletion(-) diff --git a/gnu/packages/haskell.scm b/gnu/packages/haskell.scm index 9e1e659cf1..e316fc860e 100644 --- a/gnu/packages/haskell.scm +++ b/gnu/packages/haskell.scm @@ -72,7 +72,8 @@ (define-module (gnu packages haskell) #:use-module (guix packages) #:use-module (guix utils) #:use-module (ice-9 match) - #:use-module (ice-9 regex)) + #:use-module (ice-9 regex) + #:use-module (srfi srfi-26)) (define-public cl-yale-haskell (let ((commit "85f94c72a16c5f70301dd8db04cde9de2d7dd270") @@ -2056,4 +2057,109 @@ (define hadrian-for-ghc-9.6 It is based on the Shake library and replaces @{make} in building GHC") (license license:expat))) +(define-public ghc-9.6 + (let ((base ghc-9.4)) + (package + (inherit base) + (name "ghc-next") + (version "9.6.4") + (source (origin + (inherit (package-source base)) + (uri (string-append "https://www.haskell.org/ghc/dist/" version + "/ghc-" version "-src.tar.xz")) + (sha256 + (base32 + "1h6lpx8kd4xycjwb8iv2rgnz23kwq5b0qp4bhvczsx3in2w2bgqh")))) + (arguments + (substitute-keyword-arguments (package-arguments base) + ((#:make-flags flags ''()) + #~(list "-V" "--docs=no-sphinx")) + ((#:phases phases '%standard-phases) + #~(let* ((run-hadrian (lambda args + (apply invoke "hadrian" args)))) + (modify-phases #$phases + (delete 'fix-shell-wrappers) + ;; https://gitlab.haskell.org/ghc/ghc/-/issues/22557 + (add-before 'build 'fix-iserv-rpath + (lambda _ + (mkdir-p "_build") + (call-with-output-file + "_build/hadrian.settings" + (lambda (port) + (display + (string-append + "*.iserv.ghc.link.opts += -optl-Wl,-rpath," + #$output "/lib/ghc-" #$(package-version this-package) + "/lib/" #$(or (%current-target-system) + (%current-system)) + "-ghc-" #$(package-version this-package) "/") + port))))) + (replace 'build + (lambda* (#:key (parallel-build? #f) (make-flags '()) + #:allow-other-keys) + (apply run-hadrian + `("binary-dist-dir" + ,@(if parallel-build? + `(,(string-append "-j" (number->string (parallel-job-count)))) + '()) + ,@make-flags)))) + (replace 'check + (lambda* (#:key (tests? #t) (parallel-tests? #f) (make-flags '()) #:allow-other-keys) + (if tests? + (apply run-hadrian + `(,@(if parallel-tests? + `(,(string-append "-j" (number->string (parallel-job-count)))) + '()) + ,@make-flags + "test" + "--skip-perf")) + (format #t "test suite not run~%")))) + (replace 'install + (lambda* (#:key (make-flags '()) #:allow-other-keys) + (apply run-hadrian + `("install" + ,@make-flags + ,(string-append "--prefix=" #$output))))) + (add-after 'install 'replace-$pkgroot + (lambda _ + (substitute* + (find-files + (string-append #$output "/lib/ghc-" + #$(package-version this-package) + "/lib/package.conf.d/") + "^.*\\.conf$") + (("\\$\\{pkgroot\\}/") + (string-append #$output "/lib/ghc-" + #$(package-version this-package) + "/lib/")))))))))) + (inputs (list bash-minimal gmp ncurses libffi)) + (native-inputs + `(("perl" ,perl) + ("python" ,python) + ("git" ,git-minimal/pinned) + ("which" ,which) + ("ghostscript" ,ghostscript) + ("autoconf" ,autoconf) + ("automake" ,automake) + + ("hadrian" ,hadrian-for-ghc-9.6) + ("ghc-bootstrap" ,ghc-bootstrap-for-9.6) + ("ghc-alex" ,ghc-alex-bootstrap-for-9.4) + ("ghc-happy" ,ghc-happy-bootstrap-for-9.4) + ("ghc-testsuite" + ,(origin + (method url-fetch) + (uri (string-append + "https://www.haskell.org/ghc/dist/" + version "/ghc-" version "-testsuite.tar.xz")) + (sha256 + (base32 + "0wwd6d68aia2rmlpki30azz0raf98is472cqljhbzzdzpqpjh4vf")))))) + (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