diff options
Diffstat (limited to 'gnu/packages/haskell.scm')
-rw-r--r-- | gnu/packages/haskell.scm | 486 |
1 files changed, 203 insertions, 283 deletions
diff --git a/gnu/packages/haskell.scm b/gnu/packages/haskell.scm index ad2aa20ee1..2eb5d6461c 100644 --- a/gnu/packages/haskell.scm +++ b/gnu/packages/haskell.scm @@ -408,7 +408,7 @@ libraries are included in this package.") (define-public ghc-7 (package (name "ghc") - (version "7.10.2") + (version "7.10.3") (source (origin (method url-fetch) @@ -416,7 +416,7 @@ libraries are included in this package.") version "/" name "-" version "-src.tar.xz")) (sha256 (base32 - "1x8m4rp2v7ydnrz6z9g8x7z3x3d3pxhv2pixy7i7hkbqbdsp7kal")))) + "1vsgmic8csczl62ciz51iv8nhrkm72lyhbz7p7id13y2w7fcx46g")))) (build-system gnu-build-system) (supported-systems '("i686-linux" "x86_64-linux")) (outputs '("out" "doc")) @@ -436,7 +436,7 @@ libraries are included in this package.") version "/" name "-" version "-testsuite.tar.xz")) (sha256 (base32 - "0qp9da9ar87zbyn6wjgacd2ic1vgzbi3cklxnhsmjqyafv9qaj4b")))))) + "0fk4xjw1x5lk2ifvgqij06lrbf1vxq9qfix86h9r16c0bilm3hah")))))) (native-inputs `(("perl" ,perl) ("python" ,python-2) ; for tests (fails with python-3) @@ -448,7 +448,8 @@ libraries are included in this package.") ghc-bootstrap-x86_64-7.8.4 ghc-bootstrap-i686-7.8.4)))) (arguments - `(#:test-target "test" + (list + #:test-target "test" ;; We get a smaller number of test failures by disabling parallel test ;; execution. #:parallel-tests? #f @@ -458,117 +459,108 @@ libraries are included in this package.") ;; then complains that they don't match. #:build #f - #:modules ((guix build gnu-build-system) - (guix build utils) - (srfi srfi-26) - (srfi srfi-1)) + #:modules '((guix build gnu-build-system) + (guix build utils) + (srfi srfi-26) + (srfi srfi-1)) #:configure-flags - (list - (string-append "--with-gmp-libraries=" - (assoc-ref %build-inputs "gmp") "/lib") - (string-append "--with-gmp-includes=" - (assoc-ref %build-inputs "gmp") "/include") - "--with-system-libffi" - (string-append "--with-ffi-libraries=" - (assoc-ref %build-inputs "libffi") "/lib") - (string-append "--with-ffi-includes=" - (assoc-ref %build-inputs "libffi") "/include")) + #~(list + (string-append "--with-gmp-libraries=" + (assoc-ref %build-inputs "gmp") "/lib") + (string-append "--with-gmp-includes=" + (assoc-ref %build-inputs "gmp") "/include") + "--with-system-libffi" + (string-append "--with-ffi-libraries=" + (assoc-ref %build-inputs "libffi") "/lib") + (string-append "--with-ffi-includes=" + (assoc-ref %build-inputs "libffi") "/include")) ;; FIXME: The user-guide needs dblatex, docbook-xsl and docbook-utils. ;; Currently we do not have the last one. ;; #:make-flags ;; (list "BUILD_DOCBOOK_HTML = YES") #:phases - (let* ((ghc-bootstrap-path - (string-append (getcwd) "/" ,name "-" ,version "/ghc-bin")) - (ghc-bootstrap-prefix - (string-append ghc-bootstrap-path "/usr" ))) - (alist-cons-after - 'unpack-bin 'unpack-testsuite-and-fix-bins - (lambda* (#:key inputs outputs #:allow-other-keys) - (with-directory-excursion ".." - (copy-file (assoc-ref inputs "ghc-testsuite") - "ghc-testsuite.tar.xz") - (invoke "tar" "xvf" "ghc-testsuite.tar.xz")) - (substitute* - (list "testsuite/timeout/Makefile" - "testsuite/timeout/timeout.py" - "testsuite/timeout/timeout.hs" - "testsuite/tests/rename/prog006/Setup.lhs" - "testsuite/tests/programs/life_space_leak/life.test" - "libraries/process/System/Process/Internals.hs" - "libraries/unix/cbits/execvpe.c") - (("/bin/sh") (which "sh")) - (("/bin/rm") "rm")) - #t) - (alist-cons-after - 'unpack 'unpack-bin - (lambda* (#:key inputs outputs #:allow-other-keys) - (mkdir-p ghc-bootstrap-prefix) - (with-directory-excursion ghc-bootstrap-path - (copy-file (assoc-ref inputs "ghc-binary") - "ghc-bin.tar.xz") - (invoke "tar" "xvf" "ghc-bin.tar.xz"))) - (alist-cons-before - 'install-bin 'configure-bin - (lambda* (#:key inputs outputs #:allow-other-keys) - (let* ((binaries - (list - "./utils/ghc-pwd/dist-install/build/tmp/ghc-pwd" - "./utils/hpc/dist-install/build/tmp/hpc" - "./utils/haddock/dist/build/tmp/haddock" - "./utils/hsc2hs/dist-install/build/tmp/hsc2hs" - "./utils/runghc/dist-install/build/tmp/runghc" - "./utils/ghc-cabal/dist-install/build/tmp/ghc-cabal" - "./utils/hp2ps/dist/build/tmp/hp2ps" - "./utils/ghc-pkg/dist-install/build/tmp/ghc-pkg" - "./utils/unlit/dist/build/tmp/unlit" - "./ghc/stage2/build/tmp/ghc-stage2")) - (gmp (assoc-ref inputs "gmp")) - (gmp-lib (string-append gmp "/lib")) - (gmp-include (string-append gmp "/include")) - (ncurses-lib - (dirname (search-input-file inputs "/lib/libncurses.so"))) - (ld-so (search-input-file inputs ,(glibc-dynamic-linker))) - (libtinfo-dir - (string-append ghc-bootstrap-prefix - "/lib/ghc-7.8.4/terminfo-0.4.0.0"))) - (with-directory-excursion - (string-append ghc-bootstrap-path "/ghc-7.8.4") - (setenv "CONFIG_SHELL" (which "bash")) - (setenv "LD_LIBRARY_PATH" gmp-lib) - ;; The binaries have "/lib64/ld-linux-x86-64.so.2" hardcoded. - (for-each - (cut invoke "patchelf" "--set-interpreter" ld-so <>) - binaries) - ;; The binaries include a reference to libtinfo.so.5 which - ;; is a subset of libncurses.so.5. We create a symlink in a - ;; directory included in the bootstrap binaries rpath. - (mkdir-p libtinfo-dir) - (symlink - (string-append ncurses-lib "/libncursesw.so." - ;; Extract "6.0" from "6.0-20170930" if a - ;; dash-separated version tag exists. - ,(let* ((v (package-version ncurses)) - (d (or (string-index v #\-) - (string-length v)))) - (version-major+minor (string-take v d)))) - (string-append libtinfo-dir "/libtinfo.so.5")) - - (setenv "PATH" - (string-append (getenv "PATH") ":" - ghc-bootstrap-prefix "/bin")) - (invoke - (string-append (getcwd) "/configure") - (string-append "--prefix=" ghc-bootstrap-prefix) - (string-append "--with-gmp-libraries=" gmp-lib) - (string-append "--with-gmp-includes=" gmp-include))))) - (alist-cons-before - 'configure 'install-bin - (lambda* (#:key inputs outputs #:allow-other-keys) - (with-directory-excursion + #~(let* ((ghc-bootstrap-path + (string-append (getcwd) "/" #$name "-" #$version "/ghc-bin")) + (ghc-bootstrap-prefix + (string-append ghc-bootstrap-path "/usr" ))) + (modify-phases %standard-phases + (add-after 'unpack 'unpack-bin + (lambda* (#:key inputs outputs #:allow-other-keys) + (mkdir-p ghc-bootstrap-prefix) + (with-directory-excursion ghc-bootstrap-path + (invoke "tar" "xvf" (assoc-ref inputs "ghc-binary"))))) + (add-after 'unpack-bin 'unpack-testsuite-and-fix-bins + (lambda* (#:key inputs outputs #:allow-other-keys) + (with-directory-excursion ".." + (invoke "tar" "xvf" (assoc-ref inputs "ghc-testsuite"))) + (substitute* + (list "testsuite/timeout/Makefile" + "testsuite/timeout/timeout.py" + "testsuite/timeout/timeout.hs" + "testsuite/tests/rename/prog006/Setup.lhs" + "testsuite/tests/programs/life_space_leak/life.test" + "libraries/process/System/Process/Internals.hs" + "libraries/unix/cbits/execvpe.c") + (("/bin/sh") (search-input-file inputs "/bin/sh")) + (("/bin/rm") "rm")))) + (add-before 'configure 'install-bin + (lambda* (#:key inputs outputs #:allow-other-keys) + (with-directory-excursion (string-append ghc-bootstrap-path "/ghc-7.8.4") - (invoke "make" "install"))) - %standard-phases))))))) + (invoke "make" "install")))) + (add-before 'install-bin 'configure-bin + (lambda* (#:key inputs outputs #:allow-other-keys) + (let* ((binaries + (list + "./utils/ghc-pwd/dist-install/build/tmp/ghc-pwd" + "./utils/hpc/dist-install/build/tmp/hpc" + "./utils/haddock/dist/build/tmp/haddock" + "./utils/hsc2hs/dist-install/build/tmp/hsc2hs" + "./utils/runghc/dist-install/build/tmp/runghc" + "./utils/ghc-cabal/dist-install/build/tmp/ghc-cabal" + "./utils/hp2ps/dist/build/tmp/hp2ps" + "./utils/ghc-pkg/dist-install/build/tmp/ghc-pkg" + "./utils/unlit/dist/build/tmp/unlit" + "./ghc/stage2/build/tmp/ghc-stage2")) + (gmp (assoc-ref inputs "gmp")) + (gmp-lib (string-append gmp "/lib")) + (gmp-include (string-append gmp "/include")) + (ncurses-lib + (dirname (search-input-file inputs "/lib/libncurses.so"))) + (ld-so (search-input-file inputs #$(glibc-dynamic-linker))) + (libtinfo-dir + (string-append ghc-bootstrap-prefix + "/lib/ghc-7.8.4/terminfo-0.4.0.0"))) + (with-directory-excursion + (string-append ghc-bootstrap-path "/ghc-7.8.4") + (setenv "CONFIG_SHELL" (which "bash")) + (setenv "LD_LIBRARY_PATH" gmp-lib) + ;; The binaries have "/lib64/ld-linux-x86-64.so.2" hardcoded. + (for-each + (cut invoke "patchelf" "--set-interpreter" ld-so <>) + binaries) + ;; The binaries include a reference to libtinfo.so.5 which + ;; is a subset of libncurses.so.5. We create a symlink in a + ;; directory included in the bootstrap binaries rpath. + (mkdir-p libtinfo-dir) + (symlink + (string-append ncurses-lib "/libncursesw.so." + ;; Extract "6.0" from "6.0-20170930" if a + ;; dash-separated version tag exists. + #$(let* ((v (package-version ncurses)) + (d (or (string-index v #\-) + (string-length v)))) + (version-major+minor (string-take v d)))) + (string-append libtinfo-dir "/libtinfo.so.5")) + + (setenv "PATH" + (string-append (getenv "PATH") ":" + ghc-bootstrap-prefix "/bin")) + (invoke + (string-append (getcwd) "/configure") + (string-append "--prefix=" ghc-bootstrap-prefix) + (string-append "--with-gmp-libraries=" gmp-lib) + (string-append "--with-gmp-includes=" gmp-include)))))))))) (native-search-paths (list (search-path-specification (variable "GHC_PACKAGE_PATH") (files (list @@ -599,29 +591,26 @@ interactive environment for the functional language Haskell.") (supported-systems '("i686-linux" "x86_64-linux")) (outputs '("out" "doc")) (inputs - `(("gmp" ,gmp) - ("ncurses" ,ncurses) - - ;; Use a LibFFI variant without static trampolines to work around - ;; <https://gitlab.haskell.org/ghc/ghc/-/issues/20051>. - ("libffi" ,libffi-sans-static-trampolines) - - ("ghc-testsuite" - ,(origin - (method url-fetch) - (uri (string-append - "https://www.haskell.org/ghc/dist/" - version "/" name "-" version "-testsuite.tar.xz")) - (sha256 - (base32 "1wjc3x68l305bl1h1ijd3yhqp2vqj83lkp3kqbr94qmmkqlms8sj")))))) + ;; Use a LibFFI variant without static trampolines to work around + ;; <https://gitlab.haskell.org/ghc/ghc/-/issues/20051>. + (list gmp ncurses libffi-sans-static-trampolines)) (native-inputs `(("perl" ,perl) ("python" ,python-2) ; for tests ("ghostscript" ,ghostscript) ; for tests ;; GHC is built with GHC. - ("ghc-bootstrap" ,ghc-7))) + ("ghc-bootstrap" ,ghc-7) + ("ghc-testsuite" + ,(origin + (method url-fetch) + (uri (string-append + "https://www.haskell.org/ghc/dist/" + version "/" name "-" version "-testsuite.tar.xz")) + (sha256 + (base32 "1wjc3x68l305bl1h1ijd3yhqp2vqj83lkp3kqbr94qmmkqlms8sj")))) )) (arguments - `(#:test-target "test" + (list + #:test-target "test" ;; We get a smaller number of test failures by disabling parallel test ;; execution. #:parallel-tests? #f @@ -632,53 +621,48 @@ interactive environment for the functional language Haskell.") #:build #f #:configure-flags - (list - (string-append "--with-gmp-libraries=" - (assoc-ref %build-inputs "gmp") "/lib") - (string-append "--with-gmp-includes=" - (assoc-ref %build-inputs "gmp") "/include") - "--with-system-libffi" - (string-append "--with-ffi-libraries=" - (assoc-ref %build-inputs "libffi") "/lib") - (string-append "--with-ffi-includes=" - (assoc-ref %build-inputs "libffi") "/include") - (string-append "--with-curses-libraries=" - (assoc-ref %build-inputs "ncurses") "/lib") - (string-append "--with-curses-includes=" - (assoc-ref %build-inputs "ncurses") "/include")) + #~(list + (string-append "--with-gmp-libraries=" + (assoc-ref %build-inputs "gmp") "/lib") + (string-append "--with-gmp-includes=" + (assoc-ref %build-inputs "gmp") "/include") + "--with-system-libffi" + (string-append "--with-ffi-libraries=" + (assoc-ref %build-inputs "libffi") "/lib") + (string-append "--with-ffi-includes=" + (assoc-ref %build-inputs "libffi") "/include") + (string-append "--with-curses-libraries=" + (assoc-ref %build-inputs "ncurses") "/lib") + (string-append "--with-curses-includes=" + (assoc-ref %build-inputs "ncurses") "/include")) #:phases - (modify-phases %standard-phases - (add-after 'unpack 'unpack-testsuite - (lambda* (#:key inputs #:allow-other-keys) - (with-directory-excursion ".." - (copy-file (assoc-ref inputs "ghc-testsuite") - "ghc-testsuite.tar.xz") - (zero? (system* "tar" "xvf" "ghc-testsuite.tar.xz"))))) - (add-before 'build 'fix-lib-paths - (lambda _ - (substitute* + #~(modify-phases %standard-phases + (add-after 'unpack 'unpack-testsuite + (lambda* (#:key inputs #:allow-other-keys) + (with-directory-excursion ".." + (invoke "tar" "xvf" (assoc-ref inputs "ghc-testsuite"))))) + (add-before 'build 'fix-lib-paths + (lambda* (#:key inputs #:allow-other-keys) + (substitute* (list "libraries/process/System/Process/Posix.hs" "libraries/process/tests/process001.hs" "libraries/process/tests/process002.hs" "libraries/unix/cbits/execvpe.c") - (("/bin/sh") (which "sh")) - (("/bin/ls") (which "ls"))) - #t)) - (add-before 'build 'fix-environment - (lambda _ - (unsetenv "GHC_PACKAGE_PATH") - (setenv "CONFIG_SHELL" (which "bash")) - #t)) - (add-before 'check 'fix-testsuite - (lambda _ - (substitute* + (("/bin/sh") (search-input-file inputs "/bin/sh")) + (("/bin/ls") (search-input-file inputs "/bin/ls"))))) + (add-before 'build 'fix-environment + (lambda _ + (unsetenv "GHC_PACKAGE_PATH") + (setenv "CONFIG_SHELL" (which "bash")))) + (add-before 'check 'fix-testsuite + (lambda _ + (substitute* (list "testsuite/timeout/Makefile" "testsuite/timeout/timeout.py" "testsuite/timeout/timeout.hs" "testsuite/tests/programs/life_space_leak/life.test") - (("/bin/sh") (which "sh")) - (("/bin/rm") "rm")) - #t))))) + (("/bin/sh") (which "sh")) + (("/bin/rm") "rm"))))))) (native-search-paths (list (search-path-specification (variable "GHC_PACKAGE_PATH") (files (list @@ -703,15 +687,11 @@ interactive environment for the functional language Haskell.") version "/" name "-" version "-src.tar.xz")) (sha256 (base32 "1ch4j2asg7pr52ai1hwzykxyj553wndg7wq93i47ql4fllspf48i")))) - (inputs - ;; Note: GHC < 9 requires LibFFI < 3.4, or a variant without static - ;; trampolines. - (list gmp ncurses libffi-sans-static-trampolines)) (native-inputs `(("perl" ,perl) ("python" ,python) ; for tests ("ghostscript" ,ghostscript) ; for tests - ;; GHC 8.4.3 is built with GHC 8. + ;; GHC 8.4.4 is built with GHC >= 8.0. ("ghc-bootstrap" ,ghc-8.0) ("ghc-testsuite" ,(origin @@ -723,92 +703,39 @@ interactive environment for the functional language Haskell.") (base32 "0s8lf9sxj7n89pjagi58b3fahnp34qvmwhnn0j1fbg6955vbrfj6")))))) (arguments - `(#:test-target "test" - ;; We get a smaller number of test failures by disabling parallel test - ;; execution. - #:parallel-tests? #f - - ;; Don't pass --build=<triplet>, because the configure script - ;; auto-detects slightly different triplets for --host and --target and - ;; then complains that they don't match. - #:build #f - - #:configure-flags - (list - (string-append "--with-gmp-libraries=" - (assoc-ref %build-inputs "gmp") "/lib") - (string-append "--with-gmp-includes=" - (assoc-ref %build-inputs "gmp") "/include") - "--with-system-libffi" - (string-append "--with-ffi-libraries=" - (assoc-ref %build-inputs "libffi") "/lib") - (string-append "--with-ffi-includes=" - (assoc-ref %build-inputs "libffi") "/include") - (string-append "--with-curses-libraries=" - (assoc-ref %build-inputs "ncurses") "/lib") - (string-append "--with-curses-includes=" - (assoc-ref %build-inputs "ncurses") "/include")) - #:phases - (modify-phases %standard-phases - (add-after 'unpack 'unpack-testsuite - (lambda* (#:key inputs #:allow-other-keys) - (invoke "tar" "xvf" - (assoc-ref inputs "ghc-testsuite") - "--strip-components=1") - #t)) - ;; This phase patches the 'ghc-pkg' command so that it sorts the list - ;; of packages in the binary cache it generates. - (add-before 'build 'fix-ghc-pkg-nondeterminism - (lambda _ - (substitute* "utils/ghc-pkg/Main.hs" - (("confs = map \\(path </>\\) \\$ filter \\(\".conf\" `isSuffixOf`\\) fs") - "confs = map (path </>) $ filter (\".conf\" `isSuffixOf`) (sort fs)")) - #t)) - (add-after 'unpack-testsuite 'fix-shell-wrappers - (lambda _ - (substitute* '("driver/ghci/ghc.mk" - "utils/mkdirhier/ghc.mk" - "rules/shell-wrapper.mk") - (("echo '#!/bin/sh'") - (format #f "echo '#!~a'" (which "sh")))) - #t)) - ;; This is necessary because the configure system no longer uses - ;; “AC_PATH_” but “AC_CHECK_”, setting the variables to just the - ;; plain command names. - (add-before 'configure 'set-target-programs - (lambda* (#:key inputs #:allow-other-keys) - (let ((binutils (assoc-ref inputs "binutils")) - (gcc (assoc-ref inputs "gcc")) - (ld-wrapper (assoc-ref inputs "ld-wrapper"))) - (setenv "CC" (string-append gcc "/bin/gcc")) - (setenv "CXX" (string-append gcc "/bin/g++")) - (setenv "LD" (string-append ld-wrapper "/bin/ld")) - (setenv "NM" (string-append binutils "/bin/nm")) - (setenv "RANLIB" (string-append binutils "/bin/ranlib")) - (setenv "STRIP" (string-append binutils "/bin/strip")) - ;; The 'ar' command does not follow the same pattern. - (setenv "fp_prog_ar" (string-append binutils "/bin/ar")) - #t))) - (add-before 'build 'fix-references - (lambda _ - (substitute* '("testsuite/timeout/Makefile" - "testsuite/timeout/timeout.py" - "testsuite/timeout/timeout.hs" - "testsuite/tests/programs/life_space_leak/life.test" - ;; libraries - "libraries/process/System/Process/Posix.hs" - "libraries/process/tests/process001.hs" - "libraries/process/tests/process002.hs" - "libraries/unix/cbits/execvpe.c") - (("/bin/sh") (which "sh")) - (("/bin/ls") (which "ls")) - (("/bin/rm") "rm")) - #t)) - (add-before 'build 'fix-environment - (lambda _ - (unsetenv "GHC_PACKAGE_PATH") - (setenv "CONFIG_SHELL" (which "bash")) - #t))))) + (substitute-keyword-arguments (package-arguments ghc-8.0) + ((#:phases phases) + #~(modify-phases #$phases + ;; This phase patches the 'ghc-pkg' command so that it sorts the list + ;; of packages in the binary cache it generates. + (add-before 'build 'fix-ghc-pkg-nondeterminism + (lambda _ + (substitute* "utils/ghc-pkg/Main.hs" + (("confs = map \\(path </>\\) \\$ filter \\(\".conf\" `isSuffixOf`\\) fs") + "confs = map (path </>) $ filter (\".conf\" `isSuffixOf`) (sort fs)")))) + (add-after 'unpack-testsuite 'fix-shell-wrappers + (lambda _ + (substitute* '("driver/ghci/ghc.mk" + "utils/mkdirhier/ghc.mk" + "rules/shell-wrapper.mk") + (("echo '#!/bin/sh'") + (format #f "echo '#!~a'" (which "sh")))))) + ;; This is necessary because the configure system no longer uses + ;; “AC_PATH_” but “AC_CHECK_”, setting the variables to just the + ;; plain command names. + (add-before 'configure 'set-target-programs + (lambda* (#:key inputs #:allow-other-keys) + (let ((binutils (assoc-ref inputs "binutils")) + (gcc (assoc-ref inputs "gcc")) + (ld-wrapper (assoc-ref inputs "ld-wrapper"))) + (setenv "CC" (string-append gcc "/bin/gcc")) + (setenv "CXX" (string-append gcc "/bin/g++")) + (setenv "LD" (string-append ld-wrapper "/bin/ld")) + (setenv "NM" (string-append binutils "/bin/nm")) + (setenv "RANLIB" (string-append binutils "/bin/ranlib")) + (setenv "STRIP" (string-append binutils "/bin/strip")) + ;; The 'ar' command does not follow the same pattern. + (setenv "fp_prog_ar" (string-append binutils "/bin/ar"))))))))) (native-search-paths (list (search-path-specification (variable "GHC_PACKAGE_PATH") (files (list @@ -848,10 +775,10 @@ interactive environment for the functional language Haskell.") (arguments (substitute-keyword-arguments (package-arguments ghc-8.4) ((#:make-flags make-flags ''()) - `(cons "EXTRA_RUNTEST_OPTS=--skip-perf-tests" - ,make-flags)) + #~(cons "EXTRA_RUNTEST_OPTS=--skip-perf-tests" + #$make-flags)) ((#:phases phases '%standard-phases) - `(modify-phases ,phases + #~(modify-phases #$phases (add-after 'install 'remove-unnecessary-references (lambda* (#:key outputs #:allow-other-keys) (substitute* (find-files (string-append (assoc-ref outputs "out") "/lib/") @@ -876,8 +803,7 @@ interactive environment for the functional language Haskell.") (new (string-append out subdir))) (mkdir-p (dirname new)) (rename-file haddock-file new))) - (find-files doc "\\.haddock$"))) - #t)) + (find-files doc "\\.haddock$"))))) (add-after 'unpack-testsuite 'skip-tests (lambda _ ;; These two tests refer to the root user, which doesn't exist @@ -885,8 +811,7 @@ interactive environment for the functional language Haskell.") (substitute* "libraries/unix/tests/all.T" (("^test\\('T8108'") "# guix skipped: test('T8108'")) (substitute* "libraries/unix/tests/libposix/all.T" - (("^test\\('posix010'") "# guix skipped: test('posix010'")) - #t)))))) + (("^test\\('posix010'") "# guix skipped: test('posix010'")))))))) (native-search-paths (list (search-path-specification (variable "GHC_PACKAGE_PATH") (files (list @@ -926,19 +851,17 @@ interactive environment for the functional language Haskell.") (arguments (substitute-keyword-arguments (package-arguments ghc-8.6) ((#:phases phases '%standard-phases) - `(modify-phases ,phases - (add-after 'fix-references 'fix-cc-reference + #~(modify-phases #$phases + (add-before 'build 'fix-cc-reference (lambda _ (substitute* "utils/hsc2hs/Common.hs" - (("\"cc\"") "\"gcc\"")) - #t)) + (("\"cc\"") "\"gcc\"")))) (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'")) - #t)))))) + (("^test\\('T15904'") "# guix skipped: test('T15904'")))))))) (native-search-paths (list (search-path-specification (variable "GHC_PACKAGE_PATH") (files (list @@ -959,7 +882,8 @@ interactive environment for the functional language Haskell.") (sha256 (base32 "179ws2q0dinl1a39wm9j37xzwm84zfz3c5543vz8v479khigdvp3")))) (native-inputs - `(("ghc-bootstrap" ,ghc-8.8) + `(;; GHC 8.10.7 must be built with GHC >= 8.6. + ("ghc-bootstrap" ,ghc-8.6) ("ghc-testsuite" ,(origin (method url-fetch) @@ -979,7 +903,7 @@ interactive environment for the functional language Haskell.") (arguments (substitute-keyword-arguments (package-arguments ghc-8.8) ((#:phases phases '%standard-phases) - `(modify-phases ,phases + #~(modify-phases #$phases (add-after 'unpack-testsuite 'patch-more-shebangs (lambda* (#:key inputs #:allow-other-keys) (let ((bash (assoc-ref inputs "bash"))) @@ -993,20 +917,16 @@ interactive environment for the functional language Haskell.") (("extra_files" all) (string-append "[" all)) (("\\]\\), " all) (string-append all "expect_broken(0)], "))))) - ;; TODO: Turn this into an undconditional patch on the next rebuild. - ,@(if (string-prefix? "i686" (or (%current-target-system) - (%current-system))) - '((add-after 'skip-more-tests 'skip-failing-tests-i686 - (lambda _ - (substitute* '("testsuite/tests/codeGen/should_compile/all.T") - (("(test\\('T15155l', )when\\(unregisterised\\(\\), skip\\)" all before) - (string-append before "when(arch('i386'), skip)"))) - ;; Unexpected failures: - ;; quasiquotation/T14028.run T14028 [bad stderr] (dyn) - (substitute* '("testsuite/tests/quasiquotation/all.T") - (("unless\\(config.have_ext_interp, skip\\),") - "unless(config.have_ext_interp, skip), when(arch('i386'), skip),"))))) - '()))))) + (add-after 'skip-more-tests 'skip-failing-tests-i686 + (lambda _ + (substitute* '("testsuite/tests/codeGen/should_compile/all.T") + (("(test\\('T15155l', )when\\(unregisterised\\(\\), skip\\)" all before) + (string-append before "when(arch('i386'), skip)"))) + ;; Unexpected failures: + ;; quasiquotation/T14028.run T14028 [bad stderr] (dyn) + (substitute* '("testsuite/tests/quasiquotation/all.T") + (("unless\\(config.have_ext_interp, skip\\),") + "unless(config.have_ext_interp, skip), when(arch('i386'), skip),")))))))) (native-search-paths (list (search-path-specification (variable "GHC_PACKAGE_PATH") (files (list |