summary refs log tree commit diff
path: root/gnu/packages/ocaml.scm
diff options
context:
space:
mode:
Diffstat (limited to 'gnu/packages/ocaml.scm')
-rw-r--r--gnu/packages/ocaml.scm142
1 files changed, 70 insertions, 72 deletions
diff --git a/gnu/packages/ocaml.scm b/gnu/packages/ocaml.scm
index d559b0141f..131bf22a4b 100644
--- a/gnu/packages/ocaml.scm
+++ b/gnu/packages/ocaml.scm
@@ -22,6 +22,8 @@
 ;;; Copyright © 2021 Sharlatan Hellseher <sharlatanus@gmail.com>
 ;;; Copyright © 2021 Xinglu Chen <public@yoctocell.xyz>
 ;;; Copyright © 2021 Ivan Gankevich <i.gankevich@spbu.ru>
+;;; Copyright © 2021 Maxime Devos <maximedevos@telenet.be>
+;;; Copyright © 2021 Sarah Morgensen <iskarian@mgsn.dev>
 ;;;
 ;;; This file is part of GNU Guix.
 ;;;
@@ -43,6 +45,7 @@
   #:use-module (gnu packages algebra)
   #:use-module (gnu packages autotools)
   #:use-module (gnu packages base)
+  #:use-module (gnu packages bash)
   #:use-module (gnu packages bison)
   #:use-module (gnu packages boost)
   #:use-module (gnu packages compression)
@@ -88,6 +91,7 @@
   #:use-module (guix build-system gnu)
   #:use-module (guix build-system ocaml)
   #:use-module (guix download)
+  #:use-module (guix gexp)
   #:use-module (guix git-download)
   #:use-module ((guix licenses) #:prefix license:)
   #:use-module (guix packages)
