From patchwork Fri Jun 7 07:49:53 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Saku Laesvuori X-Patchwork-Id: 65212 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 9716227BBE2; Fri, 7 Jun 2024 08:53:25 +0100 (BST) 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,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 E639527BBE9 for ; Fri, 7 Jun 2024 08:53:22 +0100 (BST) Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1sFUP4-0001up-0Z; Fri, 07 Jun 2024 03:52:50 -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 1sFUP2-0001uE-ID for guix-patches@gnu.org; Fri, 07 Jun 2024 03:52:48 -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 1sFUP2-0006wI-4N for guix-patches@gnu.org; Fri, 07 Jun 2024 03:52:48 -0400 Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1sFUPH-0004Rx-5q; Fri, 07 Jun 2024 03:53:03 -0400 X-Loop: help-debbugs@gnu.org Subject: [bug#67921] [PATCH haskell-team 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: Fri, 07 Jun 2024 07:53:03 +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-Xcc: Lars-Dominik Braun Received: via spool by 67921-submit@debbugs.gnu.org id=B67921.171774676117018 (code B ref 67921); Fri, 07 Jun 2024 07:53:03 +0000 Received: (at 67921) by debbugs.gnu.org; 7 Jun 2024 07:52:41 +0000 Received: from localhost ([127.0.0.1]:60409 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1sFUOu-0004QP-Pf for submit@debbugs.gnu.org; Fri, 07 Jun 2024 03:52:41 -0400 Received: from vmi571514.contaboserver.net ([75.119.130.101]:34412 helo=mail.laesvuori.fi) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1sFUOr-0004PN-Ha for 67921@debbugs.gnu.org; Fri, 07 Jun 2024 03:52:38 -0400 Received: from X-kone.org.aalto.fi (unknown [130.233.144.95]) by mail.laesvuori.fi (Postfix) with ESMTPSA id 5CC9C3436EF; Fri, 7 Jun 2024 09:52:48 +0200 (CEST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=laesvuori.fi; s=mail; t=1717746768; bh=V+YNd5aohO1vUP9z0gWXOGUWWR2KpSk/rwnC8Z0jLUE=; h=From:To:Cc:Subject:Date:In-Reply-To:References; b=f4pjJxeGedrVtuT75j7eJNAKVkvHIqQQsQ1RFB5+01V3wiye2hCxL72EAzZ1mlY4u w4ysI5vwsC4JVQMTTZ/aSXT+U29FVyvHye1VMB1j3HtAHOCZjJgc6GpiN01ayTyUW2 i82kzT9kiCV24uED+ErSEaFdO6A/h6L9S4d47riY= Date: Fri, 7 Jun 2024 10:49:53 +0300 Message-ID: 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 | 157 ++++++++++++++++++++++++++++++++++++++- 1 file changed, 155 insertions(+), 2 deletions(-) diff --git a/gnu/packages/haskell.scm b/gnu/packages/haskell.scm index 5070833a94..158bdd41bd 100644 --- a/gnu/packages/haskell.scm +++ b/gnu/packages/haskell.scm @@ -2115,14 +2115,14 @@ (define ghc-primitive-bootstrap-for-9.6 (define hadrian-for-ghc-9.6 (package (name "hadrian") - (version "9.6.4") + (version "9.6.5") (source (origin (method url-fetch) (uri (string-append "https://www.haskell.org/ghc/dist/" version "/ghc-" version "-src.tar.xz")) (sha256 (base32 - "1h6lpx8kd4xycjwb8iv2rgnz23kwq5b0qp4bhvczsx3in2w2bgqh")))) + "0g5r68j788i6lbx71xpws4xb7nn871rpa8ji41na5hcq9y98kcw7")))) (build-system haskell-build-system) (inputs (list ghc-base16-bytestring-bootstrap-for-9.6 @@ -2152,4 +2152,157 @@ (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.5") + (source (origin + (inherit (package-source base)) + (uri (string-append "https://www.haskell.org/ghc/dist/" version + "/ghc-" version "-src.tar.xz")) + (sha256 + (base32 + "0g5r68j788i6lbx71xpws4xb7nn871rpa8ji41na5hcq9y98kcw7")))) + (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 + (replace 'fix-lib-paths + (lambda* (#:key inputs #:allow-other-keys) + (substitute* + (list "libraries/process/System/Process/Posix.hs" + "libraries/unix/cbits/execvpe.c") + (("/bin/sh") (search-input-file inputs "/bin/sh"))))) + (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" + ,(string-append "--broken-test=" + (string-join + (list "bkpcabal01" + "cabal01" + "cabal06" + "cabal08" + "haddock_parser_perf" + "haddock_renamer_perf" + "package-imports-20779" + "plugins01" + "plugins08" + "plugins10" + "recomp007" + "recompChangedPackage" + "recompPkgLink" + "recompPluginPackage" + "recompTHpackage" + "T10420" + "T10458" + "T12504" + "T13340" + "T1372" + "T14304" + "T16219" + "T20218b" + "T22333" + "T3007" + "T7014" + "T8832" + "test-defaulting-plugin" + "plugin-recomp-change" + "plugin-recomp-change-2" + "plugin-recomp-change-prof" + "plugin-recomp-flags" + "plugin-recomp-impure" + "plugin-recomp-pure" + "plugins-order" + "plugins-order-pragma" + "T15633a" + "T15633b" + "T15858" + "T20417"))) + "--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 + "0k521601lgbs03ii66nb6y1y9327x4965zz3niyr3xswjx4dz8yw")))))) + (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