Fix coq-8.6 for latest ocaml
more/packages/ocaml.scm
138 | 138 | provers.") | |
139 | 139 | (license license:gpl2+))) | |
140 | 140 | ||
141 | - | (define-public ocaml4.02-camlp5 | |
142 | - | (package | |
143 | - | (inherit camlp5) | |
144 | - | (inputs | |
145 | - | `(("ocaml" ,ocaml-4.02))))) | |
146 | - | ||
147 | 141 | (define-public coq-8.6 | |
148 | 142 | (package | |
149 | 143 | (inherit coq) | |
… | |||
158 | 152 | (base32 | |
159 | 153 | "02nm5sn79hrb9fdmkhyclk80jydadf4jcafmr3idwr5h4z56qbms")))) | |
160 | 154 | (arguments | |
161 | - | `(#:ocaml ,ocaml-4.02 | |
162 | - | #:findlib ,ocaml4.02-findlib | |
163 | - | #:phases | |
155 | + | `(#:phases | |
164 | 156 | (modify-phases %standard-phases | |
157 | + | (add-before 'configure 'fix-latest-ocaml | |
158 | + | (lambda* (#:key inputs #:allow-other-keys) | |
159 | + | (substitute* "Makefile.build" | |
160 | + | (("MLINCLUDES=") (string-append | |
161 | + | "MLINCLUDES=-I " | |
162 | + | (assoc-ref inputs "ocaml-num") | |
163 | + | "/lib/ocaml/site-lib "))) | |
164 | + | (substitute* "configure.ml" | |
165 | + | (("CAMLFLAGS=") "CAMLFLAGS=-unsafe-string -package num ")) | |
166 | + | (substitute* "ide/ideutils.ml" | |
167 | + | (("String.blit") "Bytes.blit")) | |
168 | + | (substitute* "tools/coqmktop.ml" | |
169 | + | (("nums") (string-append (assoc-ref inputs "ocaml-num") | |
170 | + | "/lib/ocaml/site-lib/nums")) | |
171 | + | (("\"-linkall\"") "\"-linkall\" :: \"-package\" :: \"num\"")) | |
172 | + | #t)) | |
165 | 173 | (replace 'configure | |
166 | 174 | (lambda* (#:key outputs #:allow-other-keys) | |
167 | 175 | (let* ((out (assoc-ref outputs "out")) | |
… | |||
187 | 195 | #t))))) | |
188 | 196 | (native-inputs '()) | |
189 | 197 | (inputs | |
190 | - | `(("lablgtk" ,ocaml4.02-lablgtk) | |
198 | + | `(("lablgtk" ,lablgtk) | |
191 | 199 | ("python" ,python-2) | |
192 | - | ("camlp5" ,ocaml4.02-camlp5))))) | |
200 | + | ("camlp5" ,camlp5) | |
201 | + | ("ocaml-num" ,ocaml-num))))) | |
193 | 202 | ||
194 | 203 | (define-public coq-8.7 | |
195 | 204 | (package |