From patchwork Thu Oct 31 12:47:02 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Nicolas Graves X-Patchwork-Id: 69704 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 B588327BBE2; Thu, 31 Oct 2024 12:54:20 +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=-6.4 required=5.0 tests=BAYES_00,DKIM_INVALID, DKIM_SIGNED,MAILING_LIST_MULTI,RCVD_IN_DNSWL_BLOCKED, RCVD_IN_VALIDITY_CERTIFIED,RCVD_IN_VALIDITY_RPBL,RCVD_IN_VALIDITY_SAFE, SPF_HELO_PASS,URIBL_BLOCKED autolearn=unavailable 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 C361827BBE9 for ; Thu, 31 Oct 2024 12:54:18 +0000 (GMT) Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1t6Ugj-0004Et-Af; Thu, 31 Oct 2024 08:54:09 -0400 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 1t6Ugd-0004AE-0l for guix-patches@gnu.org; Thu, 31 Oct 2024 08:54:06 -0400 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 1t6Ugc-0002FE-Mk for guix-patches@gnu.org; Thu, 31 Oct 2024 08:54:02 -0400 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=debbugs.gnu.org; s=debbugs-gnu-org; h=MIME-Version:References:In-Reply-To:Date:From:To:Subject; bh=+OrhFGxXjSmB2ZWHhLNKT4amTDii9S5HURcQniTLFsA=; b=qKv49dYWKj33pWVcCNo4hfY7xXZPgzetJsNeJRPmVhyeXSCC3k76eynGYKbVg1g/9/JGAQLlrQWPyyH9qC+DaMbi60GqDs42u0Pd1RfBLRS5L6AcPzqQSyGnyTaSAa0q653XtPdxIkOwuJY9Oz8vpIvXJrYr9GG/G0e36tnQKJrMBH9XiR1rOoYwOdvPiw9yZfqkPG0fmtNKSar3tz8/odHJFCqK1N+HQhJSFZHqvIFTh4uf8KzIN9+b3grdmPGTcRVVM6M3Q/85/tG5HPF///YQh3gYx9K3USyvDwl7z/17Hd4yfx0OIyer212IUZ8aXE2wVPu2GYrrBbtgwYUavA==; Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1t6Ugc-0007wH-Go for guix-patches@gnu.org; Thu, 31 Oct 2024 08:54:02 -0400 X-Loop: help-debbugs@gnu.org Subject: [bug#67921] [PATCH v3 23/24] gnu: Add ghc-9.6 Resent-From: Nicolas Graves Original-Sender: "Debbugs-submit" Resent-CC: guix-patches@gnu.org Resent-Date: Thu, 31 Oct 2024 12:54:02 +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: dev@jpoiret.xyz, lars@6xq.net, saku@laesvuori.fi Received: via spool by 67921-submit@debbugs.gnu.org id=B67921.173037920630488 (code B ref 67921); Thu, 31 Oct 2024 12:54:02 +0000 Received: (at 67921) by debbugs.gnu.org; 31 Oct 2024 12:53:26 +0000 Received: from localhost ([127.0.0.1]:41989 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1t6Ug0-0007vd-V0 for submit@debbugs.gnu.org; Thu, 31 Oct 2024 08:53:26 -0400 Received: from 15.mo583.mail-out.ovh.net ([178.33.107.29]:49289) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1t6UfQ-0007rJ-9h for 67921@debbugs.gnu.org; Thu, 31 Oct 2024 08:52:49 -0400 Received: from director4.ghost.mail-out.ovh.net (unknown [10.109.140.151]) by mo583.mail-out.ovh.net (Postfix) with ESMTP id 4XfP6R123fz1XSZ for <67921@debbugs.gnu.org>; Thu, 31 Oct 2024 12:52:47 +0000 (UTC) Received: from ghost-submission-5b5ff79f4f-dx2nv (unknown [10.110.113.68]) by director4.ghost.mail-out.ovh.net (Postfix) with ESMTPS id B67881FE9D; Thu, 31 Oct 2024 12:52:46 +0000 (UTC) Received: from ngraves.fr ([37.59.142.104]) by ghost-submission-5b5ff79f4f-dx2nv with ESMTPSA id 8BnCJJ59I2eJ1AAA05gKsg (envelope-from ); Thu, 31 Oct 2024 12:52:46 +0000 Authentication-Results: garm.ovh; auth=pass (GARM-104R0052d22be97-0694-4dc5-bcfe-932fbb18ab37, CD33DFF0435C6B52A7C438D6B876B70D33D893A4) smtp.auth=ngraves@ngraves.fr X-OVh-ClientIp: 80.214.74.119 Date: Thu, 31 Oct 2024 13:47:02 +0100 Message-ID: <20241031125127.14080-24-ngraves@ngraves.fr> X-Mailer: git-send-email 2.46.0 In-Reply-To: <20241031125127.14080-1-ngraves@ngraves.fr> References: <20241031125127.14080-1-ngraves@ngraves.fr> MIME-Version: 1.0 X-Ovh-Tracer-Id: 9051953776186155558 X-VR-SPAMSTATE: OK X-VR-SPAMSCORE: 0 X-VR-SPAMCAUSE: gggruggvucftvghtrhhoucdtuddrgeeftddrvdekhedggeefucetufdoteggodetrfdotffvucfrrhhofhhilhgvmecuqfggjfdpvefjgfevmfevgfenuceurghilhhouhhtmecuhedttdenucenucfjughrpefhvfevufffkffojghfggfgsedtkeertdertddtnecuhfhrohhmpefpihgtohhlrghsucfirhgrvhgvshcuoehnghhrrghvvghssehnghhrrghvvghsrdhfrheqnecuggftrfgrthhtvghrnhepvedvveefhfehveevhfeuueetueelieejleetleevgeefgedujeevgfefgfffgfeunecuffhomhgrihhnpehhrghskhgvlhhlrdhorhhgpdhghhgtrdhlihhnkhenucfkphepuddvjedrtddrtddruddpkedtrddvudegrdejgedrudduledpfeejrdehledrudegvddruddtgeenucevlhhushhtvghrufhiiigvpedtnecurfgrrhgrmhepihhnvghtpeduvdejrddtrddtrddupdhmrghilhhfrhhomhepnhhgrhgrvhgvshesnhhgrhgrvhgvshdrfhhrpdhnsggprhgtphhtthhopedupdhrtghpthhtohepieejledvudesuggvsggsuhhgshdrghhnuhdrohhrghdpoffvtefjohhsthepmhhoheekfedpmhhouggvpehsmhhtphhouhht DKIM-Signature: a=rsa-sha256; bh=+OrhFGxXjSmB2ZWHhLNKT4amTDii9S5HURcQniTLFsA=; c=relaxed/relaxed; d=ngraves.fr; h=From; s=ovhmo4487190-selector1; t=1730379167; v=1; b=JevsKzW9NPsyg8UX7HGt93DrLF5/OW/WVp7HbWum+iwWbx1UGvxlIs+Z71sVQYN3+nMG2p5x SMjMPIOoaRpHOmTiWel4zW7Dzw0CBpkmDrOVCrBqwKgZmnJ/7b8mNSBWorlSRTjpfXgMwi2DMHk CsgJoIBoX4TyrFyyUmLTMT6QjaiVCagcKRF4xwcO63+loan/+C8ETG7yz6bwGiGj1IzmgO81Cb8 fvKQ6DQd7xYv/W2aUKVAjZM2azpMNGOfKOxktOlD22XkzzSShR3fah6ztt3yV60mVCDwVubp3SV kdgc+PrUEI9uMWdHjKGOz1f/KibMQ4nhDQumNjOzZBP+Q== 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: Nicolas Graves X-ACL-Warn: , Nicolas Graves via Guix-patches X-Patchwork-Original-From: Nicolas Graves via Guix-patches via From: Nicolas Graves 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 From: Saku Laesvuori * 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 256fe84c89..239871cfcd 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") @@ -2161,4 +2162,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