On Tue, Mar 23 2021, zimoun wrote:

>> Maybe its time to update to a newer Stackage LTS release? :)
>
> Well, I do not know if it possible to do so before the next release.
> IMHO, let focus on what remains for the next release and let upgrade the
> Stackage LTS after.

Any updates on this?  I managed to build GHC 8.10.5 (on x86_64), but I
had to disable some tests.  I have attached the patch if anyone wants to
take a look.  :)

From 9ecfe7cb3f94b928dbd883d4b7e7c007278c0fa8 Mon Sep 17 00:00:00 2001
Message-Id: <9ecfe7cb3f94b928dbd883d4b7e7c007278c0fa8.1623177424.git.pub...@yoctocell.xyz>
From: Xinglu Chen <pub...@yoctocell.xyz>
Date: Tue, 18 May 2021 23:32:38 +0200
Subject: [RFC PATCH] gnu: Add ghc-8.10.

* gnu/packages/haskell.scm (ghc-8.10): New variable.
---
 gnu/packages/haskell.scm | 66 ++++++++++++++++++++++++++++++++++++++++
 1 file changed, 66 insertions(+)

diff --git a/gnu/packages/haskell.scm b/gnu/packages/haskell.scm
index 09732fc594..8de3118136 100644
--- a/gnu/packages/haskell.scm
+++ b/gnu/packages/haskell.scm
@@ -657,6 +657,72 @@ 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.6)
+       ("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.6))))
+    (arguments
+     (substitute-keyword-arguments (package-arguments ghc-8.6)
+       ((#:phases phases '%standard-phases)
+        `(modify-phases ,phases
+           (add-after 'unpack-testsuite 'skip-more-tests
+             (lambda _
+               ;; XXX: This test fails because our ld-wrapper script
+               ;; mangles the response file passed to the linker.
+               (substitute* "testsuite/tests/hp2ps/all.T"
+                 (("^test\\('T15904'") "# guix skipped: test('T15904'"))
+               ;; The following tests fail because they are unable to
+               ;; find a C compiler.
+               (substitute* "testsuite/tests/hsc2hs/all.T"
+                 (("^test\\('" all)
+                  (string-append "# guix skipped: " all)))
+               (substitute* "testsuite/tests/ffi/should_run/all.T"
+                 (("^test\\('Capi_Ctype_00(1|2)'" all)
+                  (string-append "# guix skipped: " all)))
+               (substitute* "testsuite/tests/ffi/should_run/all.T"
+                 (("makefile_test, \\['Capi_Ctype_00(1|2)'\\].*" all)
+                  (string-append "# guix skipped: " all)))
+               (substitute* "libraries/base/tests/IO/T12010/test.T"
+                 (("^.*" all)
+                  (string-append "# guix skipped: " all)))
+               ;; No idea why these are failing
+               (substitute* '("testsuite/tests/driver/T8602/T8602.T"
+                              "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: 503c2039a280dd52a751a6852b4157fccd1b4195
-- 
2.32.0

Attachment: signature.asc
Description: PGP signature

Reply via email to