aboutsummaryrefslogtreecommitdiff
path: root/gnu/packages/ocaml.scm
diff options
context:
space:
mode:
Diffstat (limited to 'gnu/packages/ocaml.scm')
-rw-r--r--gnu/packages/ocaml.scm151
1 files changed, 71 insertions, 80 deletions
diff --git a/gnu/packages/ocaml.scm b/gnu/packages/ocaml.scm
index c1912d49b7..909728fc66 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)
@@ -212,8 +216,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
@@ -257,6 +260,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"))))))
@@ -268,6 +272,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)
@@ -278,6 +283,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
@@ -404,6 +410,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)
@@ -453,13 +460,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))
@@ -582,10 +587,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))))
@@ -644,20 +648,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"))
- #:phases
- (modify-phases %standard-phases
- (add-after 'unpack 'fix-test-script
- (lambda _
- (substitute* "applications/dose-tests.py"
- (("warning\\(")
- "from warnings import warn\nwarn(")))))))
+ ,#~(list (string-append "LIBDIR=" #$output "/lib/ocaml/site-lib"))))
(propagated-inputs
`(("ocaml-graph" ,ocaml-graph)
("ocaml-cudf" ,ocaml-cudf)
@@ -702,8 +697,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)
@@ -762,8 +757,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))))
@@ -795,8 +790,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\""))
@@ -844,8 +838,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="
@@ -1113,7 +1108,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
@@ -1122,7 +1117,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)
@@ -1205,7 +1200,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)))
@@ -1403,9 +1399,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
@@ -1545,9 +1540,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 '()))))
(define-public ocaml-qcheck
@@ -1675,10 +1669,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
@@ -2217,8 +2211,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)
@@ -3153,7 +3147,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
@@ -3892,8 +3886,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/")
@@ -3917,9 +3911,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
@@ -4400,28 +4395,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
@@ -4932,7 +4922,7 @@ the OCaml language.")
"0nzp43hp8pbjqkrxnwp5lgjrabxayf61h18fjaydi0s5faq6f3xh"))))
(build-system ocaml-build-system)
(inputs
- `(("gsl" ,gsl)))
+ `(("gsl" ,gsl-static)))
(native-inputs
`(("ocamlbuild" ,ocamlbuild)))
(arguments '())
@@ -7855,8 +7845,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/")