1 ;;; GNU Guix --- Functional package management for GNU
2 ;;; Copyright © 2013 Cyril Roelandt <tipecaml@gmail.com>
3 ;;; Copyright © 2014, 2015 Mark H Weaver <mhw@netris.org>
4 ;;; Copyright © 2015 Andreas Enge <andreas@enge.fr>
5 ;;; Copyright © 2015 David Hashe <david.hashe@dhashe.com>
6 ;;; Copyright © 2016 Eric Bavier <bavier@member.fsf.org>
7 ;;; Copyright © 2016 Jan Nieuwenhuizen <janneke@gnu.org>
8 ;;; Copyright © 2016 Efraim Flashner <efraim@flashner.co.il>
9 ;;; Copyright © 2016, 2017 Julien Lepiller <julien@lepiller.eu>
11 ;;; This file is part of GNU Guix.
13 ;;; GNU Guix is free software; you can redistribute it and/or modify it
14 ;;; under the terms of the GNU General Public License as published by
15 ;;; the Free Software Foundation; either version 3 of the License, or (at
16 ;;; your option) any later version.
18 ;;; GNU Guix is distributed in the hope that it will be useful, but
19 ;;; WITHOUT ANY WARRANTY; without even the implied warranty of
20 ;;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
21 ;;; GNU General Public License for more details.
23 ;;; You should have received a copy of the GNU General Public License
24 ;;; along with GNU Guix. If not, see <http://www.gnu.org/licenses/>.
26 (define-module (gnu packages ocaml)
27 #:use-module (gnu packages)
28 #:use-module (gnu packages autotools)
29 #:use-module (gnu packages base)
30 #:use-module (gnu packages compression)
31 #:use-module (gnu packages curl)
32 #:use-module (gnu packages emacs)
33 #:use-module (gnu packages gcc)
34 #:use-module (gnu packages ghostscript)
35 #:use-module (gnu packages glib)
36 #:use-module (gnu packages gnome)
37 #:use-module (gnu packages gtk)
38 #:use-module (gnu packages libevent)
39 #:use-module (gnu packages lynx)
40 #:use-module (gnu packages m4)
41 #:use-module (gnu packages multiprecision)
42 #:use-module (gnu packages ncurses)
43 #:use-module (gnu packages pcre)
44 #:use-module (gnu packages perl)
45 #:use-module (gnu packages pkg-config)
46 #:use-module (gnu packages python)
47 #:use-module (gnu packages tex)
48 #:use-module (gnu packages texinfo)
49 #:use-module (gnu packages time)
50 #:use-module (gnu packages tls)
51 #:use-module (gnu packages version-control)
52 #:use-module (gnu packages xml)
53 #:use-module (gnu packages xorg)
54 #:use-module (guix build-system gnu)
55 #:use-module (guix build-system ocaml)
56 #:use-module (guix download)
57 #:use-module ((guix licenses) #:prefix license:)
58 #:use-module (guix packages)
59 #:use-module (guix svn-download)
60 #:use-module (guix utils))
62 ;; A shortcut for files from ocaml forge. Downloaded files are computed from
63 ;; their number, not their name.
64 (define (ocaml-forge-uri name version file-number)
65 (string-append "https://forge.ocamlcore.org/frs/download.php/"
66 (number->string file-number) "/" name "-" version
69 ;; Janestreet packages are found in a similar way and all need the same patch.
70 (define (janestreet-origin name version hash)
71 (origin (method url-fetch)
72 (uri (string-append "https://ocaml.janestreet.com/ocaml-core/"
73 (version-major+minor version) "/files/"
74 name "-" version ".tar.gz"))
75 (sha256 (base32 hash))
76 (modules '((guix build utils)))
78 (let ((pattern (string-append "lib/" name)))
80 ;; install.ml contains an invalid reference to the ppx file and
81 ;; propagates this error to the generated META file. It
82 ;; looks for it in the "lib" directory, but it is installed in
83 ;; "lib/ocaml/site-lib/package". This substitute does not change
84 ;; this file for non ppx packages.
85 (substitute* "install.ml"
86 ((,pattern) (string-append "lib/ocaml/site-lib/" ,name)))
87 ;; The standard Makefile would try to install janestreet modules
88 ;; in OCaml's directory in the store, which is read-only.
89 (substitute* "Makefile"
91 "--libdir $(LIBDIR) --prefix")))))))
93 ;; They also require almost the same set of arguments
94 (define janestreet-arguments
97 (list (string-append "CONFIGUREFLAGS=--prefix "
98 (assoc-ref %outputs "out")
100 (string-append "LIBDIR="
101 (assoc-ref %outputs "out")
102 "/lib/ocaml/site-lib")
103 ;; for ocaml-bin-prot, otherwise ignored
104 (string-append "OCAML_TOPLEVEL_PATH="
105 (assoc-ref %build-inputs "findlib")
106 "/lib/ocaml/site-lib"))
107 #:phases (modify-phases %standard-phases (delete 'configure))))
116 "http://caml.inria.fr/pub/distrib/ocaml-"
117 (version-major+minor version)
118 "/ocaml-" version ".tar.xz"))
121 "1qwwvy8nzd87hk8rd9sm667nppakiapnx4ypdwcrlnav2dz6kil3"))
124 "ocaml-CVE-2015-8869.patch"
125 "ocaml-Add-a-.file-directive.patch"))))
126 (build-system gnu-build-system)
128 (list (search-path-specification
129 (variable "OCAMLPATH")
130 (files (list "lib/ocaml" "lib/ocaml/site-lib")))
131 (search-path-specification
132 (variable "CAML_LD_LIBRARY_PATH")
133 (files (list "lib/ocaml/site-lib/stubslibs")))))
136 ("pkg-config" ,pkg-config)))
139 ;; For libiberty, needed for objdump support.
140 ("gcc:lib" ,(canonical-package gcc-4.9) "lib")
141 ("zlib" ,zlib))) ;also needed for objdump support
143 `(#:modules ((guix build gnu-build-system)
147 (modify-phases %standard-phases
148 (add-after 'unpack 'patch-/bin/sh-references
149 (lambda* (#:key inputs #:allow-other-keys)
150 (let* ((sh (string-append (assoc-ref inputs "bash")
152 (quoted-sh (string-append "\"" sh "\"")))
153 (with-fluids ((%default-port-encoding #f))
159 (format (current-error-port) "\
160 patch-/bin/sh-references: ~a: changing `\"/bin/sh\"' to `~a'~%"
163 (find-files "." "\\.ml$"))
166 (lambda* (#:key outputs #:allow-other-keys)
167 (let* ((out (assoc-ref outputs "out"))
168 (mandir (string-append out "/share/man")))
169 ;; Custom configure script doesn't recognize
170 ;; --prefix=<PREFIX> syntax (with equals sign).
171 (zero? (system* "./configure"
173 "--mandir" mandir)))))
176 (zero? (system* "make" "-j" (number->string
177 (parallel-job-count))
180 (add-after 'install 'check
182 (with-directory-excursion "testsuite"
183 (zero? (system* "make" "all")))))
184 (add-before 'check 'prepare-socket-test
186 (format (current-error-port)
187 "Spawning local test web server on port 8080~%")
188 (when (zero? (primitive-fork))
189 (run-server (lambda (request request-body)
190 (values '((content-type . (text/plain)))
192 'http '(#:port 8080)))
193 (let ((file "testsuite/tests/lib-threads/testsocket.ml"))
194 (format (current-error-port)
195 "Patching ~a to use localhost port 8080~%"
198 (("caml.inria.fr") "localhost")
200 (("HTTP1.0") "HTTP/1.0"))
202 (home-page "https://ocaml.org/")
203 (synopsis "The OCaml programming language")
205 "OCaml is a general purpose industrial-strength programming language with
206 an emphasis on expressiveness and safety. Developed for more than 20 years at
207 Inria it benefits from one of the most advanced type systems and supports
208 functional, imperative and object-oriented styles of programming.")
209 ;; The compiler is distributed under qpl1.0 with a change to choice of
210 ;; law: the license is governed by the laws of France. The library is
211 ;; distributed under lgpl2.0.
212 (license (list license:qpl license:lgpl2.0))))
220 ;; Use the '-full' version, which includes all the dependencies.
222 "https://github.com/ocaml/opam/releases/download/"
223 version "/opam-full-" version ".tar.gz")
224 ;; (string-append "https://github.com/ocaml/opam/archive/"
225 ;; version ".tar.gz")
229 "004gwn6rbpcb53y3rpb3v23vk39rp2xmf0liyd5iy12ij8bigrhm"))))
230 (build-system gnu-build-system)
232 '(;; Sometimes, 'make -jX' would fail right after ./configure with
233 ;; "Fatal error: exception End_of_file".
236 ;; For some reason, 'ocp-build' needs $TERM to be set.
237 #:make-flags `("TERM=screen"
238 ,(string-append "SHELL="
239 (assoc-ref %build-inputs "bash")
241 #:test-target "tests"
243 ;; FIXME: There's an obscure test failure:
244 ;; …/_obuild/opam/opam.asm install P1' failed.
247 #:phases (modify-phases %standard-phases
248 (add-before 'build 'pre-build
249 (lambda* (#:key inputs make-flags #:allow-other-keys)
250 (let ((bash (assoc-ref inputs "bash")))
251 (substitute* "src/core/opamSystem.ml"
253 (string-append "\"" bash "/bin/sh\"")))
254 ;; Build dependencies
255 (zero? (apply system* "make" "lib-ext" make-flags)))))
256 (add-before 'check 'pre-check
258 (setenv "HOME" (getcwd))
259 (and (system "git config --global user.email guix@gnu.org")
260 (system "git config --global user.name Guix")))))))
262 `(("git" ,git) ;for the tests
263 ("python" ,python) ;for the tests
269 (home-page "http://opam.ocamlpro.com/")
270 (synopsis "Package manager for OCaml")
272 "OPAM is a tool to manage OCaml packages. It supports multiple
273 simultaneous compiler installations, flexible package constraints, and a
274 Git-friendly development workflow.")
276 ;; The 'LICENSE' file waives some requirements compared to LGPLv3.
277 (license license:lgpl3)))
279 (define-public camlp4
285 (uri (string-append "https://github.com/ocaml/camlp4/archive/"
289 "0icdfzhsbgf89925gc8gl3fm8z2xzszzlib0v9dj5wyzkyv3a342"))
290 (file-name (string-append name "-" version ".tar.gz"))))
291 (build-system gnu-build-system)
292 (native-inputs `(("ocaml" ,ocaml)
294 (inputs `(("ocaml" ,ocaml)))
296 '(#:tests? #f ;no documented test target
297 ;; a race-condition will lead byte and native targets to mkdir _build
298 ;; which fails on the second attempt.
300 #:make-flags '("all")
301 #:phases (modify-phases %standard-phases
304 (lambda* (#:key outputs #:allow-other-keys)
305 ;; This is a home-made 'configure' script.
306 (let ((out (assoc-ref outputs "out")))
307 (zero? (system* "./configure"
308 (string-append "--libdir=" out
309 "/lib/ocaml/site-lib")
310 (string-append "--bindir=" out "/bin")
311 (string-append "--pkgdir=" out
312 "/lib/ocaml/site-lib"))))))
313 (add-after 'install 'install-meta
314 (lambda* (#:key outputs #:allow-other-keys)
315 (let ((out (assoc-ref outputs "out")))
316 (substitute* "camlp4/META.in"
318 (string-append "directory = \"" out
319 "/lib/ocaml/site-lib/camlp4\"\n")))
320 (zero? (system* "make" "install-META"))))))))
321 (home-page "https://github.com/ocaml/camlp4")
322 (synopsis "Write parsers in OCaml")
324 "Camlp4 is a software system for writing extensible parsers for
325 programming languages. It provides a set of OCaml libraries that are used to
326 define grammars as well as loadable syntax extensions of such grammars.
327 Camlp4 stands for Caml Preprocessor and Pretty-Printer and one of its most
328 important applications is the definition of domain-specific extensions of the
331 ;; This is LGPLv2 with an exception that allows packages statically-linked
332 ;; against the library to be released under any terms.
333 (license license:lgpl2.0)))
335 (define-public camlp5
341 (uri (string-append "http://camlp5.gforge.inria.fr/distrib/src/"
342 name "-" version ".tgz"))
345 "1ql04iyvclpyy9805kpddc4ndjb5d0qg4shhi2fc6bixi49fvy89"))))
346 (build-system gnu-build-system)
350 `(#:tests? #f ; XXX TODO figure out how to run the tests
352 (modify-phases %standard-phases
354 (lambda* (#:key outputs #:allow-other-keys)
355 (let* ((out (assoc-ref outputs "out"))
356 (mandir (string-append out "/share/man")))
357 ;; Custom configure script doesn't recognize
358 ;; --prefix=<PREFIX> syntax (with equals sign).
359 (zero? (system* "./configure"
361 "--mandir" mandir)))))
364 (zero? (system* "make" "-j" (number->string
365 (parallel-job-count))
367 (home-page "http://camlp5.gforge.inria.fr/")
368 (synopsis "Pre-processor Pretty Printer for OCaml")
370 "Camlp5 is a Pre-Processor-Pretty-Printer for Objective Caml. It offers
371 tools for syntax (Stream Parsers and Grammars) and the ability to modify the
372 concrete syntax of the language (Quotations, Syntax Extensions).")
373 ;; Most files are distributed under bsd-3, but ocaml_stuff/* is under qpl.
374 (license (list license:bsd-3 license:qpl))))
382 (uri (string-append "http://hevea.inria.fr/old/"
383 name "-" version ".tar.gz"))
386 "14fns13wlnpiv9i05841kvi3cq4b9v2sw5x3ff6ziws28q701qnd"))))
387 (build-system gnu-build-system)
391 `(#:tests? #f ; no test suite
392 #:make-flags (list (string-append "PREFIX=" %output))
393 #:phases (modify-phases %standard-phases
395 (add-before 'build 'patch-/bin/sh
398 (("/bin/sh") (which "sh")))
400 (home-page "http://hevea.inria.fr/")
401 (synopsis "LaTeX to HTML translator")
403 "HeVeA is a LaTeX to HTML translator that generates modern HTML 5. It is
404 written in Objective Caml.")
405 (license license:qpl)))
413 (uri (string-append "https://coq.inria.fr/distrib/V" version
414 "/files/" name "-" version ".tar.gz"))
417 "0wyywia0darak2zmc5v0ra9rn0b9whwdfiahralm8v5za499s8w3"))))
418 (build-system gnu-build-system)
420 `(("texlive" ,texlive)
421 ("findlib" ,ocaml-findlib)
429 (modify-phases %standard-phases
431 (lambda* (#:key outputs #:allow-other-keys)
432 (let* ((out (assoc-ref outputs "out"))
433 (mandir (string-append out "/share/man"))
434 (browser "icecat -remote \"OpenURL(%s,new-tab)\""))
435 (zero? (system* "./configure"
442 (zero? (system* "make" "-j" (number->string
443 (parallel-job-count))
446 (add-after 'install 'check
448 (with-directory-excursion "test-suite"
449 (zero? (system* "make"))))))))
450 (home-page "https://coq.inria.fr")
451 (synopsis "Proof assistant for higher-order logic")
453 "Coq is a proof assistant for higher-order logic, which allows the
454 development of computer programs consistent with their formal specification.
455 It is developed using Objective Caml and Camlp5.")
456 ;; The code is distributed under lgpl2.1.
457 ;; Some of the documentation is distributed under opl1.0+.
458 (license (list license:lgpl2.1 license:opl1.0+))))
460 (define-public proof-general
462 (name "proof-general")
467 "http://proofgeneral.inf.ed.ac.uk/releases/"
468 "ProofGeneral-" version ".tgz"))
471 "09qb0myq66fw17v4ziz401ilsb5xlxz1nl2wsp69d0vrfy0bcrrm"))))
472 (build-system gnu-build-system)
475 ("emacs" ,emacs-minimal)
476 ("texinfo" ,texinfo)))
478 `(("host-emacs" ,emacs)
482 `(#:tests? #f ; no check target
483 #:make-flags (list (string-append "PREFIX=" %output)
484 (string-append "DEST_PREFIX=" %output))
485 #:modules ((guix build gnu-build-system)
487 (guix build emacs-utils))
488 #:imported-modules (,@%gnu-build-system-modules
489 (guix build emacs-utils))
491 (modify-phases %standard-phases
493 (add-after 'unpack 'disable-byte-compile-error-on-warn
495 (substitute* "Makefile"
496 (("\\(setq byte-compile-error-on-warn t\\)")
497 "(setq byte-compile-error-on-warn nil)"))
499 (add-after 'unpack 'patch-hardcoded-paths
500 (lambda* (#:key inputs outputs #:allow-other-keys)
501 (let ((out (assoc-ref outputs "out"))
502 (coq (assoc-ref inputs "coq"))
503 (emacs (assoc-ref inputs "host-emacs")))
504 (define (coq-prog name)
505 (string-append coq "/bin/" name))
506 (emacs-substitute-variables "coq/coq.el"
507 ("coq-prog-name" (coq-prog "coqtop"))
508 ("coq-compiler" (coq-prog "coqc"))
509 ("coq-dependency-analyzer" (coq-prog "coqdep")))
510 (substitute* "Makefile"
511 (("/sbin/install-info") "install-info"))
512 (substitute* "bin/proofgeneral"
513 (("^PGHOMEDEFAULT=.*" all)
515 "PGHOME=$PGHOMEDEFAULT\n"
516 "EMACS=" emacs "/bin/emacs")))
518 (add-after 'unpack 'clean
520 ;; Delete the pre-compiled elc files for Emacs 23.
521 (zero? (system* "make" "clean"))))
522 (add-after 'install 'install-doc
523 (lambda* (#:key make-flags #:allow-other-keys)
524 ;; XXX FIXME avoid building/installing pdf files,
525 ;; due to unresolved errors building them.
526 (substitute* "Makefile"
527 ((" [^ ]*\\.pdf") ""))
528 (zero? (apply system* "make" "install-doc"
530 (home-page "http://proofgeneral.inf.ed.ac.uk/")
531 (synopsis "Generic front-end for proof assistants based on Emacs")
533 "Proof General is a major mode to turn Emacs into an interactive proof
534 assistant to write formal mathematical proofs using a variety of theorem
536 (license license:gpl2+)))
538 (define-public ocaml-menhir
540 (name "ocaml-menhir")
545 "http://gallium.inria.fr/~fpottier/menhir/"
546 "menhir-" version ".tar.gz"))
549 "1j8nmcj2gq6hyyi16z27amiahplgrnk4ppchpm0v4qy80kwkf47k"))))
550 (build-system gnu-build-system)
554 `(#:parallel-build? #f ; Parallel build causes failure
555 #:tests? #f ; No check target
557 (modify-phases %standard-phases
559 (lambda* (#:key outputs #:allow-other-keys)
560 (let ((out (assoc-ref outputs "out")))
561 (setenv "PREFIX" out))
563 (home-page "http://gallium.inria.fr/~fpottier/menhir")
564 (synopsis "Parser generator")
565 (description "Menhir is a parser generator. It turns high-level grammar
566 specifications, decorated with semantic actions expressed in the OCaml
567 programming language into parsers, again expressed in OCaml. It is based on
568 Knuth’s LR(1) parser construction technique.")
569 ;; The file src/standard.mly and all files listed in src/mnehirLib.mlpack
570 ;; that have an *.ml or *.mli extension are GPL licensed. All other files
572 (license (list license:gpl2+ license:qpl))))
574 (define-public lablgtk
580 (uri (ocaml-forge-uri name version 1627))
583 "0cyj6sfdvzx8hw7553lhgwc0krlgvlza0ph3dk9gsxy047dm3wib"))))
584 (build-system gnu-build-system)
588 ("findlib" ,ocaml-findlib)
589 ("pkg-config" ,pkg-config)))
590 ;; FIXME: Add inputs gtkgl-2.0, libpanelapplet-2.0, gtkspell-2.0,
591 ;; and gtk+-quartz-2.0 once available.
594 ("gtksourceview" ,gtksourceview-2)
595 ("libgnomecanvas" ,libgnomecanvas)
596 ("libgnomeui" ,libgnomeui)
597 ("libglade" ,libglade)
598 ("librsvg" ,librsvg)))
600 `(#:tests? #f ; no check target
602 ;; opt: also install cmxa files
603 #:make-flags (list "all" "opt"
604 (string-append "FINDLIBDIR="
605 (assoc-ref %outputs "out")
607 ;; Occasionally we would get "Error: Unbound module GtkThread" when
608 ;; compiling 'gtkThInit.ml', with 'make -j'. So build sequentially.
612 (modify-phases %standard-phases
613 (add-before 'install 'prepare-install
614 (lambda* (#:key inputs outputs #:allow-other-keys)
615 (let ((out (assoc-ref outputs "out"))
616 (ocaml (assoc-ref inputs "ocaml")))
617 ;; Install into the output and not the ocaml directory.
618 (mkdir-p (string-append out "/lib/ocaml"))
619 (substitute* "config.make"
622 (home-page "http://lablgtk.forge.ocamlcore.org/")
623 (synopsis "GTK+ bindings for OCaml")
625 "LablGtk is an OCaml interface to GTK+ 1.2 and 2.x. It provides
626 a strongly-typed object-oriented interface that is compatible with the
627 dynamic typing of GTK+. Most widgets and methods are available. LablGtk
628 also provides bindings to
629 gdk-pixbuf, the GLArea widget (in combination with LablGL), gnomecanvas,
630 gnomeui, gtksourceview, gtkspell,
631 libglade (and it an generate OCaml code from .glade files),
632 libpanel, librsvg and quartz.")
633 (license license:lgpl2.1)))
635 (define-public unison
643 (url (string-append "https://webdav.seas.upenn.edu/svn/"
645 (version-major+minor version)))
647 (file-name (string-append name "-" version "-checkout"))
650 "0486s53wyayicj9f2raj2dvwvk4xyzar219rccc1iczdwixm4x05"))
651 (modules '((guix build utils)
657 ;; The svn revision in the release tarball appears to be
658 ;; artificially manipulated in order to set the desired point
659 ;; version number. Because the point version is calculated during
660 ;; the build, we can offset pointVersionOrigin by the desired
661 ;; point version and write that into "Rev: %d". We do this rather
662 ;; than hardcoding the necessary revision number, for
664 (with-atomic-file-replacement "src/mkProjectInfo.ml"
666 (let ((pt-ver (string->number (third (string-split ,version #\.))))
667 (pt-rx (make-regexp "^let pointVersionOrigin = ([0-9]+)"))
668 (rev-rx (make-regexp "Rev: [0-9]+")))
669 (let loop ((pt-origin #f))
670 (let ((line (read-line in 'concat)))
672 ((regexp-exec pt-rx line)
675 (loop (string->number (match:substring m 1)))))
676 ((regexp-exec rev-rx line)
678 (format out "~aRev: ~d~a"
682 (dump-port in out))) ;done
685 (loop pt-origin))))))))
686 ;; Without the '-fix' argument, the html file produced does not
687 ;; have functioning internal hyperlinks.
688 (substitute* "doc/Makefile"
689 (("hevea unison") "hevea -fix unison"))))))
690 (build-system gnu-build-system)
692 "doc")) ; 1.9 MiB of documentation
696 ("ghostscript" ,ghostscript)
701 `(#:parallel-build? #f
703 #:test-target "selftest"
704 #:tests? #f ; Tests require writing to $HOME.
705 ; If some $HOME is provided, they fail with the message
706 ; "Fatal error: Skipping some tests -- remove me!"
708 (modify-phases %standard-phases
710 (add-before 'install 'prepare-install
711 (lambda* (#:key outputs #:allow-other-keys)
712 (let* ((out (assoc-ref outputs "out"))
713 (bin (string-append out "/bin")))
715 (setenv "HOME" out) ; forces correct INSTALLDIR in Makefile
717 (add-after 'install 'install-fsmonitor
718 (lambda* (#:key outputs #:allow-other-keys)
719 (let* ((out (assoc-ref outputs "out"))
720 (bin (string-append out "/bin")))
721 ;; 'unison-fsmonitor' is used in "unison -repeat watch" mode.
722 (install-file "src/unison-fsmonitor" bin))))
723 (add-after 'install 'install-doc
724 (lambda* (#:key outputs #:allow-other-keys)
725 (let ((doc (string-append (assoc-ref outputs "doc")
726 "/share/doc/unison")))
728 ;; This file needs write-permissions, because it's
729 ;; overwritten by 'docs' during documentation generation.
730 (chmod "src/strings.ml" #o600)
731 (and (zero? (system* "make" "docs"
732 "TEXDIRECTIVES=\\\\draftfalse"))
734 (for-each (lambda (f)
735 (install-file f doc))
738 "doc/unison-manual." ext))
739 ;; Install only html documentation,
740 ;; since the build is currently
741 ;; non-reproducible with the ps, pdf,
746 (home-page "https://www.cis.upenn.edu/~bcpierce/unison/")
747 (synopsis "File synchronizer")
749 "Unison is a file-synchronization tool. It allows two replicas of
750 a collection of files and directories to be stored on different hosts
751 (or different disks on the same host), modified separately, and then
752 brought up to date by propagating the changes in each replica
754 (license license:gpl3+)))
756 (define-public ocaml-findlib
758 (name "ocaml-findlib")
762 (uri (string-append "http://download.camlcity.org/download/"
763 "findlib" "-" version ".tar.gz"))
766 "02abg1lsnwvjg3igdyb8qjgr5kv1nbwl4gaf8mdinzfii5p82721"))
767 (patches (search-patches "ocaml-findlib-make-install.patch"))))
768 (build-system gnu-build-system)
774 `(#:tests? #f ; no test suite
776 #:make-flags (list "all" "opt")
777 #:phases (modify-phases %standard-phases
780 (lambda* (#:key inputs outputs #:allow-other-keys)
781 (let ((out (assoc-ref outputs "out")))
784 "-bindir" (string-append out "/bin")
785 "-config" (string-append out "/etc/ocamfind.conf")
786 "-mandir" (string-append out "/share/man")
787 "-sitelib" (string-append out "/lib/ocaml/site-lib")
789 (add-after 'install 'remove-camlp4
790 (lambda* (#:key outputs #:allow-other-keys)
791 (let ((out (assoc-ref outputs "out")))
792 (delete-file-recursively
793 (string-append out "/lib/ocaml/site-lib/camlp4"))))))))
794 (home-page "http://projects.camlcity.org/projects/findlib.html")
795 (synopsis "Management tool for OCaml libraries")
797 "The \"findlib\" library provides a scheme to manage reusable software
798 components (packages), and includes tools that support this scheme. Packages
799 are collections of OCaml modules for which metainformation can be stored. The
800 packages are kept in the file system hierarchy, but with strict directory
801 structure. The library contains functions to look the directory up that
802 stores a package, to query metainformation about a package, and to retrieve
803 dependency information about multiple packages. There is also a tool that
804 allows the user to enter queries on the command-line. In order to simplify
805 compilation and linkage, there are new frontends of the various OCaml
806 compilers that can directly deal with packages.")
807 (license license:x11)))
809 ;; note that some tests may hang for no obvious reason.
810 (define-public ocaml-ounit
816 (uri (ocaml-forge-uri "ounit" version 1258))
819 "118xsadrx84pif9vaq13hv4yh22w9kmr0ypvhrs0viir1jr0ajjd"))))
820 (build-system ocaml-build-system)
822 `(("libxml2" ,libxml2))) ; for xmllint
825 (modify-phases %standard-phases
826 ;; Tests are done during build.
828 (home-page "http://ounit.forge.ocamlcore.org")
829 (synopsis "Unit testing framework for OCaml")
830 (description "Unit testing framework for OCaml. It is similar to JUnit and
831 other XUnit testing frameworks.")
832 (license license:expat)))
834 (define-public camlzip
840 (uri (ocaml-forge-uri name version 1616))
843 "0m6gyjw46w3qnhxfsyqyag42znl5lwargks7w7rfchr9jzwpff68"))))
844 (build-system ocaml-build-system)
849 (modify-phases %standard-phases
851 (add-after 'install 'install-camlzip
852 (lambda* (#:key outputs #:allow-other-keys)
853 (let* ((out (assoc-ref outputs "out"))
854 (dir (string-append out "/lib/ocaml/site-lib/camlzip")))
856 (call-with-output-file (string-append dir "/META")
858 (format port "version=\"1.06\"\n")
859 (format port "requires=\"unix\"\n")
860 (format port "archive(byte)=\"zip.cma\"\n")
861 (format port "archive(native)=\"zip.cmxa\"\n")
862 (format port "archive(native,plugin)=\"zip.cmxs\"\n")
863 (format port "directory=\"../zip\"\n")))))))
864 #:install-target "install-findlib"
867 (string-append "INSTALLDIR=" (assoc-ref %outputs "out")
869 (home-page "http://forge.ocamlcore.org/projects/camlzip")
870 (synopsis "Provides easy access to compressed files")
871 (description "Provides easy access to compressed files in ZIP, GZIP and
872 JAR format. It provides functions for reading from and writing to compressed
873 files in these formats.")
874 (license license:lgpl2.1+)))
876 (define-public ocamlmod
882 (uri (ocaml-forge-uri name version 1544))
885 "1w0w8lfyymvk300dv13gvhrddpcyknvyp4g2yvq2vaw7khkhjs9g"))))
886 (build-system ocaml-build-system)
888 `(("ounit" ,ocaml-ounit)))
891 (modify-phases %standard-phases
892 ;; Tests are done during build.
894 (home-page "https://forge.ocamlcore.org/projects/ocamlmod")
895 (synopsis "Generate modules from OCaml source files")
896 (description "Generate modules from OCaml source files.")
897 (license license:lgpl2.1+))) ; with an exception
899 (define-public ocaml-zarith
901 (name "ocaml-zarith")
905 (uri (ocaml-forge-uri "zarith" version 1574))
908 "0l36hzmfbvdai2kcgynh13vfdim5x2grnaw61fxqalyjm90c3di3"))))
909 (build-system ocaml-build-system)
915 `(#:tests? #f ; no test target
917 (modify-phases %standard-phases
919 (lambda* (#:key #:allow-other-keys)
920 (zero? (system* "./configure")))))))
921 (home-page "https://forge.ocamlcore.org/projects/zarith/")
922 (synopsis "Implements arbitrary-precision integers")
923 (description "Implements arithmetic and logical operations over
924 arbitrary-precision integers. It uses GMP to efficiently implement arithmetic
925 over big integers. Small integers are represented as Caml unboxed integers,
926 for speed and space economy.")
927 (license license:lgpl2.1+))) ; with an exception
929 (define-public ocaml-frontc
931 (name "ocaml-frontc")
935 (uri (string-append "https://www.irit.fr/recherches/ARCHI/MARCH/"
936 "frontc/Frontc-" version ".tgz"))
939 "16dz153s92dgbw1rrfwbhscy73did87kfmjwyh3qpvs748h1sc4g"))))
940 (build-system ocaml-build-system)
943 (modify-phases %standard-phases
945 (add-after 'install 'install-meta
946 (lambda* (#:key outputs #:allow-other-keys)
947 (let ((out (assoc-ref outputs "out")))
949 (string-append out "/lib/ocaml/frontc/META")
953 "description = \"Parser for the C language\"
954 version = \"" ,version "\"
956 archive(byte) = \"frontc.cma\"
957 archive(native) = \"frontc.cmxa\""))))
958 (symlink (string-append out "/lib/ocaml/frontc")
959 (string-append out "/lib/ocaml/FrontC"))))))
960 #:make-flags (list (string-append "PREFIX="
961 (assoc-ref %outputs "out"))
962 "OCAML_SITE=$(LIB_DIR)/ocaml/")))
963 (home-page "https://www.irit.fr/FrontC")
964 (synopsis "C parser and lexer library")
965 (description "FrontC is an OCAML library providing a C parser and lexer.
966 The result is a syntactic tree easy to process with usual OCAML tree management.
967 It provides support for ANSI C syntax, old-C K&R style syntax and the standard
968 GNU CC attributes. It provides also a C pretty printer as an example of use.")
969 (license license:lgpl2.1)))
971 (define-public ocaml-qtest
977 (uri (string-append "https://github.com/vincent-hugot/iTeML/"
978 "archive/v" version ".tar.gz"))
981 "1n7x5l6h4j44f75wzgzjsjkq349i4gj707w1hr7fx84igxxfr6vl"))))
982 (build-system ocaml-build-system)
984 `(("findlib" ,ocaml-findlib)))
986 `(("ounit" ,ocaml-ounit)))
988 `(#:tests? #f ; No test target.
990 (list (string-append "BIN=" (assoc-ref %outputs "out") "/bin"))
992 (modify-phases %standard-phases
993 (delete 'configure))))
994 (home-page "https://github.com/vincent-hugot/iTeML")
995 (synopsis "Inline (Unit) Tests for OCaml")
996 (description "Qtest extracts inline unit tests written using a special
997 syntax in comments. Those tests are then run using the oUnit framework and the
998 qcheck library. The possibilities range from trivial tests -- extremely simple
999 to use -- to sophisticated random generation of test cases.")
1000 (license license:lgpl3+)))
1002 (define-public ocaml-stringext
1004 (name "ocaml-stringext")
1008 (uri (string-append "https://github.com/rgrinberg/stringext"
1009 "/archive/v" version ".tar.gz"))
1012 "19g6lfn03iki9f8h91hi0yiqn0b3wkxyq08b3y23wgv6jw6mssfh"))))
1013 (build-system ocaml-build-system)
1015 `(("qtest" ,ocaml-qtest)))
1016 (home-page "https://github.com/rgrinberg/stringext")
1017 (synopsis "Extra string functions for OCaml")
1018 (description "Provides a single module named Stringext that provides a grab
1019 bag of often used but missing string functions from the stdlib. E.g, split,
1020 full_split, cut, rcut, etc..")
1021 ;; the only mention of a license in this project is in its `opam' file
1022 ;; where it says `mit'.
1023 (license license:expat)))
1026 (define-public ocaml-bisect
1028 (name "ocaml-bisect")
1032 (uri (ocaml-forge-uri "bisect" version 1051))
1035 "0kcg2rh0qlkfpbv3nhcb75n62b04gbrz0zasq15ynln91zd5qrg0"))
1038 "ocaml-bisect-fix-camlp4-in-another-directory.patch"))))
1039 (build-system ocaml-build-system)
1041 `(("camlp4" ,camlp4)
1042 ("libxml2" ,libxml2)
1045 `(("camlp4" ,camlp4)))
1047 `(#:test-target "tests"
1049 (list "all" (string-append "CAMLP4_LIBDIR="
1050 (assoc-ref %build-inputs "camlp4")
1051 "/lib/ocaml/site-lib/camlp4"))
1053 (modify-phases %standard-phases
1055 (lambda* (#:key outputs #:allow-other-keys)
1056 (zero? (system* "./configure" "-prefix"
1057 (assoc-ref outputs "out"))))))))
1058 (home-page "http://bisect.x9c.fr")
1059 (synopsis "Code coverage tool for the OCaml language")
1060 (description "Bisect is a code coverage tool for the OCaml language. It is
1061 a camlp4-based tool that allows to instrument your application before running
1062 tests. After application execution, it is possible to generate a report in HTML
1063 format that is the replica of the application source code annotated with code
1064 coverage information.")
1065 (license license:gpl3+)))
1067 (define-public ocaml-bitstring
1069 (name "ocaml-bitstring")
1073 (uri (string-append "https://github.com/xguerin/bitstring"
1074 "/archive/v" version ".tar.gz"))
1077 "0miw4banfpmx4kxrckpqr57b1fcmsqdmspyjx6gqjd4kghm4l7xj"))
1078 (patches (search-patches "ocaml-bitstring-fix-configure.patch"))))
1079 (build-system ocaml-build-system)
1081 `(("camlp4" ,camlp4)
1083 ("autoconf" ,autoconf)
1084 ("automake" ,automake)
1085 ("bisect" ,ocaml-bisect)))
1087 `(("camlp4" ,camlp4)))
1090 (list "CAMLP4OF=camlp4of" "--enable-coverage")
1092 (list (string-append "BISECTLIB="
1093 (assoc-ref %build-inputs "bisect")
1094 "/lib/ocaml/site-lib")
1095 (string-append "OCAMLCFLAGS=-g -I "
1096 (assoc-ref %build-inputs "camlp4")
1097 "/lib/ocaml/site-lib/camlp4 -I "
1098 "$(BISECTLIB)/bisect")
1099 (string-append "OCAMLOPTFLAGS=-g -I "
1100 (assoc-ref %build-inputs "camlp4")
1101 "/lib/ocaml/site-lib/camlp4 -I "
1102 "$(BISECTLIB)/bisect"))
1104 (modify-phases %standard-phases
1105 (add-before 'configure 'fix-configure
1106 (lambda* (#:key inputs #:allow-other-keys)
1107 (substitute* "Makefile.in"
1108 (("@abs_top_builddir@")
1109 (string-append "@abs_top_builddir@:" (getenv "LIBRARY_PATH"))))
1110 (substitute* "configure"
1111 (("-/bin/sh") (string-append "-" (assoc-ref inputs "bash")
1113 (add-after 'install 'link-lib
1114 (lambda* (#:key outputs #:allow-other-keys)
1115 (let* ((out (assoc-ref outputs "out"))
1116 (stubs (string-append out
1117 "/lib/ocaml/site-lib/stubslibs"))
1118 (lib (string-append out
1119 "/lib/ocaml/site-lib/bitstring")))
1121 (symlink (string-append lib "/dllbitstring.so")
1122 (string-append stubs "/dllbitstring.so"))))))))
1123 (home-page "https://github.com/xguerin/bitstring")
1124 (synopsis "Bitstrings and bitstring matching for OCaml")
1125 (description "Adds Erlang-style bitstrings and matching over bitstrings as
1126 a syntax extension and library for OCaml. You can use this module to both parse
1127 and generate binary formats, files and protocols. Bitstring handling is added
1128 as primitives to the language, making it exceptionally simple to use and very
1130 (license license:isc)))
1132 (define-public ocaml-result
1134 (name "ocaml-result")
1138 (uri (string-append "https://github.com/janestreet/result"
1139 "/archive/" version ".tar.gz"))
1142 "1pgpfsgvhxnh0i37fkvp9j8nadns9hz9iqgabj4dr519j2gr1xvw"))))
1143 (build-system ocaml-build-system)
1147 (modify-phases %standard-phases
1148 (delete 'configure))))
1149 (home-page "https://github.com/janestreet/result")
1150 (synopsis "Compatibility Result module")
1151 (description "Uses the new result type defined in OCaml >= 4.03 while
1152 staying compatible with older version of OCaml should use the Result module
1153 defined in this library.")
1154 (license license:bsd-3)))
1156 (define-public ocaml-topkg
1158 (name "ocaml-topkg")
1162 (uri (string-append "http://erratique.ch/software/topkg/releases/"
1163 "topkg-" version ".tbz"))
1166 "18rrh6fmf708z7dd30amljmcgaypj3kk49jrmrj68r4wnw8004j8"))))
1167 (build-system ocaml-build-system)
1171 `(("result" ,ocaml-result)))
1174 #:build-flags '("build")
1176 (modify-phases %standard-phases
1177 (delete 'configure))))
1178 (home-page "http://erratique.ch/software/topkg")
1179 (synopsis "Transitory OCaml software packager")
1180 (description "Topkg is a packager for distributing OCaml software. It
1181 provides an API to describe the files a package installs in a given build
1182 configuration and to specify information about the package's distribution,
1183 creation and publication procedures.")
1184 (license license:isc)))
1186 (define-public ocaml-rresult
1188 (name "ocaml-rresult")
1192 (uri (string-append "http://erratique.ch/software/rresult/releases/"
1193 "rresult-" version ".tbz"))
1196 "1xxycxhdhaq8p9vhwi93s2mlxjwgm44fcxybx5vghzgbankz9yhm"))))
1197 (build-system ocaml-build-system)
1201 `(("topkg" ,ocaml-topkg)))
1204 #:build-flags '("build")
1206 (modify-phases %standard-phases
1207 (delete 'configure))))
1208 (home-page "http://erratique.ch/software/rresult")
1209 (synopsis "Result value combinators for OCaml")
1210 (description "Handle computation results and errors in an explicit and
1211 declarative manner, without resorting to exceptions. It defines combinators
1212 to operate on the result type available from OCaml 4.03 in the standard
1214 (license license:isc)))
1216 (define-public ocaml-mtime
1218 (name "ocaml-mtime")
1222 (uri (string-append "http://erratique.ch/software/mtime/releases/"
1223 "mtime-" version ".tbz"))
1226 "1hfx4ny2dkw6jf3jppz0640dafl5xgn8r2si9kpwzhmibal8qrah"))))
1227 (build-system ocaml-build-system)
1231 `(("topkg" ,ocaml-topkg)))
1235 '("native=true" "native-dynlink=true" "jsoo=false")
1237 (modify-phases %standard-phases
1238 (delete 'configure))))
1239 (home-page "http://erratique.ch/software/mtime")
1240 (synopsis "Monotonic wall-clock time for OCaml")
1241 (description "Access monotonic wall-clock time. It allows to measure time
1242 spans without being subject to operating system calendar time adjustments.")
1243 (license license:isc)))
1245 (define-public ocaml-cmdliner
1247 (name "ocaml-cmdliner")
1251 (uri (string-append "http://erratique.ch/software/cmdliner/releases/"
1252 "cmdliner-" version ".tbz"))
1255 "0hdxlkgiwjml9dpaa80282a8350if7mc1m6yz2mrd7gci3fszykx"))))
1256 (build-system ocaml-build-system)
1261 #:build-flags '("native=true" "native-dynlink=true")
1263 (modify-phases %standard-phases
1264 (delete 'configure))))
1265 (home-page "http://erratique.ch/software/cmdliner")
1266 (synopsis "Declarative definition of command line interfaces for OCaml")
1267 (description "Cmdliner is a module for the declarative definition of command
1268 line interfaces. It provides a simple and compositional mechanism to convert
1269 command line arguments to OCaml values and pass them to your functions. The
1270 module automatically handles syntax errors, help messages and UNIX man page
1271 generation. It supports programs with single or multiple commands and respects
1272 most of the POSIX and GNU conventions.")
1273 (license license:bsd-3)))
1275 (define-public ocaml-fmt
1282 (uri (string-append "http://erratique.ch/software/fmt/releases/fmt-"
1285 "16y7ibndnairb53j8a6qgipyqwjxncn4pl9jiw5bxjfjm59108px"))))
1286 (build-system ocaml-build-system)
1287 (native-inputs `(("opam" ,opam)
1288 ("topkg" ,ocaml-topkg)))
1289 (propagated-inputs `(("result" ,ocaml-result)
1290 ("cmdliner" ,ocaml-cmdliner)))
1291 (arguments `(#:tests? #f
1292 #:build-flags (list "build" "--with-base-unix" "true"
1293 "--with-cmdliner" "true")
1295 (modify-phases %standard-phases
1296 (delete 'configure))))
1297 (home-page "http://erratique.ch/software/fmt")
1298 (synopsis "OCaml Format pretty-printer combinators")
1299 (description "Fmt exposes combinators to devise Format pretty-printing
1301 (license license:isc)))
1303 (define-public ocaml-astring
1305 (name "ocaml-astring")
1310 (uri (string-append "http://erratique.ch/software/astring/releases/astring-"
1313 "0ixjwc3plrljvj24za3l9gy0w30lsbggp8yh02lwrzw61ls4cri0"))))
1314 (build-system ocaml-build-system)
1315 (native-inputs `(("opam" ,opam)
1316 ("topkg" ,ocaml-topkg)))
1317 (arguments `(#:tests? #f
1318 #:build-flags (list "build")
1320 (modify-phases %standard-phases
1321 (delete 'configure))))
1322 (home-page "http://erratique.ch/software/astring")
1323 (synopsis "Alternative String module for OCaml")
1324 (description "Astring exposes an alternative String module for OCaml. This
1325 module balances minimality and expressiveness for basic, index-free, string
1326 processing and provides types and functions for substrings, string sets and
1327 string maps. The String module exposed by Astring has exception safe functions,
1328 removes deprecated and rarely used functions, alters some signatures and names,
1329 adds a few missing functions and fully exploits OCaml's newfound string
1331 (license license:isc)))
1333 (define-public ocaml-alcotest
1335 (name "ocaml-alcotest")
1339 (uri (string-append "https://github.com/mirage/alcotest/releases/"
1340 "download/" version "/alcotest-" version ".tbz"))
1343 "0g5lzk0gpfx4q8hyhr460gr4lab5wakfxsmhfwvb3yinxwzs95gc"))))
1344 (build-system ocaml-build-system)
1345 (arguments `(#:tests? #f
1346 #:build-flags (list "build")
1348 (modify-phases %standard-phases
1349 (delete 'configure))))
1350 (native-inputs `(("opam" ,opam)
1351 ("topkg" ,ocaml-topkg)))
1352 (propagated-inputs `(("fmt" ,ocaml-fmt)
1353 ("astring" ,ocaml-astring)))
1354 (home-page "https://github.com/mirage/alcotest")
1355 (synopsis "Lightweight OCaml test framework")
1356 (description "Alcotest exposes simple interface to perform unit tests. It
1357 exposes a simple TESTABLE module type, a check function to assert test
1358 predicates and a run function to perform a list of unit -> unit test callbacks.
1359 Alcotest provides a quiet and colorful output where only faulty runs are fully
1360 displayed at the end of the run (with the full logs ready to inspect), with a
1361 simple (yet expressive) query language to select the tests to run.")
1362 (license license:isc)))
1364 (define-public ocaml-ppx-tools
1366 (name "ocaml-ppx-tools")
1367 (version "5.0+4.02.0")
1371 (uri (string-append "https://github.com/alainfrisch/ppx_tools/archive/"
1374 "0rjg4rngi8k9873z4zq95zn9hj8qyw1vcrf11y15aqasfpqq16rc"))))
1375 (build-system ocaml-build-system)
1376 (arguments `(#:phases (modify-phases %standard-phases (delete 'configure))
1378 (home-page "https://github.com/alainfrisch/ppx_tools")
1379 (synopsis "Tools for authors of ppx rewriters and other syntactic tools")
1380 (description "Tools for authors of ppx rewriters and other syntactic tools.")
1381 (license license:expat)))
1383 (define-public ocaml-react
1385 (name "ocaml-react")
1390 (uri (string-append "http://erratique.ch/software/react/releases/react-"
1393 "0knhgbngphv5sp1yskfd97crf169qhpc0igr6w7vqw0q36lswyl8"))))
1394 (build-system ocaml-build-system)
1395 (native-inputs `(("opam" ,opam)))
1396 (arguments `(#:tests? #f
1397 #:build-flags (list "native=true" "native-dynlink=true")
1399 (modify-phases %standard-phases
1400 (delete 'configure))))
1401 (home-page "http://erratique.ch/software/react")
1402 (synopsis "Declarative events and signals for OCaml")
1403 (description "React is an OCaml module for functional reactive programming
1404 (FRP). It provides support to program with time varying values: declarative
1405 events and signals. React doesn't define any primitive event or signal, it
1406 lets the client choose the concrete timeline.")
1407 (license license:bsd-3)))
1409 (define-public ocaml-ssl
1416 (uri (string-append "https://github.com/savonet/ocaml-ssl/archive/"
1419 "1ds5gzyzpcgwn7h40dmjkll7g990cr82ay05b2a7nrclvv6fdpg8"))))
1420 (build-system ocaml-build-system)
1421 (arguments `(#:tests? #f
1422 #:make-flags (list "OCAMLFIND_LDCONF=ignore")
1424 (modify-phases %standard-phases
1425 (add-before 'configure 'bootstrap
1426 (lambda* (#:key #:allow-other-keys)
1427 (system* "./bootstrap")
1428 (substitute* "src/OCamlMakefile"
1429 (("/bin/sh") (which "bash")))
1430 (substitute* "configure"
1431 (("/bin/sh") (which "bash"))))))))
1432 (native-inputs `(("autoconf" ,autoconf)
1433 ("automake" ,automake)
1435 (propagated-inputs `(("openssl" ,openssl)))
1436 (home-page "https://github.com/savonet/ocaml-ssl/")
1437 (synopsis "OCaml bindings for OpenSSL")
1438 (description "OCaml bindings for OpenSSL.")
1439 (license license:lgpl2.1)))
1441 (define-public ocaml-lwt
1448 (uri (string-append "https://github.com/ocsigen/lwt/archive/" version
1451 "1gbw0g8a5a4b16diqrmlhc8ilnikrm4w3jjm1zq310maqg8z0zxz"))))
1452 (build-system ocaml-build-system)
1455 (list "--enable-ssl" "--enable-glib" "--enable-react"
1458 (modify-phases %standard-phases
1459 (add-before 'configure 'disable-some-checks
1460 (lambda* (#:key #:allow-other-keys)
1461 (substitute* "tests/unix/main.ml"
1462 (("Test_mcast.suite;") ""))))
1463 (add-after 'install 'link-stubs
1464 (lambda* (#:key outputs #:allow-other-keys)
1465 (let* ((out (assoc-ref outputs "out"))
1466 (stubs (string-append out "/lib/ocaml/site-lib/stubslibs"))
1467 (lib (string-append out "/lib/ocaml/site-lib/lwt")))
1469 (symlink (string-append lib "/dlllwt-glib_stubs.so")
1470 (string-append stubs "/dlllwt-glib_stubs.so"))
1471 (symlink (string-append lib "/dlllwt-unix_stubs.so")
1472 (string-append stubs "/dlllwt-unix_stubs.so"))))))))
1473 (native-inputs `(("pkg-config" ,pkg-config)
1474 ("ppx-tools" ,ocaml-ppx-tools)))
1475 (inputs `(("libev" ,libev)
1477 (propagated-inputs `(("result" ,ocaml-result)
1478 ("ocaml-ssl" ,ocaml-ssl)
1479 ("ocaml-react" ,ocaml-react)))
1480 (home-page "https://github.com/ocsigen/lwt")
1481 (synopsis "Cooperative threads and I/O in monadic style")
1482 (description "Lwt provides typed, composable cooperative threads. These
1483 make it easy to run normally-blocking I/O operations concurrently in a single
1484 process. Also, in many cases, Lwt threads can interact without the need for
1485 locks or other synchronization primitives.")
1486 (license license:lgpl2.1)))
1488 (define-public ocaml-logs
1494 (uri (string-append "http://erratique.ch/software/logs/releases/"
1495 "logs-" version ".tbz"))
1498 "1khbn7jqpid83zn8rvyh1x1sirls7zc878zj4fz985m5xlsfy853"))))
1499 (build-system ocaml-build-system)
1500 (arguments `(#:tests? #f
1501 #:build-flags (list "build" "--with-js_of_ocaml" "false")
1503 (modify-phases %standard-phases
1504 (delete 'configure))))
1505 (native-inputs `(("opam" ,opam)))
1506 (propagated-inputs `(("fmt" ,ocaml-fmt)
1508 ("mtime" ,ocaml-mtime)
1509 ("result" ,ocaml-result)
1510 ("cmdliner" ,ocaml-cmdliner)
1511 ("topkg" ,ocaml-topkg)))
1512 (home-page "http://erratique.ch/software/logs")
1513 (synopsis "Logging infrastructure for OCaml")
1514 (description "Logs provides a logging infrastructure for OCaml. Logging is
1515 performed on sources whose reporting level can be set independently. Log
1516 message report is decoupled from logging and is handled by a reporter.")
1517 (license license:isc)))
1519 (define-public ocaml-fpath
1521 (name "ocaml-fpath")
1525 (uri (string-append "http://erratique.ch/software/fpath/releases/"
1526 "fpath-" version ".tbz"))
1529 "05134ij27xjl6gaqsc65yl19vfj6cjxq3mbm9bf4mija8grdpn6g"))))
1530 (build-system ocaml-build-system)
1531 (arguments `(#:tests? #f
1532 #:build-flags (list "build")
1534 (modify-phases %standard-phases
1535 (delete 'configure))))
1536 (native-inputs `(("opam" ,opam)))
1537 (propagated-inputs `(("topkg" ,ocaml-topkg)
1538 ("astring" ,ocaml-astring)))
1539 (home-page "http://erratique.ch/software/fpath")
1540 (synopsis "File system paths for OCaml")
1541 (description "Fpath is an OCaml module for handling file system paths with
1542 POSIX or Windows conventions. Fpath processes paths without accessing the
1543 file system and is independent from any system library.")
1544 (license license:isc)))
1546 (define-public ocaml-bos
1552 (uri (string-append "http://erratique.ch/software/bos/releases/"
1553 "bos-" version ".tbz"))
1556 "1ly66lysk4w6mdy4k1n3ynlpfpq7lw4wshcpzgx58v6x613w5s7q"))))
1557 (build-system ocaml-build-system)
1558 (arguments `(#:tests? #f
1559 #:build-flags (list "build")
1561 (modify-phases %standard-phases
1562 (delete 'configure))))
1563 (native-inputs `(("opam" ,opam)))
1564 (propagated-inputs `(("topkg" ,ocaml-topkg)
1565 ("astring" ,ocaml-astring)
1567 ("fpath" ,ocaml-fpath)
1568 ("logs" ,ocaml-logs)
1569 ("rresult" ,ocaml-rresult)))
1570 (home-page "http://erratique.ch/software/bos")
1571 (synopsis "Basic OS interaction for OCaml")
1572 (description "Bos provides support for basic and robust interaction with
1573 the operating system in OCaml. It has functions to access the process
1574 environment, parse command line arguments, interact with the file system and
1575 run command line programs.")
1576 (license license:isc)))
1578 (define-public ocaml-xmlm
1584 (uri (string-append "http://erratique.ch/software/xmlm/releases/"
1585 "xmlm-" version ".tbz"))
1588 "1jywcrwn5z3gkgvicr004cxmdaqfmq8wh72f81jqz56iyn5024nh"))))
1589 (build-system ocaml-build-system)
1590 (arguments `(#:tests? #f
1592 (modify-phases %standard-phases
1595 (lambda* (#:key #:allow-other-keys)
1596 (zero? (system* "pkg/build" "true")))))))
1597 (native-inputs `(("opam" ,opam)))
1598 (home-page "http://erratique.ch/software/xmlm")
1599 (synopsis "Streaming XML codec for OCaml")
1600 (description "Xmlm is a streaming codec to decode and encode the XML data
1601 format. It can process XML documents without a complete in-memory
1602 representation of the data.")
1603 (license license:isc)))
1605 (define-public ocaml-ulex
1611 (uri (string-append "http://www.cduce.org/download/ulex-"
1615 "0fjlkwps14adfgxdrbb4yg65fhyimplvjjs1xqj5np197cig67x0"))))
1616 (build-system ocaml-build-system)
1617 (arguments `(#:phases (modify-phases %standard-phases (delete 'configure))
1621 (string-append "OCAMLBUILD=ocamlbuild -byte-plugin "
1623 (assoc-ref %build-inputs "camlp4")
1624 "/lib/ocaml/site-lib/camlp4"))))
1625 (native-inputs `(("camlp4" ,camlp4)))
1626 (home-page "http://www.cduce.org/download.html#side")
1627 (synopsis "Lexer generator for Unicode and OCaml")
1628 (description "Lexer generator for Unicode and OCaml.")
1629 (license license:expat)))
1631 (define-public ocaml-uchar
1633 (name "ocaml-uchar")
1638 (uri (string-append "https://github.com/ocaml/uchar/releases/download/v"
1639 version "/uchar-" version ".tbz"))
1641 "0ficw1x7ymbd6m8hqw3w1aycwm1hbwd6bad3c5pspwnzh3qlikhi"))))
1642 (build-system ocaml-build-system)
1643 (arguments `(#:tests? #f
1644 #:build-flags (list "native=true" "native-dynlink=true")
1646 (modify-phases %standard-phases
1647 (delete 'configure))))
1648 (native-inputs `(("opam" ,opam)))
1649 (home-page "https://github.com/ocaml/uchar")
1650 (synopsis "Compatibility library for OCaml's Uchar module")
1651 (description "The uchar package provides a compatibility library for the
1652 `Uchar` module introduced in OCaml 4.03.")
1653 (license license:lgpl2.1)))
1655 (define-public ocaml-uutf
1661 (uri (string-append "http://erratique.ch/software/uutf/releases/"
1662 "uutf-" version ".tbz"))
1665 "08i0cw02cxw4mi2rs01v9xi307qshs6fnd1dlqyb52kcxzblpp37"))))
1666 (build-system ocaml-build-system)
1667 (arguments `(#:tests? #f
1668 #:build-flags (list "build")
1670 (modify-phases %standard-phases
1671 (delete 'configure))))
1672 (native-inputs `(("opam" ,opam)
1673 ("topkg" ,ocaml-topkg)))
1674 (propagated-inputs `(("uchar" ,ocaml-uchar)
1675 ("cmdliner" ,ocaml-cmdliner)))
1676 (home-page "http://erratique.ch/software/uutf")
1677 (synopsis "Non-blocking streaming Unicode codec for OCaml")
1678 (description "Uutf is a non-blocking streaming codec to decode and encode
1679 the UTF-8, UTF-16, UTF-16LE and UTF-16BE encoding schemes. It can efficiently
1680 work character by character without blocking on IO. Decoders perform character
1681 position tracking and support newline normalization.
1683 Functions are also provided to fold over the characters of UTF encoded OCaml
1684 string values and to directly encode characters in OCaml Buffer.t values.")
1685 (license license:isc)))
1687 (define-public ocaml-jsonm
1689 (name "ocaml-jsonm")
1693 (uri (string-append "http://erratique.ch/software/jsonm/releases/"
1694 "jsonm-" version ".tbz"))
1697 "1v3ln6d965lplj28snjdqdqablpp1kx8bw2cfx0m6i157mqyln62"))))
1698 (build-system ocaml-build-system)
1699 (arguments `(#:tests? #f
1700 #:build-flags (list "build")
1702 (modify-phases %standard-phases
1703 (delete 'configure))))
1704 (native-inputs `(("opam" ,opam)
1705 ("topkg" ,ocaml-topkg)))
1706 (propagated-inputs `(("uutf" ,ocaml-uutf)
1707 ("cmdliner" ,ocaml-cmdliner)))
1708 (home-page "http://erratique.ch/software/jsonm")
1709 (synopsis "Non-blocking streaming JSON codec for OCaml")
1710 (description "Jsonm is a non-blocking streaming codec to decode and encode
1711 the JSON data format. It can process JSON text without blocking on IO and
1712 without a complete in-memory representation of the data.")
1713 (license license:isc)))
1715 (define-public ocaml-ocurl
1717 (name "ocaml-ocurl")
1721 (uri (string-append "http://ygrek.org.ua/p/release/ocurl/ocurl-"
1725 "0pm6nm33wi0p9h765k6zb94ljpknryam4qd1hmb2rsk2y0y1181n"))))
1726 (build-system ocaml-build-system)
1727 (arguments `(#:phases
1728 (modify-phases %standard-phases
1729 (add-before 'configure 'fix-/bin/sh
1730 (lambda* (#:key inputs #:allow-other-keys)
1731 (substitute* "configure"
1732 (("-/bin/sh") (string-append "-" (which "bash")))))))))
1733 (native-inputs `(("pkg-config" ,pkg-config)))
1734 (inputs `(("curl" ,curl)))
1735 (home-page "http://ocurl.forge.ocamlcore.org/")
1736 (synopsis "OCaml bindings for libcurl")
1737 (description "Client-side URL transfer library, supporting HTTP and a
1738 multitude of other network protocols (FTP/SMTP/RTSP/etc).")
1739 (license license:isc)))
1741 (define-public ocaml-base64
1743 (name "ocaml-base64")
1747 (uri (string-append "https://github.com/mirage/ocaml-base64/"
1748 "releases/download/v" version "/base64-"
1750 (file-name (string-append name "-" version ".tar.gz"))
1753 "1p45sawchmrkr22gkmydjc4ary23pisp58zsnb7iq7d82nxs1lfq"))))
1754 (build-system ocaml-build-system)
1756 `(#:build-flags (list "build" "--tests" "true")
1758 (modify-phases %standard-phases
1759 (delete 'configure))))
1761 `(("topkg" ,ocaml-topkg)
1763 ("rresult" ,ocaml-rresult)
1765 ("alcotest" ,ocaml-alcotest)))
1766 (home-page "https://github.com/mirage/ocaml-base64")
1767 (synopsis "Base64 encoding for OCaml")
1768 (description "Base64 is a group of similar binary-to-text encoding schemes
1769 that represent binary data in an ASCII string format by translating it into a
1770 radix-64 representation. It is specified in RFC 4648.")
1771 (license license:isc)))
1773 (define-public ocamlify
1779 (uri (ocaml-forge-uri name version 1209))
1782 "1f0fghvlbfryf5h3j4as7vcqrgfjb4c8abl5y0y5h069vs4kp5ii"))))
1783 (build-system ocaml-build-system)
1784 ; tests are done during build
1787 (modify-phases %standard-phases
1789 (home-page "https://forge.ocamlcore.org/projects/ocamlify")
1790 (synopsis "Include files in OCaml code")
1791 (description "OCamlify allows to create OCaml source code by including
1792 whole files into OCaml string or string list. The code generated can be
1793 compiled as a standard OCaml file. It allows embedding external resources as
1795 (license license:lgpl2.1+))); with the OCaml static compilation exception
1797 (define-public omake
1803 (uri (string-append "http://download.camlcity.org/download/"
1804 "omake-" version ".tar.gz"))
1807 "093ansbppms90hiqvzar2a46fj8gm9iwnf8gn38s6piyp70lrbsj"))
1808 (patches (search-patches "omake-fix-non-determinism.patch"))))
1809 (build-system ocaml-build-system)
1812 (list (string-append "PREFIX=" (assoc-ref %outputs "out")))
1813 #:tests? #f ; no test target
1815 (modify-phases %standard-phases
1816 (add-before 'configure 'fix-makefile
1817 (lambda* (#:key outputs #:allow-other-keys)
1818 (substitute* "mk/osconfig_unix.mk"
1819 (("CC = cc") "CC = gcc")))))))
1820 (native-inputs `(("hevea" ,hevea)))
1821 (home-page "http://projects.camlcity.org/projects/omake.html")
1822 (synopsis "Build system designed for scalability and portability")
1823 (description "Similar to make utilities you may have used, but it features
1824 many additional enhancements, including:
1827 @item Support for projects spanning several directories or directory hierarchies.
1828 @item Fast, reliable, automated, scriptable dependency analysis using MD5 digests,
1829 with full support for incremental builds.
1830 @item Dependency analysis takes the command lines into account — whenever the
1831 command line used to build a target changes, the target is considered
1833 @item Fully scriptable, includes a library that providing support for standard
1834 tasks in C, C++, OCaml, and LaTeX projects, or a mixture thereof.
1836 (license (list license:lgpl2.1 ; libmojave
1837 license:expat ; OMake scripts
1838 license:gpl2)))) ; OMake itself, with ocaml linking exception
1841 (define-public ocaml-batteries
1843 (name "ocaml-batteries")
1847 (uri (ocaml-forge-uri "batteries" version 1650))
1850 "1a97w3x2l1jr5x9kj5gqm1x6b0q9fjqdcsvls7arnl3bvzgsia0n"))))
1851 (build-system ocaml-build-system)
1853 `(("qtest" ,ocaml-qtest)
1854 ("bisect" ,ocaml-bisect)
1855 ("ounit" ,ocaml-ounit)))
1858 (modify-phases %standard-phases
1859 (delete 'check) ; tests are run by the build phase
1861 (lambda* (#:key outputs #:allow-other-keys)
1862 (zero? (system* "ocaml" "setup.ml" "-build")))))))
1863 (home-page "http://batteries.forge.ocamlcore.org/")
1864 (synopsis "Development platform for the OCaml programming language")
1865 (description "Define a standard set of libraries which may be expected on
1866 every compliant installation of OCaml and organize these libraries into a
1867 hierarchy of modules.")
1868 (license license:lgpl2.1+)))
1870 (define-public ocaml-pcre
1876 (uri (string-append "https://github.com/mmottl/pcre-ocaml/archive"
1877 "/v" version ".tar.gz"))
1878 (file-name (string-append name "-" version ".tar.gz"))
1881 "0rj6dw79px4sj2kq0iss2nzq3rnsn9wivvc0f44wa1mppr6njfb3"))))
1882 (build-system ocaml-build-system)
1885 (modify-phases %standard-phases
1886 (add-after 'install 'link-lib
1887 (lambda* (#:key outputs #:allow-other-keys)
1888 (let* ((out (assoc-ref outputs "out"))
1889 (stubs (string-append out "/lib/ocaml/site-lib/stubslibs"))
1890 (lib (string-append out "/lib/ocaml/site-lib/pcre")))
1892 (symlink (string-append lib "/dllpcre_stubs.so")
1893 (string-append stubs "/dllpcre_stubs.so"))))))))
1895 `(("batteries" ,ocaml-batteries)
1896 ("pcre:bin" ,pcre "bin")))
1897 (propagated-inputs `(("pcre" ,pcre)))
1898 (home-page "https://mmottl.github.io/pcre-ocaml")
1899 (synopsis "Bindings to the Perl Compatibility Regular Expressions library")
1900 (description "Pcre-ocaml offers library functions for string pattern
1901 matching and substitution, similar to the functionality offered by the Perl
1903 (license license:lgpl2.1+))); with the OCaml link exception
1905 (define-public ocaml-expect
1907 (name "ocaml-expect")
1911 (uri (ocaml-forge-uri name version 1372))
1914 "07xq8w2x2vffc32z7vk6y14jwbfb1cw0m2lm1jzi60hnr1dvg8by"))))
1915 (build-system ocaml-build-system)
1917 `(("ocaml-pcre" ,ocaml-pcre)
1918 ("ounit" ,ocaml-ounit)))
1919 (propagated-inputs `(("batteries" ,ocaml-batteries)))
1920 (home-page "https://forge.ocamlcore.org/projects/ocaml-expect/")
1921 (synopsis "Simple implementation of expect")
1922 (description "Help building unitary testing of interactive program. You
1923 can match the question using a regular expression or a timeout.")
1924 (license license:lgpl2.1+))) ; with the OCaml static compilation exception
1926 (define-public ocaml-fileutils
1928 (name "ocaml-fileutils")
1932 (uri (ocaml-forge-uri name version 1651))
1935 "0g6zx2rcvacklxyli19ixcf6ich9ipxsps4k3jz98f5zlaab0a7g"))))
1936 (build-system ocaml-build-system)
1937 (native-inputs `(("ounit" ,ocaml-ounit)))
1938 (home-page "http://ocaml-fileutils.forge.ocamlcore.org")
1939 (synopsis "Pure OCaml functions to manipulate real file and filename")
1940 (description "Library to provide pure OCaml functions to manipulate real
1941 file (POSIX like) and filename.")
1942 (license license:lgpl2.1+))) ; with the OCaml static compilation exception
1944 (define-public ocaml-oasis
1946 (name "ocaml-oasis")
1950 (uri (ocaml-forge-uri name version 1669))
1953 "1ln7vc7ip6s5xbi20mhnn087xi4a2m5vqawx0703qqnfkzhmslqy"))
1954 (modules '((guix build utils)))
1956 '(substitute* "test/test-main/Test.ml"
1957 ;; most of these tests fail because ld cannot find crti.o, but according
1958 ;; to the log file, the environment variables {LD_,}LIBRARY_PATH
1959 ;; are set correctly whene LD_LIBRARY_PATH is defined beforhand.
1960 (("TestBaseCompat.tests;") "")
1961 (("TestExamples.tests;") "")
1962 (("TestFull.tests;") "")
1963 (("TestPluginDevFiles.tests;") "")
1964 (("TestPluginInternal.tests;") "")
1965 (("TestPluginOCamlbuild.tests;") "")
1966 (("TestPluginOMake.tests;") "")))))
1967 (build-system ocaml-build-system)
1969 `(("ocamlify" ,ocamlify)
1970 ("ocamlmod" ,ocamlmod)
1971 ("ounit" ,ocaml-ounit)
1973 ("ocaml-expect" ,ocaml-expect)
1974 ("ocaml-pcre" ,ocaml-pcre)
1975 ("ocaml-fileutils" ,ocaml-fileutils)
1977 ("texlive" ,texlive)
1978 ("pkg-config" ,pkg-config)))
1979 (home-page "https://oasis.forge.ocamlcore.org")
1980 (synopsis "Integrates a configure, build, install system in OCaml projects")
1981 (description "OASIS is a tool to integrate a configure, build and install
1982 system in your OCaml projects. It helps to create standard entry points in your
1983 build system and allows external tools to analyse your project easily.")
1984 (license license:lgpl2.1+))) ; with ocaml static compilation exception
1986 (define-public ocaml-js-build-tools
1988 (name "ocaml-js-build-tools")
1989 (version "113.33.06")
1990 (source (janestreet-origin "js-build-tools" version
1991 "0r8z4fz8iy5y6hkdlkpwf6rk4qigcr3dzyv35585xgg2ahf12zy6"))
1993 `(("oasis" ,ocaml-oasis)
1995 (build-system ocaml-build-system)
1996 (arguments janestreet-arguments)
1997 (home-page "https://github.com/janestreet/js-build-tools")
1998 (synopsis "Collection of tools to help building Jane Street Packages")
1999 (description "This package contains tools to help building Jane Street
2000 packages, but can be used for other purposes. It contains:
2002 @item an @command{oasis2opam-install} tool to produce a @file{.install} file
2003 from the oasis build log
2004 @item a @code{js_build_tools} ocamlbuild plugin with various goodies.
2006 (license license:asl2.0)))
2008 (define-public ocaml-bin-prot
2010 (name "ocaml-bin-prot")
2011 (version "113.33.03")
2012 (source (janestreet-origin "bin_prot" version
2013 "1ws8c017z8nbj3vw92ndvjk9011f71rmp3llncbv8r5fc76wqv3l"))
2015 `(("js-build-tools" ,ocaml-js-build-tools)
2017 (build-system ocaml-build-system)
2018 (arguments janestreet-arguments)
2019 (home-page "https://github.com/janestreet/bin_prot/")
2020 (synopsis "Binary protocol generator")
2021 (description "This library contains functionality for reading and writing
2022 OCaml-values in a type-safe binary protocol. It is extremely efficient,
2023 typically supporting type-safe marshalling and unmarshalling of even highly
2024 structured values at speeds sufficient to saturate a gigabit connection. The
2025 protocol is also heavily optimized for size, making it ideal for long-term
2026 storage of large amounts of data.")
2027 (license license:asl2.0)))