@@ -211,8 +215,7 @@ This package produces a native @command{ocamlc} and a bytecode @command{ocamllex
        (modify-phases %standard-phases
          (add-after 'unpack 'patch-/bin/sh-references
            (lambda* (#:key inputs #:allow-other-keys)
-             (let* ((sh (string-append (assoc-ref inputs "bash")
-                                       "/bin/sh"))
+             (let* ((sh (search-input-file inputs "/bin/sh"))
                     (quoted-sh (string-append "\"" sh "\"")))
                (with-fluids ((%default-port-encoding #f))
                  (for-each
@@ -256,6 +259,7 @@ functional, imperative and object-oriented styles of programming.")
                     "http://caml.inria.fr/pub/distrib/ocaml-"
                     (version-major+minor version)
                     "/ocaml-" version ".tar.xz"))
+              (patches (search-patches "ocaml-4.09-multiple-definitions.patch"))
               (sha256
                (base32
                 "1v3z5ar326f3hzvpfljg4xj8b9lmbrl53fn57yih1bkbx3gr3yzj"))))))
@@ -267,6 +271,7 @@ functional, imperative and object-oriented styles of programming.")
 (define ocaml-4.07-boot
   (package
     (inherit ocaml-4.09)
+    (name "ocaml-boot")
     (version "4.07.1")
     (source (origin
               (method url-fetch)
@@ -277,6 +282,7 @@ functional, imperative and object-oriented styles of programming.")
               (sha256
                (base32
                 "1f07hgj5k45cylj1q3k5mk8yi02cwzx849b1fwnwia8xlcfqpr6z"))
+              (patches (search-patches "ocaml-multiple-definitions.patch"))
               (modules '((guix build utils)))
               (snippet
                `(begin
@@ -403,6 +409,7 @@ depend: $(STDLIB_MLIS) $(STDLIB_DEPS)"))
 (define-public ocaml-4.07
   (package
     (inherit ocaml-4.07-boot)
+    (name "ocaml")
     (arguments
       (substitute-keyword-arguments (package-arguments ocaml-4.09)
         ((#:phases phases)
@@ -452,13 +459,11 @@ depend: $(STDLIB_MLIS) $(STDLIB_DEPS)"))
     (build-system ocaml-build-system)
     (arguments
      `(#:make-flags
-       (list (string-append "OCAMLBUILD_PREFIX=" (assoc-ref %outputs "out"))
-             (string-append "OCAMLBUILD_BINDIR=" (assoc-ref %outputs "out")
-                            "/bin")
-             (string-append "OCAMLBUILD_LIBDIR=" (assoc-ref %outputs "out")
-                            "/lib/ocaml/site-lib")
-             (string-append "OCAMLBUILD_MANDIR=" (assoc-ref %outputs "out")
-                            "/share/man"))
+       ,#~(list (string-append "OCAMLBUILD_PREFIX=" #$output)
+                (string-append "OCAMLBUILD_BINDIR=" #$output "/bin")
+                (string-append "OCAMLBUILD_LIBDIR=" #$output
+                               "/lib/ocaml/site-lib")
+                (string-append "OCAMLBUILD_MANDIR=" #$output "/share/man"))
        #:phases
        (modify-phases %standard-phases
          (delete 'configure))
@@ -581,10 +586,9 @@ for day to day programming.")
         ("ocaml-ounit" ,ocaml-ounit)))
     (arguments
      `(#:make-flags
-       (list
-         "all" "opt"
-         (string-append "BINDIR=" (assoc-ref %outputs "out")
-                        "/bin"))
+       ,#~(list
+           "all" "opt"
+           (string-append "BINDIR=" #$output "/bin"))
        #:phases
        (modify-phases %standard-phases
          (delete 'configure))))
@@ -643,13 +647,11 @@ underlying solvers like Cplex, Gurobi, Lpsolver, Glpk, CbC, SCIP or WBO.")
     (build-system ocaml-build-system)
     (arguments
      `(#:configure-flags
-       (list (string-append "SHELL="
-                            (assoc-ref %build-inputs "bash")
-                            "/bin/sh"))
+       ,#~(list (string-append "SHELL="
+                               #+(file-append (canonical-package bash-minimal)
+                                              "/bin/sh")))
        #:make-flags
-       (list (string-append "LIBDIR="
-                            (assoc-ref %outputs "out")
-                            "/lib/ocaml/site-lib"))
+       ,#~(list (string-append "LIBDIR=" #$output "/lib/ocaml/site-lib"))
        #:phases
        (modify-phases %standard-phases
          (add-after 'unpack 'fix-test-script
@@ -701,8 +703,8 @@ repository-wide uninstallability checks.")
        (modify-phases %standard-phases
          (delete 'configure))
        #:build-flags
-       (list "build" "--lib-dir"
-             (string-append (assoc-ref %outputs "out") "/lib/ocaml/site-lib"))))
+       ,#~(list "build" "--lib-dir"
+                (string-append #$output "/lib/ocaml/site-lib"))))
     (native-inputs
      `(("ocaml-findlib" ,ocaml-findlib)
        ("ocamlbuild" ,ocamlbuild)
@@ -761,8 +763,8 @@ let () = String.split_on_char ':' (Sys.getenv \"OCAMLPATH\")
     (build-system ocaml-build-system)
     (arguments
      `(#:tests? #f; No tests
-       #:make-flags (list (string-append "LIBDIR=" (assoc-ref %outputs "out")
-                                         "/lib/ocaml/site-lib"))
+       #:make-flags ,#~(list (string-append "LIBDIR=" #$output
+                                            "/lib/ocaml/site-lib"))
        #:phases
        (modify-phases %standard-phases
          (delete 'configure))))
@@ -794,8 +796,7 @@ the opam file format.")
          (add-before 'build 'pre-build
            (lambda* (#:key inputs make-flags #:allow-other-keys)
              (let ((bash (assoc-ref inputs "bash"))
-                   (bwrap (string-append (assoc-ref inputs "bubblewrap")
-                                         "/bin/bwrap")))
+                   (bwrap (search-input-file inputs "/bin/bwrap")))
                (substitute* "src/core/opamSystem.ml"
                  (("\"/bin/sh\"")
                   (string-append "\"" bash "/bin/sh\""))
@@ -843,8 +844,9 @@ the opam file format.")
              ;; Ensure we can run the generated build.sh (no /bin/sh)
              (substitute* '("tests/reftests/legacy-local.test"
                             "tests/reftests/legacy-git.test")
-               (("#! ?/bin/sh") (string-append "#!" (assoc-ref inputs "bash")
-                                               "/bin/sh")))
+               (("#! ?/bin/sh")
+                (string-append "#!"
+                               (search-input-file inputs "/bin/sh"))))
              (substitute* "tests/reftests/testing-env"
                (("OPAMSTRICT=1")
                 (string-append "OPAMSTRICT=1\nLIBRARY_PATH="
@@ -1111,7 +1113,7 @@ Knuth’s LR(1) parser construction technique.")
 (define-public lablgtk
   (package
     (name "lablgtk")
-    (version "2.18.10")
+    (version "2.18.11")
     (source (origin
               (method git-fetch)
               (uri (git-reference
@@ -1120,7 +1122,7 @@ Knuth’s LR(1) parser construction technique.")
               (file-name (git-file-name name version))
               (sha256
                (base32
-                "0w8cdfcv2wc19sd3qzj3qq77qc6rbnbynsz02gzbl15kgrvgrfxi"))))
+                "179ipx0c6bpxm4gz0syxgqy09dp5p4x9qsdil7s9jlx8ffg1mm0w"))))
     (build-system gnu-build-system)
     (native-inputs
      `(("ocaml" ,ocaml)
@@ -1203,7 +1205,8 @@ libpanel, librsvg and quartz.")
      `(("ocaml" ,ocaml-4.09)
        ;; For documentation
        ("ghostscript" ,ghostscript)
-       ("texlive" ,texlive-tiny)
+       ("texlive" ,(texlive-updmap.cfg
+                    (list texlive-fonts-ec texlive-dvips-l3backend)))
        ("hevea" ,hevea)
        ("lynx" ,lynx)
        ("which" ,which)))
@@ -1406,9 +1409,8 @@ other XUnit testing frameworks.")
          (delete 'configure))
        #:install-target "install-findlib"
        #:make-flags
-       (list "all" "allopt"
-             (string-append "INSTALLDIR=" (assoc-ref %outputs "out")
-                            "/lib/ocaml"))))
+       ,#~(list "all" "allopt"
+                (string-append "INSTALLDIR=" #$output "/lib/ocaml"))))
     (home-page "https://github.com/xavierleroy/camlzip")
     (synopsis "Provides easy access to compressed files")
     (description "Provides easy access to compressed files in ZIP, GZIP and
@@ -1513,9 +1515,8 @@ archive(byte) = \"frontc.cma\"
 archive(native) = \"frontc.cmxa\""))))
                (symlink (string-append out "/lib/ocaml/frontc")
                         (string-append out "/lib/ocaml/FrontC"))))))
-       #:make-flags (list (string-append "PREFIX="
-                                         (assoc-ref %outputs "out"))
-                          "OCAML_SITE=$(LIB_DIR)/ocaml/")))
+       #:make-flags ,#~(list (string-append "PREFIX=" #$output)
+                             "OCAML_SITE=$(LIB_DIR)/ocaml/")))
     (properties `((upstream-name . "FrontC")))
     (home-page "https://www.irit.fr/FrontC")
     (synopsis "C parser and lexer library")
@@ -1632,10 +1633,10 @@ full_split, cut, rcut, etc..")
     (build-system ocaml-build-system)
     (arguments
      `(#:tests? #f; require odoc
-       #:make-flags (list "release"
-                          (string-append "PREFIX=" (assoc-ref %outputs "out"))
-                          (string-append "LIBDIR=" (assoc-ref %outputs "out")
-                                         "/lib/ocaml/site-lib"))
+       #:make-flags ,#~(list "release"
+                             (string-append "PREFIX=" #$output)
+                             (string-append "LIBDIR=" #$output
+                                            "/lib/ocaml/site-lib"))
        #:phases
        (modify-phases %standard-phases
          (replace 'configure
@@ -2155,8 +2156,8 @@ dates and times.")
      `(("ocamlbuild" ,ocamlbuild)))
     (arguments
      `(#:tests? #f
-       #:make-flags (list (string-append "LIBDIR=" (assoc-ref %outputs "out")
-                                         "/lib/ocaml/site-lib/cmdliner"))
+       #:make-flags ,#~(list (string-append "LIBDIR=" #$output
+                                            "/lib/ocaml/site-lib/cmdliner"))
        #:phases
        (modify-phases %standard-phases
          (delete 'configure)
@@ -3054,7 +3055,7 @@ OCaml code.")
     (build-system ocaml-build-system)
     (arguments
      `(#:make-flags
-       (list (string-append "PREFIX=" (assoc-ref %outputs "out")))
+       ,#~(list (string-append "PREFIX=" #$output))
        #:tests? #f ; no test target
        #:phases
        (modify-phases %standard-phases
@@ -3718,8 +3719,8 @@ and 4 (random based) according to RFC 4122.")
        (modify-phases %standard-phases
          (add-before 'configure 'set-shell
            (lambda* (#:key inputs #:allow-other-keys)
-             (setenv "CONFIG_SHELL" (string-append (assoc-ref inputs "bash")
-                                                   "/bin/sh")))))))
+             (setenv "CONFIG_SHELL"
+                     (search-input-file inputs "/bin/sh")))))))
     (inputs `(("lablgtk" ,lablgtk)))
     (properties `((upstream-name . "ocamlgraph")))
     (home-page "http://ocamlgraph.lri.fr/")
@@ -3743,9 +3744,10 @@ and 4 (random based) according to RFC 4122.")
     (build-system ocaml-build-system)
     (arguments
      `(#:make-flags
-       (list (string-append "DESTDIR=" (assoc-ref %outputs "out"))
-             (string-append "SHELL=" (assoc-ref %build-inputs "bash")
-                            "/bin/sh"))
+       ,#~(list (string-append "DESTDIR=" #$output)
+                (string-append "SHELL="
+                               #+(file-append (canonical-package bash-minimal)
+                                              "/bin/sh")))
        #:phases
        (modify-phases %standard-phases
          (add-after 'unpack 'make-files-writable
@@ -4166,28 +4168,23 @@ cross-platform SDL C library.")
     (build-system ocaml-build-system)
     (arguments
      `(#:phases
-       (modify-phases %standard-phases
-         (delete 'configure)
-         (replace 'build
-           (lambda _
-             (invoke "make")
-             #t))
-         (replace 'check
-           (lambda _
-             (invoke "make" "tests")
-             #t))
-         (add-before 'install 'set-binpath
-           ;; Change binary path in the makefile
-           (lambda _
-             (let ((out (assoc-ref %outputs "out")))
-               (substitute* "GNUmakefile"
-                 (("BINDIR = (.*)$")
-                  (string-append "BINDIR = " out "/bin"))))
-             #t))
-         (replace 'install
-           (lambda _
-             (invoke "make" "install")
-             #t)))))
+       ,#~(modify-phases %standard-phases
+            (delete 'configure)
+            (replace 'build
+              (lambda _
+                (invoke "make")))
+            (replace 'check
+              (lambda _
+                (invoke "make" "tests")))
+            (add-before 'install 'set-binpath
+              ;; Change binary path in the makefile
+              (lambda _
+                (substitute* "GNUmakefile"
+                  (("BINDIR = (.*)$")
+                   (string-append "BINDIR = " #$output "/bin")))))
+            (replace 'install
+              (lambda _
+                (invoke "make" "install"))))))
     (synopsis "Proof-checker for the λΠ-calculus modulo theory, an extension of
 the λ-calculus")
     (description "Dedukti is a proof-checker for the λΠ-calculus modulo
@@ -7506,8 +7503,9 @@ browsers and Node.js.")
               #t)))))
     (native-inputs
      `(("which" ,which)
-       ("texlive" ,(texlive-union (list texlive-fonts-ec texlive-preprint
-                                        texlive-latex-hyperref texlive-bibtex)))))
+       ("texlive" ,(texlive-updmap.cfg
+                    (list texlive-fonts-ec texlive-preprint
+                          texlive-hyperref texlive-bibtex)))))
     (propagated-inputs
      `(("hevea" ,hevea)))
     (home-page "https://www.lri.fr/~filliatr/bibtex2html/")