fix coq with ocaml 4.06

Julien LepillerMon Jun 25 18:18:55+0200 2018

094e453

fix coq with ocaml 4.06

more/packages/ocaml.scm

211211
             (string-append "OCAMLBUILD_MANDIR=" (assoc-ref %outputs "out") "/share/man"))
212212
       #:phases
213213
       (modify-phases %standard-phases
214+
         (delete 'bootstrap)
214215
         (delete 'configure)
215216
         ;(replace 'configure
216217
         ;  (lambda* (#:key outputs #:allow-other-keys)

372373
           (lambda* (#:key outputs #:allow-other-keys)
373374
             ;; This package supposes we install to the same directory as
374375
             ;; the ocaml package.
376+
             (substitute* "src/META"
377+
               (("\"\\^\"") (string-append "\"" (assoc-ref outputs "out")
378+
                                           "/lib/ocaml/site-lib\"")))
375379
             (substitute* "src/Makefile"
376380
               (("\\) \\$\\(STDLIBDIR\\)")
377381
                (string-append ") " (assoc-ref outputs "out")
378-
                               "/lib/ocaml/site-lib"))))))))
382+
                               "/lib/ocaml/site-lib")))
383+
             #t)))))
379384
    (home-page "https://github.com/ocaml/num")
380385
    (synopsis "")
381386
    (description "")

393398
       ("python" ,python-2)
394399
       ("camlp5" ,camlp5-fix)
395400
       ;; ocaml-num was removed from the ocaml package in 4.06.
396-
       ("num" ,ocaml-num)))
401+
       ("ocaml-num" ,ocaml-num)))
397402
    (arguments
398403
     `(#:ocaml ,ocaml-fix
399404
       #:findlib ,ocaml-findlib-fix

404409
             (let* ((out (assoc-ref outputs "out"))
405410
                    (mandir (string-append out "/share/man"))
406411
                    (browser "icecat -remote \"OpenURL(%s,new-tab)\""))
407-
               (zero? (system* "./configure"
408-
                               "-prefix" out
409-
                               "-mandir" mandir
410-
                               "-browser" browser
411-
                               "-coqide" "opt")))))
412+
               (invoke "./configure"
413+
                       "-prefix" out
414+
                       "-mandir" mandir
415+
                       "-browser" browser
416+
                       "-coqide" "opt"))
417+
             #t))
412418
         (replace 'build
413419
           (lambda* (#:key inputs #:allow-other-keys)
414420
             (substitute* "ide/ideutils.ml"
415421
               (("Bytes.unsafe_to_string read_string") "read_string"))
416-
             (zero? (system* "make" "-j" (number->string
417-
                                          (parallel-job-count))
418-
                             (string-append
419-
                               "USERFLAGS=-I "
420-
                               (assoc-ref inputs "num")
421-
                               "/lib/ocaml/site-lib")
422-
                             "world"))))
422+
             (invoke "make" "-j" (number->string
423+
                                  (parallel-job-count))
424+
                     (string-append
425+
                       "USERFLAGS=-I "
426+
                       (assoc-ref inputs "ocaml-num")
427+
                       "/lib/ocaml/site-lib")
428+
                     "world")
429+
             #t))
423430
         (delete 'check)
424431
         (add-after 'install 'check
425432
           (lambda _

429436
               (delete-file-recursively "coq-makefile/timing")
430437
               ;; This one fails because we didn't build coqtop.byte.
431438
               (delete-file-recursively "coq-makefile/findlib-package")
432-
               (zero? (system* "make"))))))))))
439+
               (invoke "make"))
440+
             #t)))))))
433441
434442
(define-public compcert
435443
  (package

669677
    (synopsis "")
670678
    (description "")
671679
    (license license:lgpl2.1+)))
672-
673-
(define-public coq-8.8
674-
  (package
675-
    (inherit coq)
676-
    (name "coq")
677-
    (version "8.8.0")
678-
    (source (origin
679-
              (method url-fetch)
680-
              (uri (string-append "https://github.com/coq/coq/archive/V"
681-
                                  version ".tar.gz"))
682-
              (file-name (string-append name "-" version ".tar.gz"))
683-
              (sha256
684-
               (base32
685-
                "0g96k2x6lbddlmkmdaczvcpb2gwqi1ydbq9bv4gf9q38kv9w3xya"))))))