unofficial mirror of guix-patches@gnu.org 
 help / color / mirror / code / Atom feed
From: Xinglu Chen <public@yoctocell.xyz>
To: 49606@debbugs.gnu.org
Cc: Ricardo Wurmus <rekado@elephly.net>,
	John Kehayias <john.kehayias@protonmail.com>,
	Sarah Morgensen <iskarian@mgsn.dev>
Subject: [bug#49606] [PATCH wip-haskell v2] gnu: Add ghc-8.10.
Date: Sat, 31 Jul 2021 00:12:44 +0200	[thread overview]
Message-ID: <50732186fb1a7b17d2d44d172957ba145607debf.1627682631.git.public@yoctocell.xyz> (raw)
In-Reply-To: <039023c844a5fa57c050bab868677dabd08b1bb0.1626535972.git.public@yoctocell.xyz>

* gnu/packages/haskell.scm (ghc-8.10): New variable.
---
Changes since v1:

* Fix /bin/sh path in one of the tests.

Unfortunately, I haven’t been able to fix the T16521 test; I tried
setting the C_INCLUDE_PATH variable to ‘libraries/process/include’, but
it’s still not able to find ’processFlags.h’.  Not sure if there is
anything else I could try.  Would it be OK to merge this despite the
failing test?

Also, this patch should go to the ‘wip-haskell’ branch; once/if it gets
merged it would be a good idea to update the Stackage LTS release and
update all the Haskell packages.

gnu/packages/haskell.scm | 59 ++++++++++++++++++++++++++++++++++++++++
 1 file changed, 59 insertions(+)

diff --git a/gnu/packages/haskell.scm b/gnu/packages/haskell.scm
index 09732fc594..089ea7ceb0 100644
--- a/gnu/packages/haskell.scm
+++ b/gnu/packages/haskell.scm
@@ -20,6 +20,7 @@
 ;;; Copyright © 2019 Robert Vollmert <rob@vllmrt.net>
 ;;; Copyright © 2019 Jacob MacDonald <jaccarmac@gmail.com>
 ;;; Copyright © 2020 Marius Bakke <mbakke@fastmail.com>
+;;; Copyright © 2021 Xinglu Chen <public@yoctocell.xyz>
 ;;;
 ;;; This file is part of GNU Guix.
 ;;;
@@ -657,6 +658,64 @@ 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")
+    (version "8.10.5")
+    (source
+     (origin
+       (method url-fetch)
+       (uri (string-append "https://www.haskell.org/ghc/dist/"
+                           version "/ghc-" version "-src.tar.xz"))
+       (sha256
+        (base32 "0vq7wch0wfvy2b5dbi308lq5225vf691n95m19c9igagdvql22gi"))))
+    (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
+             "0vcq774rfb6q8vsnh7p5clxp2qaz8ip6d2bm2ghbq53n8jl296d6"))))
+       ("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 'fix-cc-name
+             (lambda _
+               (substitute* "utils/hsc2hs/Common.hs"
+                 (("\"cc\"") "\"gcc\""))))
+           (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"))))))
+           (add-after 'skip-more-tests 'skip-even-more-tests
+             (lambda _
+               ;; FIXME: It is unable to find some C header files;
+               ;; setting C_INCLUDE_PATH doesn't help either.
+               (substitute* '("testsuite/tests/driver/T16521/all.T")
+                 (("^.*" all)
+                  (string-append "# guix skipped: " all)))))))))
+    (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)

base-commit: f2470e9a4bcd47d526e14721bbd2693fb979d306
-- 
2.32.0






  parent reply	other threads:[~2021-07-30 22:14 UTC|newest]

Thread overview: 12+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-07-17 15:34 [bug#49606] [PATCH] gnu: Add ghc-8.10 Xinglu Chen
2021-07-17 19:24 ` Sarah Morgensen via Guix-patches via
2021-07-23 20:48   ` Xinglu Chen
2021-07-30 22:12 ` Xinglu Chen [this message]
2021-08-12 10:18   ` [bug#49606] [PATCH wip-haskell v2] " Xinglu Chen
2021-09-13 14:24     ` Lars-Dominik Braun
2021-09-13 16:07       ` Xinglu Chen
2021-09-13 16:55         ` John Kehayias via Guix-patches via
2021-09-14 13:02         ` Lars-Dominik Braun
2021-09-14 15:21           ` Xinglu Chen
2021-09-15  7:46             ` bug#49606: " Lars-Dominik Braun
2021-09-15 19:31               ` [bug#49606] " John Kehayias via Guix-patches via

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

  List information: https://guix.gnu.org/

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=50732186fb1a7b17d2d44d172957ba145607debf.1627682631.git.public@yoctocell.xyz \
    --to=public@yoctocell.xyz \
    --cc=49606@debbugs.gnu.org \
    --cc=iskarian@mgsn.dev \
    --cc=john.kehayias@protonmail.com \
    --cc=rekado@elephly.net \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
Code repositories for project(s) associated with this public inbox

	https://git.savannah.gnu.org/cgit/guix.git

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).