summaryrefslogtreecommitdiff
path: root/gnu/packages/ocaml.scm
diff options
context:
space:
mode:
Diffstat (limited to 'gnu/packages/ocaml.scm')
-rw-r--r--gnu/packages/ocaml.scm603
1 files changed, 415 insertions, 188 deletions
diff --git a/gnu/packages/ocaml.scm b/gnu/packages/ocaml.scm
index d987201508..ccbc6dda2b 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)
@@ -77,6 +80,7 @@
#:use-module (gnu packages texinfo)
#:use-module (gnu packages time)
#:use-module (gnu packages tls)
+ #:use-module (gnu packages version-control)
#:use-module (gnu packages virtualization)
#:use-module (gnu packages web)
#:use-module (gnu packages web-browsers)
@@ -87,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)
@@ -254,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"))))))
@@ -265,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)
@@ -275,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
@@ -401,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)
@@ -450,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))
@@ -579,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))))
@@ -641,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
@@ -699,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)
@@ -746,7 +750,7 @@ let () = String.split_on_char ':' (Sys.getenv \"OCAMLPATH\")
(define-public ocaml-opam-file-format
(package
(name "ocaml-opam-file-format")
- (version "2.0.0")
+ (version "2.1.3")
(source (origin
(method git-fetch)
(uri (git-reference
@@ -755,12 +759,12 @@ let () = String.split_on_char ':' (Sys.getenv \"OCAMLPATH\")
(file-name (git-file-name name version))
(sha256
(base32
- "0fqb99asnair0043hhc8r158d6krv5nzvymd0xwycr5y72yrp0hv"))))
+ "1fxhppdmrysr2nb5z3c448h17np48f3ga9jih33acj78r4rdblcs"))))
(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))))
@@ -774,7 +778,7 @@ the opam file format.")
(define-public opam
(package
(name "opam")
- (version "2.0.8")
+ (version "2.1.0")
(source (origin
(method git-fetch)
(uri (git-reference
@@ -783,77 +787,99 @@ the opam file format.")
(file-name (git-file-name name version))
(sha256
(base32
- "1z0ls6xxa4ws5xw0am5gxmh5apnmyhgkcphrncp53w34j8sfydsj"))))
- (build-system ocaml-build-system)
+ "12l7l4pbzy71k1yc7ym5aczajszvc9bqkdnfg8xhqc8ch8j1h1lj"))))
+ (build-system dune-build-system)
(arguments
- `(#:configure-flags
- (list (string-append "SHELL="
- (assoc-ref %build-inputs "bash")
- "/bin/sh"))
-
- ;; For some reason, 'ocp-build' needs $TERM to be set.
- #:make-flags
- (list "TERM=screen"
- (string-append "SHELL="
- (assoc-ref %build-inputs "bash")
- "/bin/sh"))
-
- #:test-target "tests"
-
- #:phases (modify-phases %standard-phases
- (add-before 'build 'pre-build
- (lambda* (#:key inputs make-flags #:allow-other-keys)
- (let ((bash (assoc-ref inputs "bash"))
- (bwrap (search-input-file inputs "/bin/bwrap")))
- (substitute* "src/core/opamSystem.ml"
- (("\"/bin/sh\"")
- (string-append "\"" bash "/bin/sh\""))
- (("getconf")
- (which "getconf")))
- ;; Use bwrap from the store directly.
- (substitute* "src/state/shellscripts/bwrap.sh"
- (("-v bwrap") (string-append "-v " bwrap))
- (("exec bwrap") (string-append "exec " bwrap))
- ;; Mount /gnu and /run/current-system in the
- ;; isolated environment when building with opam.
- ;; This is necessary for packages to find external
- ;; dependencies, such as a C compiler, make, etc...
- (("^add_sys_mounts /usr")
- "add_sys_mounts /gnu /run/current-system /usr"))
- (substitute* "src/client/opamInitDefaults.ml"
- (("\"bwrap\"") (string-append "\"" bwrap "\"")))
- ;; Generating the documentation needs write access
- (for-each
- (lambda (f) (chmod f #o644))
- (find-files "doc" "."))
- #t)))
- (add-before 'check 'pre-check
- (lambda _
- ;; The "repo" test attempts to open some of these files O_WRONLY
- ;; and fails with a bogus "OpamSystem.File_not_found" otherwise.
- (for-each
- (lambda (f) (chmod f #o644))
- (find-files "tests/packages" "\\.opam$"))
+ `(#:test-target "."
+ #:phases
+ (modify-phases %standard-phases
+ (add-before 'build 'pre-build
+ (lambda* (#:key inputs make-flags #:allow-other-keys)
+ (let ((bash (assoc-ref inputs "bash"))
+ (bwrap (search-input-file inputs "/bin/bwrap")))
+ (substitute* "src/core/opamSystem.ml"
+ (("\"/bin/sh\"")
+ (string-append "\"" bash "/bin/sh\""))
+ (("getconf")
+ (which "getconf")))
+ ;; Use bwrap from the store directly.
+ (substitute* "src/state/shellscripts/bwrap.sh"
+ (("-v bwrap") (string-append "-v " bwrap))
+ (("exec bwrap") (string-append "exec " bwrap))
+ ;; Mount /gnu and /run/current-system in the
+ ;; isolated environment when building with opam.
+ ;; This is necessary for packages to find external
+ ;; dependencies, such as a C compiler, make, etc...
+ (("^add_sys_mounts /usr")
+ (string-append "add_sys_mounts "
+ (%store-directory)
+ " /run/current-system /usr")))
+ (substitute* "src/client/opamInitDefaults.ml"
+ (("\"bwrap\"") (string-append "\"" bwrap "\""))))))
+ (add-before 'check 'prepare-checks
+ (lambda* (#:key inputs #:allow-other-keys)
+ ;; Opam tests need to run an isolated environment from a writable
+ ;; home directory.
+ (mkdir-p "test-home")
+ (setenv "HOME" (string-append (getcwd) "/test-home"))
- (substitute* "tests/Makefile"
- (("/usr/bin/printf")
- (which "printf"))
- ;; By default tests run twice: once with a "local" repository
- ;; and once with a git repository: disable the git tests to
- ;; avoid the dependency.
- (("all: local git")
- "all: local"))
- #t)))))
+ ;; Opam tests require data from opam-repository. Instead of
+ ;; downloading them with wget from the guix environment, copy the
+ ;; content to the expected directory.
+ (substitute* "tests/reftests/dune.inc"
+ (("tar -C.*opam-archive-([0-9a-f]*)[^)]*" _ commit)
+ (string-append "rmdir %{targets}) (run cp -r "
+ (assoc-ref inputs (string-append "opam-repo-" commit))
+ "/ %{targets}) (run chmod +w -R %{targets}"))
+ (("wget[^)]*") "touch %{targets}")
+ ;; Disable a failing test because of different line wrapping
+ (("diff cli-versioning.test cli-versioning.out") "run true")
+ ;; Disable a failing test because it tries to clone a git
+ ;; repository from inside bwrap
+ (("diff upgrade-format.test upgrade-format.out") "run true"))
+ (substitute* "tests/reftests/dune"
+ ;; Because of our changes to the previous file, we cannot check
+ ;; it can be regenerated
+ (("diff dune.inc dune.inc.gen") "run true"))
+ ;; 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 "#!"
+ (search-input-file inputs "/bin/sh"))))
+ (substitute* "tests/reftests/testing-env"
+ (("OPAMSTRICT=1")
+ (string-append "OPAMSTRICT=1\nLIBRARY_PATH="
+ (assoc-ref inputs "libc") "/lib"))))))))
(native-inputs
- `(("dune" ,dune)
- ("ocaml-cppo" ,ocaml-cppo)
+ (let ((opam-repo (lambda (commit hash)
+ (origin
+ (method git-fetch)
+ (uri (git-reference
+ (url "https://github.com/ocaml/opam-repository")
+ (commit commit)))
+ (file-name (git-file-name "opam-repo" commit))
+ (sha256 (base32 hash))))))
+ `(("dune" ,dune)
+ ("ocaml-cppo" ,ocaml-cppo)
- ;; For tests.
- ("openssl" ,openssl)
- ("python" ,python-wrapper)
- ("rsync" ,rsync)
- ("unzip" ,unzip)
- ("which" ,which)))
+ ;; For tests.
+ ("git" ,git-minimal)
+ ("openssl" ,openssl)
+ ("python" ,python-wrapper)
+ ("rsync" ,rsync)
+ ("unzip" ,unzip)
+ ("which" ,which)
+
+ ;; Data for tests
+ ("opam-repo-009e00fa" ,(opam-repo "009e00fa86300d11c311309a2544e5c6c3eb8de2"
+ "1wwy0rwrsjf4q10j1rh1dazk32fbzhzy6f7zl6qmndidx9b1bq7w"))
+ ("opam-repo-ad4dd344" ,(opam-repo "ad4dd344fe5cd1cab49ced49d6758a9844549fb4"
+ "1a1qj47kj8xjdnc4zc50ijrix1kym1n7k20n3viki80a7518baw8"))
+ ("opam-repo-c1d23f0e" ,(opam-repo "c1d23f0e17ec83a036ebfbad1c78311b898a2ca0"
+ "0j9abisx3ifzm66ci3p45mngmz4f0fx7yd9jjxrz3f8w5jffc9ii"))
+ ("opam-repo-f372039d" ,(opam-repo "f372039db86a970ef3e662adbfe0d4f5cd980701"
+ "0ld7fcry6ss6fmrpswvr6bikgx299w97h0gwrjjh7kd7rydsjdws")))))
(inputs
`(("ocaml" ,ocaml)
("ncurses" ,ncurses)
@@ -1087,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
@@ -1096,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)
@@ -1390,9 +1416,8 @@ other XUnit testing frameworks.")
(format port "directory=\"../zip\"\n")))))))
#: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
@@ -1427,7 +1452,7 @@ files in these formats.")
(define-public ocaml-zarith
(package
(name "ocaml-zarith")
- (version "1.9.1")
+ (version "1.12")
(source (origin
(method git-fetch)
(uri (git-reference
@@ -1436,7 +1461,7 @@ files in these formats.")
(file-name (git-file-name name version))
(sha256
(base32
- "0hv5ywz1q2cgn8apfz490clwk5hcynr937g2v8i13x2ax4bnv0lz"))))
+ "1jslm1rv1j0ya818yh23wf3bb6hz7qqj9pn5fwl45y9mqyqa01s9"))))
(build-system ocaml-build-system)
(native-inputs
`(("perl" ,perl)))
@@ -1447,7 +1472,14 @@ files in these formats.")
#:phases
(modify-phases %standard-phases
(replace 'configure
- (lambda _ (invoke "./configure"))))))
+ (lambda _ (invoke "./configure")))
+ (add-after 'install 'move-sublibs
+ (lambda* (#:key outputs #:allow-other-keys)
+ (let* ((out (assoc-ref outputs "out"))
+ (lib (string-append out "/lib/ocaml/site-lib")))
+ (mkdir-p (string-append lib "/stublibs"))
+ (rename-file (string-append lib "/zarith/dllzarith.so")
+ (string-append lib "/stublibs/dllzarith.so"))))))))
(home-page "https://forge.ocamlcore.org/projects/zarith/")
(synopsis "Implements arbitrary-precision integers")
(description "Implements arithmetic and logical operations over
@@ -1490,9 +1522,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")
@@ -1596,7 +1627,7 @@ full_split, cut, rcut, etc..")
(define dune-bootstrap
(package
(name "dune")
- (version "2.8.5")
+ (version "2.9.0")
(source (origin
(method git-fetch)
(uri (git-reference
@@ -1605,14 +1636,14 @@ full_split, cut, rcut, etc..")
(file-name (git-file-name name version))
(sha256
(base32
- "0a1jj6njzsfjgklsirs6a79079wg4jhy6n888vg3dgp44awwq5jn"))))
+ "01np4jy0f3czkpzkl38k9b4lsh41qk52ldaqxl98mgigyzhx4w0b"))))
(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
@@ -2132,8 +2163,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)
@@ -2845,8 +2876,7 @@ without a complete in-memory representation of the data.")
"1dvcl108ir9nqkk4mjm9xhhj4p9dx9bmg8bnms54fizs1x3x8ar3"))))
(build-system dune-build-system)
(arguments
- `(#:test-target "tests"
- #:build-flags (list "--profile=release")))
+ `(#:test-target "tests"))
(propagated-inputs
`(("ocaml-cmdliner" ,ocaml-cmdliner)))
(home-page "https://www.typerex.org/ocp-indent.html")
@@ -3022,7 +3052,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
@@ -3264,8 +3294,7 @@ build system and allows external tools to analyse your project easily.")
"1smcc0l6fh2n0y6bp96c69j5nw755jja99w0b206wx3yb2m4w2hs"))))
(build-system dune-build-system)
(arguments
- `(#:tests? #f
- #:build-flags (list "--profile" "release")))
+ `(#:tests? #f))
(native-inputs
`(("ocamlbuild" ,ocamlbuild)))
(home-page "https://github.com/mjambon/cppo")
@@ -3333,8 +3362,7 @@ standard iterator type starting from 4.07.")
(base32 "07ycb103mr4mrkxfd63cwlsn023xvcjp0ra0k7n2gwrg0mwxmfss"))))
(build-system dune-build-system)
(arguments
- `(#:tests? #f
- #:build-flags (list "--profile" "release")))
+ `(#:tests? #f))
(propagated-inputs
`(("ocaml-seq" ,ocaml-seq)))
(native-inputs
@@ -3697,9 +3725,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
@@ -3811,9 +3840,8 @@ the plugins facilitate extensibility, and the frontends serve as entry points.")
"0chn7ldqb3wyf95yhmsxxq65cif56smgz1mhhc7m0dpwmyq1k97h"))))
(build-system dune-build-system)
(arguments
- `(#:build-flags (list "--profile" "release")
- #:test-target "camomile-test"
- #:tests? #f; Tests fail, see https://github.com/yoriyuki/Camomile/issues/82
+ `(#:test-target "camomile-test"
+ #:tests? #f ; Tests fail, see https://github.com/yoriyuki/Camomile/issues/82
#:phases
(modify-phases %standard-phases
(add-before 'build 'fix-usr-share
@@ -3904,8 +3932,7 @@ connect an engine to your inputs and rendering functions to get an editor.")
(base32 "0zcjy6fvf0d3i2ssz96asl889n3r6bplyzk7xvb2s3dkxbgcisyy"))))
(build-system dune-build-system)
(arguments
- `(#:build-flags (list "--profile" "release")
- #:tests? #f
+ `(#:tests? #f
#:ocaml ,ocaml-4.07
#:findlib ,ocaml4.07-findlib
#:dune ,ocaml4.07-dune))
@@ -4129,28 +4156,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
@@ -4468,12 +4490,7 @@ than the first one.")
`(#:phases
(modify-phases %standard-phases
(add-before 'build 'make-writable
- (lambda _
- (for-each
- (lambda (file)
- (chmod file #o644))
- (find-files "." "."))
- #t)))))
+ (lambda _ (for-each make-file-writable (find-files "." ".")))))))
(inputs
`(("ocaml-easy-format" ,ocaml-easy-format)))
(native-inputs
@@ -4921,16 +4938,6 @@ provided by companion libraries such as
(sha256
(base32
"0j6xb4265jr41vw4fjzak6yr8s30qrnzapnc6rl1dxy8bjai0nir"))))
- (arguments
- `(#:phases
- (modify-phases %standard-phases
- (replace 'build
- ;; make warnings non fatal (jbuilder behaviour)
- (lambda _
- (invoke "dune" "build" "@install" "--profile=release"))))
- #:ocaml ,ocaml-4.07
- #:findlib ,ocaml4.07-findlib
- #:dune ,ocaml4.07-dune))
(properties '()))))
(define-public ocaml-compiler-libs
@@ -5038,7 +5045,7 @@ as part of the same ocaml-migrate-parsetree driver.")
(define-public ocaml-ppxlib
(package
(name "ocaml-ppxlib")
- (version "0.22.1")
+ (version "0.23.0")
(home-page "https://github.com/ocaml-ppx/ppxlib")
(source
(origin
@@ -5049,7 +5056,7 @@ as part of the same ocaml-migrate-parsetree driver.")
(file-name (git-file-name name version))
(sha256
(base32
- "0cpfg634if1py1b2rljk3cagq9gj68dl2gk1kdg76f9rapvl2i4g"))))
+ "0jg5v4pssbl66hn5davpin1i57a0r3r54l96vpz5y99xk5w70xi1"))))
(build-system dune-build-system)
(propagated-inputs
`(("ocaml-base" ,ocaml-base)
@@ -5329,6 +5336,10 @@ definitions.")
(uri (git-reference
(url "https://github.com/janestreet/ppx_variants_conv")
(commit (string-append "v" version))))
+ (patches
+ (search-patches
+ ;; Fix build when building with ocaml-ppxlib@0.23.0.
+ "ocaml-ppx-variants-ppxlib-api-change.patch"))
(file-name (git-file-name name version))
(sha256
(base32
@@ -5775,7 +5786,7 @@ else expression.")
(define-public ocaml-ppx-optcomp
(package
(name "ocaml-ppx-optcomp")
- (version "0.14.1")
+ (version "0.14.3")
(home-page "https://github.com/janestreet/ppx_optcomp")
(source
(origin
@@ -5786,7 +5797,7 @@ else expression.")
(file-name (git-file-name name version))
(sha256
(base32
- "0j5smqa0hig1yn8wfrb4mv0y59kkwsalmqkm5asbd7kcc6589ap4"))))
+ "1iflgfzs23asw3k6098v84al5zqx59rx2qjw0mhvk56avlx71pkw"))))
(build-system dune-build-system)
(propagated-inputs
`(("ocaml-base" ,ocaml-base)
@@ -6428,7 +6439,7 @@ the full Core is not available, such as in Javascript.")
(define-public ocaml-markup
(package
(name "ocaml-markup")
- (version "1.0.0")
+ (version "1.0.2")
(home-page "https://github.com/aantron/markup.ml")
(source
(origin
@@ -6439,7 +6450,7 @@ the full Core is not available, such as in Javascript.")
(file-name (git-file-name name version))
(sha256
(base32
- "09hkrf9pw6hpb9j06p5bddklpnjwdjpqza3bx2179l970yl67an9"))))
+ "1kvqwrrcrys5d0kzdwxcj66jpi6sdhfas4pcg02pixx92q87vhqm"))))
(build-system dune-build-system)
(arguments
`(#:package "markup"))
@@ -6492,6 +6503,9 @@ stream, and convert everything to UTF-8.")
(sha256
(base32
"0aif4abvfmi9xc1pvw5n5rbm6rzkkpsxyvdn0lanr33rjpvkwdlm"))))
+ (native-inputs
+ `(("ocaml-ounit" ,ocaml-ounit)
+ ("pkg-config" ,pkg-config)))
(properties '())))
(define-public ocaml-tyxml
@@ -6532,7 +6546,7 @@ combinators.")
(define-public ocaml-bisect-ppx
(package
(name "ocaml-bisect-ppx")
- (version "1.4.2")
+ (version "2.6.1")
(source
(origin
(method git-fetch)
@@ -6542,24 +6556,14 @@ combinators.")
(file-name (git-file-name name version))
(sha256
(base32
- "0900vli5kw7s5kdam0n4cqsfsfqb7mdb3azn3i55595gilg1vyn8"))))
+ "1knglw1b2kjr9jnd8cpfzmm581abxxdcx9l3cd2balg6gnac7qk1"))))
(build-system dune-build-system)
(propagated-inputs
- `(("ocaml-migrate-parsetree" ,ocaml-migrate-parsetree-1)
- ("ocaml-ppx-tools-versioned" ,ocaml-ppx-tools-versioned)
- ("ocaml-ounit" ,ocaml-ounit)))
+ `(("ocaml-ppxlib" ,ocaml-ppxlib)
+ ("ocaml-cmdliner" ,ocaml-cmdliner)))
(arguments
- `(#:phases
- (modify-phases %standard-phases
- (add-before 'build 'fix-deprecated
- (lambda _
- ;; Fixed upstream in 22dd1ad9a0c9629f60599c22d82c6488394d6d32, but
- ;; not in a release yet.
- (substitute* "src/ppx/instrument.ml"
- (("module Ast = Ast_405")
- "module Ast = Migrate_parsetree.Ast_405
-module Ast_405 = Ast"))
- #t)))))
+ ;; Tests require ocamlformat which would lead to circular dependencies
+ '(#:tests? #f))
(home-page "https://github.com/aantron/bisect_ppx")
(synopsis "Code coverage for OCaml")
(description "Bisect_ppx helps you test thoroughly. It is a small
@@ -6612,6 +6616,34 @@ advantage over ocamldoc is an accurate cross-referencer, which handles the
complexity of the OCaml module system.")
(license license:isc)))
+(define-public ocaml-odoc-parser
+ (package
+ (name "ocaml-odoc-parser")
+ (version "0.9.0")
+ (source
+ (origin
+ (method git-fetch)
+ (uri (git-reference
+ (url "https://github.com/ocaml-doc/odoc-parser")
+ (commit version)))
+ (file-name (git-file-name name version))
+ (sha256
+ (base32
+ "1jlc6dp3v90r1ra7r0jfw0xs8rylwdz9gymw4rd53h0p17cw1wnj"))))
+ (build-system dune-build-system)
+ (propagated-inputs
+ `(("ocaml-astring" ,ocaml-astring)
+ ("ocaml-result" ,ocaml-result)))
+ (native-inputs
+ `(("ocaml-ppx-expect" ,ocaml-ppx-expect)))
+ (home-page "https://github.com/ocaml-doc/odoc-parser")
+ (synopsis "Parser for ocaml documentation comments")
+ (description
+ "This package provides a library for parsing the contents of OCaml
+documentation comments, formatted using Odoc syntax, an extension of the
+language understood by ocamldoc.")
+ (license license:isc)))
+
;; version 1.5.2 requires ocaml-markdown 1.0.0 which does not compile
;; with old version of dune used in package-with-ocaml4.07
(define-public ocaml4.07-odoc
@@ -6893,8 +6925,12 @@ support for Mparser.")))
(lambda _
(for-each (lambda (file)
(chmod file #o644))
- (find-files "." "."))
- #t)))))
+ (find-files "." "."))))
+ (add-before 'build 'set-version
+ (lambda _
+ (substitute* "dune-project"
+ (("\\(name lablgtk3\\)")
+ (string-append "(name lablgtk3)\n(version " ,version ")"))))))))
(propagated-inputs
`(("ocaml-cairo2" ,ocaml-cairo2)))
(inputs
@@ -6960,6 +6996,197 @@ provides support to program with time varying values: declarative events and
client chooses the concrete timeline.")
(license license:lgpl2.1+)))
+(define-public ocaml-uucd
+ (package
+ (name "ocaml-uucd")
+ (version "13.0.0")
+ (source
+ (origin
+ (method url-fetch)
+ (uri (string-append "https://erratique.ch/software/uucd/releases/"
+ "uucd-" version ".tbz"))
+ (sha256
+ (base32
+ "1fg77hg4ibidkv1x8hhzl8z3rzmyymn8m4i35jrdibb8adigi8v2"))))
+ (build-system ocaml-build-system)
+ (arguments
+ '(#:build-flags '("build" "--tests" "true")
+ #:phases
+ (modify-phases %standard-phases
+ (delete 'configure))))
+ (propagated-inputs
+ `(("ocaml-xmlm" ,ocaml-xmlm)))
+ (native-inputs
+ `(("opam" ,opam)
+ ("ocaml-findlib" ,ocaml-findlib)
+ ("ocamlbuild" ,ocamlbuild)
+ ("ocaml-topkg" ,ocaml-topkg)))
+ (home-page "https://erratique.ch/software/uucd")
+ (synopsis "Unicode character database decoder for OCaml")
+ (description "Uucd is an OCaml module to decode the data of the Unicode
+character database from its XML representation. It provides high-level (but
+not necessarily efficient) access to the data so that efficient
+representations can be extracted.")
+ (license license:isc)))
+
+(define-public ocaml-uucp
+ (package
+ (name "ocaml-uucp")
+ (version "13.0.0")
+ (source
+ (origin
+ (method url-fetch)
+ (uri (string-append "https://erratique.ch/software/uucp/releases/"
+ "uucp-" version ".tbz"))
+ (sha256
+ (base32
+ "19kf8ypxaakacgg1dwwfzkc2zicaj88cmw11fw2z7zl24dn4gyiq"))))
+ (build-system ocaml-build-system)
+ (arguments
+ '(#:build-flags '("build" "--tests" "true")
+ #:phases
+ (modify-phases %standard-phases
+ (delete 'configure))))
+ (native-inputs
+ `(("opam" ,opam)
+ ("ocaml-findlib" ,ocaml-findlib)
+ ("ocamlbuild" ,ocamlbuild)
+ ("ocaml-topkg" ,ocaml-topkg)
+ ("ocaml-uucd" ,ocaml-uucd)
+ ("ocaml-uunf" ,ocaml-uunf)
+ ("ocaml-uutf" ,ocaml-uutf)))
+ (home-page "https://erratique.ch/software/uucp")
+ (synopsis "Unicode character properties for OCaml")
+ (description "Uucp is an OCaml library providing efficient access to a
+selection of character properties of the Unicode character database.")
+ (license license:isc)))
+
+(define-public ocaml-uuseg
+ (package
+ (name "ocaml-uuseg")
+ (version "13.0.0")
+ (source
+ (origin
+ (method url-fetch)
+ (uri (string-append "https://erratique.ch/software/uuseg/releases/"
+ "uuseg-" version ".tbz"))
+ (sha256
+ (base32
+ "1a635j8ra6p27g1ivfln3387lhwqmf6vq4r6bn7b6n1qsqyi1rls"))))
+ (build-system ocaml-build-system)
+ (arguments
+ '(#:build-flags '("build" "--tests" "true")
+ #:phases
+ (modify-phases %standard-phases
+ (delete 'configure))))
+ (propagated-inputs
+ `(("ocaml-uucp" ,ocaml-uucp)
+ ("ocaml-uutf" ,ocaml-uutf)
+ ("ocaml-cmdliner" ,ocaml-cmdliner)))
+ (native-inputs
+ `(("opam" ,opam)
+ ("ocaml-findlib" ,ocaml-findlib)
+ ("ocamlbuild" ,ocamlbuild)
+ ("ocaml-topkg" ,ocaml-topkg)))
+ (home-page "https://erratique.ch/software/uuseg")
+ (synopsis "Unicode text segmentation for OCaml")
+ (description "Uuseg is an OCaml library for segmenting Unicode text. It
+implements the locale independent Unicode text segmentation algorithms to
+detect grapheme cluster, word and sentence boundaries and the Unicode line
+breaking algorithm to detect line break opportunities.
+
+The library is independent from any IO mechanism or Unicode text data
+structure and it can process text without a complete in-memory
+representation.")
+ (license license:isc)))
+
+(define-public ocaml-fix
+ (package
+ (name "ocaml-fix")
+ (version "20201120")
+ (source
+ (origin
+ (method git-fetch)
+ (uri (git-reference
+ (url "https://gitlab.inria.fr/fpottier/fix")
+ (commit version)))
+ (file-name (git-file-name name version))
+ (sha256
+ (base32
+ "1j40mg1gy03c0djzx3nzmpvnl984s14n04zwcmp2xnlidq48kvs4"))))
+ (build-system dune-build-system)
+ (arguments
+ ;; No tests.
+ '(#:tests? #f))
+ (home-page "https://gitlab.inria.fr/fpottier/fix")
+ (synopsis "Facilities for memoization and fixed points")
+ (description "This package provides helpers with various constructions
+that involve memoization and recursion.")
+ (license license:lgpl2.0)))
+
+(define-public ocaml-dune-build-info
+ (package
+ (inherit dune)
+ (name "ocaml-dune-build-info")
+ (build-system dune-build-system)
+ (arguments
+ '(#:package "dune-build-info"
+ ;; No separate test suite from dune.
+ #:tests? #f))
+ (propagated-inputs
+ `(("ocaml-odoc" ,ocaml-odoc)))
+ (synopsis "Embed build informations inside executable")
+ (description "This package allows one to access information about how the
+executable was built, such as the version of the project at which it was built
+or the list of statically linked libraries with their versions. It supports
+reporting the version from the version control system during development to
+get an precise reference of when the executable was built.")))
+
+(define-public ocamlformat
+ (package
+ (name "ocamlformat")
+ (version "0.19.0")
+ (source
+ (origin
+ (method git-fetch)
+ (uri (git-reference
+ (url "https://github.com/ocaml-ppx/ocamlformat")
+ (commit version)))
+ (file-name (git-file-name name version))
+ (sha256
+ (base32
+ "0dp4pkznz9yvqx9gxwbid1z2b8ajkr8i27zay9ghx69624hz3i4z"))))
+ (build-system dune-build-system)
+ (arguments
+ '(#:package "ocamlformat"
+ ;; FIXME: The expected format is slightly different than what the
+ ;; produced format is for test/cli/stdin.t
+ #:tests? #f))
+ (propagated-inputs
+ `(("ocaml-version" ,ocaml-version)
+ ("ocaml-base" ,ocaml-base)
+ ("ocaml-cmdliner" ,ocaml-cmdliner)
+ ("ocaml-dune-build-info" ,ocaml-dune-build-info)
+ ("ocaml-fix" ,ocaml-fix)
+ ("ocaml-fpath" ,ocaml-fpath)
+ ("ocaml-menhir" ,ocaml-menhir)
+ ("ocaml-odoc" ,ocaml-odoc)
+ ("ocaml-ppxlib" ,ocaml-ppxlib)
+ ("ocaml-re" ,ocaml-re)
+ ("ocaml-odoc-parser" ,ocaml-odoc-parser)
+ ("ocaml-stdio" ,ocaml-stdio)
+ ("ocaml-uuseg" ,ocaml-uuseg)
+ ("ocaml-uutf" ,ocaml-uutf)))
+ (native-inputs
+ `(("ocaml-alcotest" ,ocaml-alcotest)
+ ("ocaml-ocp-indent" ,ocaml-ocp-indent)
+ ("ocaml-bisect-ppx" ,ocaml-bisect-ppx)))
+ (home-page "https://github.com/ocaml-ppx/ocamlformat")
+ (synopsis "Auto-formatter for OCaml code")
+ (description "OCamlFormat is a tool to automatically format OCaml code in
+a uniform style.")
+ (license license:expat)))
+
(define-public ocaml-bigstringaf
(package
(name "ocaml-bigstringaf")
@@ -7197,7 +7424,7 @@ browsers and Node.js.")
`(("which" ,which)
("texlive" ,(texlive-updmap.cfg
(list texlive-fonts-ec texlive-preprint
- texlive-latex-hyperref texlive-bibtex)))))
+ texlive-hyperref texlive-bibtex)))))
(propagated-inputs
`(("hevea" ,hevea)))
(home-page "https://www.lri.fr/~filliatr/bibtex2html/")