Fix coq-8.6 for latest ocaml

LEPILLER JulienTue May 14 15:38:57+0200 2019

6ee4a9d

Fix coq-8.6 for latest ocaml

more/packages/ocaml.scm

138138
provers.")
139139
    (license license:gpl2+)))
140140
141-
(define-public ocaml4.02-camlp5
142-
  (package
143-
    (inherit camlp5)
144-
    (inputs
145-
     `(("ocaml" ,ocaml-4.02)))))
146-
147141
(define-public coq-8.6
148142
  (package
149143
    (inherit coq)

158152
               (base32
159153
                "02nm5sn79hrb9fdmkhyclk80jydadf4jcafmr3idwr5h4z56qbms"))))
160154
    (arguments
161-
     `(#:ocaml ,ocaml-4.02
162-
       #:findlib ,ocaml4.02-findlib
163-
       #:phases
155+
     `(#:phases
164156
       (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))
165173
         (replace 'configure
166174
           (lambda* (#:key outputs #:allow-other-keys)
167175
             (let* ((out (assoc-ref outputs "out"))

187195
             #t)))))
188196
    (native-inputs '())
189197
    (inputs
190-
     `(("lablgtk" ,ocaml4.02-lablgtk)
198+
     `(("lablgtk" ,lablgtk)
191199
       ("python" ,python-2)
192-
       ("camlp5" ,ocaml4.02-camlp5)))))
200+
       ("camlp5" ,camlp5)
201+
       ("ocaml-num" ,ocaml-num)))))
193202
194203
(define-public coq-8.7
195204
  (package