diff options
Diffstat (limited to 'gnu/packages/haskell.scm')
| -rw-r--r-- | gnu/packages/haskell.scm | 73 |
1 files changed, 41 insertions, 32 deletions
diff --git a/gnu/packages/haskell.scm b/gnu/packages/haskell.scm index b1b0a8d895b..8525cff7df2 100644 --- a/gnu/packages/haskell.scm +++ b/gnu/packages/haskell.scm | |||
| @@ -1098,22 +1098,23 @@ interactive environment for the functional language Haskell.") | |||
| 1098 | ;; <https://gitlab.haskell.org/ghc/ghc/-/issues/20051>. | 1098 | ;; <https://gitlab.haskell.org/ghc/ghc/-/issues/20051>. |
| 1099 | (list gmp ncurses libffi-sans-static-trampolines)) | 1099 | (list gmp ncurses libffi-sans-static-trampolines)) |
| 1100 | (native-inputs | 1100 | (native-inputs |
| 1101 | `(("gcc" ,gcc-13) ; does not compile with gcc-14 and adding | 1101 | (list |
| 1102 | ; -Wno-error=incompatible-pointer-types | 1102 | ;; XXX: does not compile with gcc-14 and adding |
| 1103 | ; at the appropriate stages is difficult | 1103 | ;; -Wno-error=incompatible-pointer-types at the appropriate stages |
| 1104 | ("perl" ,perl) | 1104 | ;; is difficult |
| 1105 | ("python" ,python-2) ; for tests | 1105 | gcc-13 |
| 1106 | ("ghostscript" ,ghostscript) ; for tests | 1106 | perl |
| 1107 | ;; GHC is built with GHC. | 1107 | python-2 ; for tests (fails with python-3) |
| 1108 | ("ghc-bootstrap" ,ghc-7) | 1108 | ghostscript ; for tests |
| 1109 | ("ghc-testsuite" | 1109 | ;; GHC is built with GHC. |
| 1110 | ,(origin | 1110 | ghc-7 |
| 1111 | (method url-fetch) | 1111 | (origin |
| 1112 | (uri (string-append | 1112 | (method url-fetch) |
| 1113 | "https://www.haskell.org/ghc/dist/" | 1113 | (uri (string-append |
| 1114 | version "/" name "-" version "-testsuite.tar.xz")) | 1114 | "https://www.haskell.org/ghc/dist/" |
| 1115 | (sha256 | 1115 | version "/" name "-" version "-testsuite.tar.xz")) |
| 1116 | (base32 "1wjc3x68l305bl1h1ijd3yhqp2vqj83lkp3kqbr94qmmkqlms8sj")))) )) | 1116 | (sha256 |
| 1117 | (base32 "1wjc3x68l305bl1h1ijd3yhqp2vqj83lkp3kqbr94qmmkqlms8sj"))))) | ||
| 1117 | (arguments | 1118 | (arguments |
| 1118 | (list | 1119 | (list |
| 1119 | #:test-target "test" | 1120 | #:test-target "test" |
| @@ -1125,28 +1126,36 @@ interactive environment for the functional language Haskell.") | |||
| 1125 | ;; auto-detects slightly different triplets for --host and --target and | 1126 | ;; auto-detects slightly different triplets for --host and --target and |
| 1126 | ;; then complains that they don't match. | 1127 | ;; then complains that they don't match. |
| 1127 | #:build #f | 1128 | #:build #f |
| 1129 | #:modules '((guix build gnu-build-system) | ||
| 1130 | (guix build utils) | ||
| 1131 | (srfi srfi-1)) | ||
| 1128 | 1132 | ||
| 1129 | #:configure-flags | 1133 | #:configure-flags |
| 1130 | #~(list | 1134 | #~(let* ((libgmp.so (search-input-file %build-inputs "lib/libgmp.so")) |
| 1131 | (string-append "--with-gmp-libraries=" | 1135 | (gmp (dirname (dirname libgmp.so))) |
| 1132 | (assoc-ref %build-inputs "gmp") "/lib") | 1136 | (libffi.so (search-input-file %build-inputs "lib/libffi.so")) |
| 1133 | (string-append "--with-gmp-includes=" | 1137 | (ffi (dirname (dirname libffi.so))) |
| 1134 | (assoc-ref %build-inputs "gmp") "/include") | 1138 | (libncurses.so (search-input-file %build-inputs |
| 1135 | "--with-system-libffi" | 1139 | "lib/libncurses.so")) |
| 1136 | (string-append "--with-ffi-libraries=" | 1140 | (ncurses (dirname (dirname libncurses.so)))) |
| 1137 | (assoc-ref %build-inputs "libffi") "/lib") | 1141 | (list |
| 1138 | (string-append "--with-ffi-includes=" | 1142 | (string-append "--with-gmp-libraries=" gmp "/lib") |
| 1139 | (assoc-ref %build-inputs "libffi") "/include") | 1143 | (string-append "--with-gmp-includes=" gmp "/include") |
| 1140 | (string-append "--with-curses-libraries=" | 1144 | "--with-system-libffi" |
| 1141 | (assoc-ref %build-inputs "ncurses") "/lib") | 1145 | (string-append "--with-ffi-libraries=" ffi "/lib") |
| 1142 | (string-append "--with-curses-includes=" | 1146 | (string-append "--with-ffi-includes=" ffi "/include") |
| 1143 | (assoc-ref %build-inputs "ncurses") "/include")) | 1147 | (string-append "--with-curses-libraries=" ncurses "/lib") |
| 1148 | (string-append "--with-curses-includes=" ncurses "/include"))) | ||
| 1144 | #:phases | 1149 | #:phases |
| 1145 | #~(modify-phases %standard-phases | 1150 | #~(modify-phases %standard-phases |
| 1146 | (add-after 'unpack 'unpack-testsuite | 1151 | (add-after 'unpack 'unpack-testsuite |
| 1147 | (lambda* (#:key inputs #:allow-other-keys) | 1152 | (lambda* (#:key inputs #:allow-other-keys) |
| 1148 | (with-directory-excursion ".." | 1153 | (let ((ghc-testsuite (find (lambda (pair) |
| 1149 | (invoke "tar" "xvf" (assoc-ref inputs "ghc-testsuite"))))) | 1154 | (string-suffix? "testsuite.tar.xz" |
| 1155 | (car pair))) | ||
| 1156 | inputs))) | ||
| 1157 | (with-directory-excursion ".." | ||
| 1158 | (invoke "tar" "xvf" (and=> ghc-testsuite cdr)))))) | ||
| 1150 | (add-before 'build 'fix-lib-paths | 1159 | (add-before 'build 'fix-lib-paths |
| 1151 | (lambda* (#:key inputs #:allow-other-keys) | 1160 | (lambda* (#:key inputs #:allow-other-keys) |
| 1152 | (substitute* | 1161 | (substitute* |
