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, 2018 Efraim Flashner <efraim@flashner.co.il>
9 ;;; Copyright © 2016-2018 Julien Lepiller <julien@lepiller.eu>
10 ;;; Copyright © 2017 Ben Woodcroft <donttrustben@gmail.com>
11 ;;; Copyright © 2017, 2018 Tobias Geerinckx-Rice <me@tobias.gr>
12 ;;; Copyright © 2018 Peter Kreye <kreyepr@gmail.com>
13 ;;; Copyright © 2018, 2019 Gabriel Hondet <gabrielhondet@gmail.com>
14 ;;; Copyright © 2018 Kei Kebreau <kkebreau@posteo.net>
16 ;;; This file is part of GNU Guix.
18 ;;; GNU Guix is free software; you can redistribute it and/or modify it
19 ;;; under the terms of the GNU General Public License as published by
20 ;;; the Free Software Foundation; either version 3 of the License, or (at
21 ;;; your option) any later version.
23 ;;; GNU Guix is distributed in the hope that it will be useful, but
24 ;;; WITHOUT ANY WARRANTY; without even the implied warranty of
25 ;;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
26 ;;; GNU General Public License for more details.
28 ;;; You should have received a copy of the GNU General Public License
29 ;;; along with GNU Guix. If not, see <http://www.gnu.org/licenses/>.
31 (define-module (gnu packages ocaml)
32 #:use-module (gnu packages)
33 #:use-module (gnu packages autotools)
34 #:use-module (gnu packages base)
35 #:use-module (gnu packages bison)
36 #:use-module (gnu packages boost)
37 #:use-module (gnu packages compression)
38 #:use-module (gnu packages curl)
39 #:use-module (gnu packages emacs)
40 #:use-module (gnu packages emacs-xyz)
41 #:use-module (gnu packages flex)
42 #:use-module (gnu packages gcc)
43 #:use-module (gnu packages ghostscript)
44 #:use-module (gnu packages glib)
45 #:use-module (gnu packages gnome)
46 #:use-module (gnu packages gtk)
47 #:use-module (gnu packages libevent)
48 #:use-module (gnu packages libffi)
49 #:use-module (gnu packages llvm)
50 #:use-module (gnu packages m4)
51 #:use-module (gnu packages maths)
52 #:use-module (gnu packages multiprecision)
53 #:use-module (gnu packages ncurses)
54 #:use-module (gnu packages pcre)
55 #:use-module (gnu packages perl)
56 #:use-module (gnu packages pkg-config)
57 #:use-module (gnu packages protobuf)
58 #:use-module (gnu packages python)
59 #:use-module (gnu packages sdl)
60 #:use-module (gnu packages sqlite)
61 #:use-module (gnu packages tex)
62 #:use-module (gnu packages texinfo)
63 #:use-module (gnu packages time)
64 #:use-module (gnu packages tls)
65 #:use-module (gnu packages version-control)
66 #:use-module (gnu packages virtualization)
67 #:use-module (gnu packages web-browsers)
68 #:use-module (gnu packages xml)
69 #:use-module (gnu packages xorg)
70 #:use-module (guix build-system dune)
71 #:use-module (guix build-system emacs)
72 #:use-module (guix build-system gnu)
73 #:use-module (guix build-system ocaml)
74 #:use-module (guix download)
75 #:use-module (guix git-download)
76 #:use-module ((guix licenses) #:prefix license:)
77 #:use-module (guix packages)
78 #:use-module (guix svn-download)
79 #:use-module (guix utils)
80 #:use-module ((srfi srfi-1) #:hide (zip)))
82 ;; A shortcut for files from ocaml forge. Downloaded files are computed from
83 ;; their number, not their name.
84 (define (ocaml-forge-uri name version file-number)
85 (string-append "https://forge.ocamlcore.org/frs/download.php/"
86 (number->string file-number) "/" name "-" version
89 ;; Janestreet packages are found in a similar way and all need the same patch.
90 (define (janestreet-origin name version hash)
91 (origin (method url-fetch)
92 (uri (string-append "https://ocaml.janestreet.com/ocaml-core/"
93 (version-major+minor version) "/files/"
94 name "-" version ".tar.gz"))
95 (sha256 (base32 hash))
96 (modules '((guix build utils)))
98 (let ((pattern (string-append "lib/" name)))
100 ;; install.ml contains an invalid reference to the ppx file and
101 ;; propagates this error to the generated META file. It
102 ;; looks for it in the "lib" directory, but it is installed in
103 ;; "lib/ocaml/site-lib/package". This substitute does not change
104 ;; this file for non ppx packages.
105 (substitute* "install.ml"
106 ((,pattern) (string-append "lib/ocaml/site-lib/" ,name)))
107 ;; The standard Makefile would try to install janestreet modules
108 ;; in OCaml's directory in the store, which is read-only.
109 (substitute* "Makefile"
111 "--libdir $(LIBDIR) --prefix"))
114 ;; They also require almost the same set of arguments
115 (define janestreet-arguments
118 (list (string-append "CONFIGUREFLAGS=--prefix "
119 (assoc-ref %outputs "out")
121 (string-append "LIBDIR="
122 (assoc-ref %outputs "out")
123 "/lib/ocaml/site-lib")
124 ;; for ocaml-bin-prot, otherwise ignored
125 (string-append "OCAML_TOPLEVEL_PATH="
126 (assoc-ref %build-inputs "findlib")
127 "/lib/ocaml/site-lib"))
128 #:phases (modify-phases %standard-phases (delete 'configure))))
130 (define-public ocaml-4.02
137 "http://caml.inria.fr/pub/distrib/ocaml-"
138 (version-major+minor version)
139 "/ocaml-" version ".tar.xz"))
142 "1qwwvy8nzd87hk8rd9sm667nppakiapnx4ypdwcrlnav2dz6kil3"))
145 "ocaml-CVE-2015-8869.patch"
146 "ocaml-Add-a-.file-directive.patch"
147 "ocaml-enable-ocamldoc-reproducibility.patch"))))
148 (build-system gnu-build-system)
150 (list (search-path-specification
151 (variable "OCAMLPATH")
152 (files (list "lib/ocaml" "lib/ocaml/site-lib")))
153 (search-path-specification
154 (variable "CAML_LD_LIBRARY_PATH")
155 (files (list "lib/ocaml/site-lib/stubslibs"
156 "lib/ocaml/site-lib/stublibs")))))
159 ("pkg-config" ,pkg-config)))
162 ;; For libiberty, needed for objdump support.
163 ("gcc:lib" ,(canonical-package gcc) "lib")
164 ("zlib" ,zlib))) ;also needed for objdump support
166 `(#:modules ((guix build gnu-build-system)
170 (modify-phases %standard-phases
171 (add-after 'unpack 'patch-/bin/sh-references
172 (lambda* (#:key inputs #:allow-other-keys)
173 (let* ((sh (string-append (assoc-ref inputs "bash")
175 (quoted-sh (string-append "\"" sh "\"")))
176 (with-fluids ((%default-port-encoding #f))
182 (format (current-error-port) "\
183 patch-/bin/sh-references: ~a: changing `\"/bin/sh\"' to `~a'~%"
186 (find-files "." "\\.ml$"))
189 (lambda* (#:key outputs #:allow-other-keys)
190 (let* ((out (assoc-ref outputs "out"))
191 (mandir (string-append out "/share/man")))
192 ;; Custom configure script doesn't recognize
193 ;; --prefix=<PREFIX> syntax (with equals sign).
194 (zero? (system* "./configure"
196 "--mandir" mandir)))))
199 (zero? (system* "make" "-j" (number->string
200 (parallel-job-count))
203 (add-after 'install 'check
205 (with-directory-excursion "testsuite"
206 (zero? (system* "make" "all")))))
207 (add-before 'check 'prepare-socket-test
209 (format (current-error-port)
210 "Spawning local test web server on port 8080~%")
211 (when (zero? (primitive-fork))
212 (run-server (lambda (request request-body)
213 (values '((content-type . (text/plain)))
215 'http '(#:port 8080)))
216 (let ((file "testsuite/tests/lib-threads/testsocket.ml"))
217 (format (current-error-port)
218 "Patching ~a to use localhost port 8080~%"
221 (("caml.inria.fr") "localhost")
223 (("HTTP1.0") "HTTP/1.0"))
225 (home-page "https://ocaml.org/")
226 (synopsis "The OCaml programming language")
228 "OCaml is a general purpose industrial-strength programming language with
229 an emphasis on expressiveness and safety. Developed for more than 20 years at
230 Inria it benefits from one of the most advanced type systems and supports
231 functional, imperative and object-oriented styles of programming.")
232 ;; The compiler is distributed under qpl1.0 with a change to choice of
233 ;; law: the license is governed by the laws of France. The library is
234 ;; distributed under lgpl2.0.
235 (license (list license:qpl license:lgpl2.0))))
237 (define-public ocaml-4.01
244 "http://caml.inria.fr/pub/distrib/ocaml-"
245 (version-major+minor version)
246 "/ocaml-" version ".tar.xz"))
249 "03d7ida94s1gpr3gadf4jyhmh5rrszd5s4m4z59daaib25rvfyv7"))))
251 (substitute-keyword-arguments (package-arguments ocaml-4.02)
253 `(modify-phases ,phases
256 ;; Specifying '-j' at all causes the build to fail.
257 (zero? (system* "make" "world.opt"))))
258 ,@(if (string=? "aarch64-linux" (%current-system))
259 ;; Custom configure script doesn't recongnize aarch64.
260 '((replace 'configure
261 (lambda* (#:key outputs #:allow-other-keys)
262 (let* ((out (assoc-ref outputs "out"))
263 (mandir (string-append out "/share/man")))
264 (invoke "./configure"
267 "-host" "armv8l-unknown-linux-gnu")))))
271 (with-directory-excursion "testsuite"
276 "TOPDIR=" (getcwd) "/.."))))))))))))
278 (define-public ocaml-4.07
285 "http://caml.inria.fr/pub/distrib/ocaml-"
286 (version-major+minor version)
287 "/ocaml-" version ".tar.xz"))
290 "1f07hgj5k45cylj1q3k5mk8yi02cwzx849b1fwnwia8xlcfqpr6z"))))
292 (substitute-keyword-arguments (package-arguments ocaml-4.02)
294 `(modify-phases ,phases
295 (delete 'prepare-socket-test)
298 (with-directory-excursion "testsuite"
299 (invoke "make" "all"))
302 (define-public ocaml ocaml-4.07)
304 (define-public ocamlbuild
310 (uri (string-append "https://github.com/ocaml/ocamlbuild/archive/"
312 (file-name (string-append name "-" version ".tar.gz"))
315 "1320cfkixs1xlng5av04pa5qjb3ynvi2kl3k1ngqzg5fpi29b0vr"))))
316 (build-system gnu-build-system)
318 `(#:test-target "test"
319 #:tests? #f; tests require findlib
321 (list (string-append "OCAMLBUILD_PREFIX=" (assoc-ref %outputs "out"))
322 (string-append "OCAMLBUILD_BINDIR=" (assoc-ref %outputs "out")
324 (string-append "OCAMLBUILD_LIBDIR=" (assoc-ref %outputs "out")
325 "/lib/ocaml/site-lib")
326 (string-append "OCAMLBUILD_MANDIR=" (assoc-ref %outputs "out")
329 (modify-phases %standard-phases
332 (add-before 'build 'findlib-environment
333 (lambda* (#:key outputs #:allow-other-keys)
334 (let* ((out (assoc-ref outputs "out")))
335 (setenv "OCAMLFIND_DESTDIR" (string-append out "/lib/ocaml/site-lib"))
336 (setenv "OCAMLFIND_LDCONF" "ignore")
340 (home-page "https://github.com/ocaml/ocamlbuild")
341 (synopsis "OCaml build tool")
342 (description "OCamlbuild is a generic build tool, that has built-in rules
343 for building OCaml library and programs.")
344 (license license:lgpl2.1+)))
352 ;; Use the '-full' version, which includes all the dependencies.
354 "https://github.com/ocaml/opam/releases/download/"
355 version "/opam-full-" version ".tar.gz")
356 ;; (string-append "https://github.com/ocaml/opam/archive/"
357 ;; version ".tar.gz")
361 "0z6r9qr4awcdn7wyrl5y5jm34jsjlnzd00py893f1hd0c6vg3xw1"))))
362 (build-system gnu-build-system)
364 '(;; Sometimes, 'make -jX' would fail right after ./configure with
365 ;; "Fatal error: exception End_of_file".
368 ;; For some reason, 'ocp-build' needs $TERM to be set.
369 #:make-flags `("TERM=screen"
370 ,(string-append "SHELL="
371 (assoc-ref %build-inputs "bash")
373 #:test-target "tests"
375 ;; FIXME: There's an obscure test failure:
376 ;; …/_obuild/opam/opam.asm install P1' failed.
379 #:phases (modify-phases %standard-phases
380 (add-before 'build 'pre-build
381 (lambda* (#:key inputs make-flags #:allow-other-keys)
382 (let ((bash (assoc-ref inputs "bash"))
383 (bwrap (string-append (assoc-ref inputs "bubblewrap")
385 (substitute* "src/core/opamSystem.ml"
387 (string-append "\"" bash "/bin/sh\""))
390 ;; Use bwrap from the store directly.
391 (substitute* "src/state/shellscripts/bwrap.sh"
392 (("-v bwrap") (string-append "-v " bwrap))
393 (("exec bwrap") (string-append "exec " bwrap))
394 ;; Mount /gnu and /run/current-system in the
395 ;; isolated environment when building with opam.
396 ;; This is necessary for packages to find external
397 ;; dependencies, such as a C compiler, make, etc...
398 (("^add_mounts ro /usr")
399 "add_mounts ro /gnu /run/current-system /usr"))
400 (substitute* "src/client/opamInitDefaults.ml"
401 (("\"bwrap\"") (string-append "\"" bwrap "\"")))
402 ;; Build dependencies
403 (apply invoke "make" "lib-ext" make-flags)
405 (add-before 'check 'pre-check
407 (setenv "HOME" (getcwd))
408 (invoke "git" "config" "--global" "user.email" "guix@gnu.org")
409 (invoke "git" "config" "--global" "user.name" "Guix")
412 `(("git" ,git) ;for the tests
413 ("python" ,python) ;for the tests
419 ("bubblewrap" ,bubblewrap)))
420 (home-page "http://opam.ocamlpro.com/")
421 (synopsis "Package manager for OCaml")
423 "OPAM is a tool to manage OCaml packages. It supports multiple
424 simultaneous compiler installations, flexible package constraints, and a
425 Git-friendly development workflow.")
427 ;; The 'LICENSE' file waives some requirements compared to LGPLv3.
428 (license license:lgpl3)))
430 (define-public camlp4-4.02
436 (uri (string-append "https://github.com/ocaml/camlp4/archive/"
440 "0icdfzhsbgf89925gc8gl3fm8z2xzszzlib0v9dj5wyzkyv3a342"))
441 (file-name (string-append name "-" version ".tar.gz"))))
442 (build-system gnu-build-system)
443 (native-inputs `(("ocaml" ,ocaml-4.02)
445 (inputs `(("ocaml" ,ocaml-4.02)))
447 '(#:tests? #f ;no documented test target
448 ;; a race-condition will lead byte and native targets to mkdir _build
449 ;; which fails on the second attempt.
451 #:make-flags '("all")
452 #:phases (modify-phases %standard-phases
455 (lambda* (#:key outputs #:allow-other-keys)
456 ;; This is a home-made 'configure' script.
457 (let ((out (assoc-ref outputs "out")))
458 (zero? (system* "./configure"
459 (string-append "--libdir=" out
460 "/lib/ocaml/site-lib")
461 (string-append "--bindir=" out "/bin")
462 (string-append "--pkgdir=" out
463 "/lib/ocaml/site-lib"))))))
464 (add-after 'install 'install-meta
465 (lambda* (#:key outputs #:allow-other-keys)
466 (let ((out (assoc-ref outputs "out")))
467 (substitute* "camlp4/META.in"
469 (string-append "directory = \"" out
470 "/lib/ocaml/site-lib/camlp4\"\n")))
471 (zero? (system* "make" "install-META"))))))))
472 (home-page "https://github.com/ocaml/camlp4")
473 (synopsis "Write parsers in OCaml")
475 "Camlp4 is a software system for writing extensible parsers for
476 programming languages. It provides a set of OCaml libraries that are used to
477 define grammars as well as loadable syntax extensions of such grammars.
478 Camlp4 stands for Caml Preprocessor and Pretty-Printer and one of its most
479 important applications is the definition of domain-specific extensions of the
482 ;; This is LGPLv2 with an exception that allows packages statically-linked
483 ;; against the library to be released under any terms.
484 (license license:lgpl2.0)))
486 (define-public camlp4-4.07
488 (inherit camlp4-4.02)
493 (uri (string-append "https://github.com/ocaml/camlp4/archive/"
497 "143hhxv1i6aq413z0i1pynrjcfl2g5gnh5r3863v6h9z0riqknzc"))
498 (file-name (string-append name "-" version ".tar.gz"))))
500 `((ocaml4.02-variant . ,(delay camlp4-4.02))))
502 `(("ocaml" ,ocaml-4.07)
503 ("ocamlbuild" ,ocamlbuild)
506 `(("ocaml" ,ocaml-4.07)))))
508 (define-public camlp4 camlp4-4.07)
510 (define-public camlp5
516 (uri (string-append "https://github.com/camlp5/camlp5/archive/rel"
517 (string-delete #\. version) ".tar.gz"))
518 (file-name (string-append name "-" version ".tar.gz"))
521 "148r6p93xlxi6v7kbsqv8i70r6av04cyn0109pwss5xj6fw97i52"))))
522 (build-system gnu-build-system)
526 `(#:tests? #f ; XXX TODO figure out how to run the tests
528 (modify-phases %standard-phases
530 (lambda* (#:key outputs #:allow-other-keys)
531 (let* ((out (assoc-ref outputs "out"))
532 (mandir (string-append out "/share/man")))
533 ;; Custom configure script doesn't recognize
534 ;; --prefix=<PREFIX> syntax (with equals sign).
535 (invoke "./configure"
537 "--mandir" mandir))))
538 (add-before 'build 'fix-/bin-references
540 (substitute* "config/Makefile"
545 (invoke "make" "-j" (number->string
546 (parallel-job-count))
548 ;; Required for findlib to find camlp5's libraries
549 (add-after 'install 'install-meta
550 (lambda* (#:key outputs #:allow-other-keys)
551 (install-file "etc/META" (string-append (assoc-ref outputs "out")
552 "/lib/ocaml/camlp5/"))
554 (home-page "http://camlp5.gforge.inria.fr/")
555 (synopsis "Pre-processor Pretty Printer for OCaml")
557 "Camlp5 is a Pre-Processor-Pretty-Printer for Objective Caml. It offers
558 tools for syntax (Stream Parsers and Grammars) and the ability to modify the
559 concrete syntax of the language (Quotations, Syntax Extensions).")
560 ;; Most files are distributed under bsd-3, but ocaml_stuff/* is under qpl.
561 (license (list license:bsd-3 license:qpl))))
569 (uri (string-append "http://hevea.inria.fr/old/"
570 name "-" version ".tar.gz"))
573 "1s4yqphfcr1pf5mcj5c84mvmd107k525iiym5jdwsxz0ka0ccmfy"))))
574 (build-system gnu-build-system)
578 `(("ocamlbuild" ,ocamlbuild)))
580 `(#:tests? #f ; no test suite
581 #:make-flags (list (string-append "PREFIX=" %output))
582 #:phases (modify-phases %standard-phases
584 (add-before 'build 'patch-/bin/sh
587 (("/bin/sh") (which "sh")))
589 (home-page "http://hevea.inria.fr/")
590 (synopsis "LaTeX to HTML translator")
592 "HeVeA is a LaTeX to HTML translator that generates modern HTML 5. It is
593 written in Objective Caml.")
594 (license license:qpl)))
596 (define-public ocaml-num
602 (uri (string-append "https://github.com/ocaml/num/archive/v"
604 (file-name (string-append name "-" version ".tar.gz"))
607 "1xlkd0svc0mgq5s7nrm2rjrsvg15i9wxqkc1kvwjp6sv8vv8bb04"))))
608 (build-system ocaml-build-system)
611 (modify-phases %standard-phases
613 (add-before 'build 'fix-makefile
614 (lambda* (#:key outputs #:allow-other-keys)
615 ;; This package supposes we install to the same directory as
616 ;; the ocaml package.
617 (substitute* "src/META"
618 (("\"\\^\"") (string-append "\"" (assoc-ref outputs "out")
619 "/lib/ocaml/site-lib\"")))
620 (substitute* "src/Makefile"
621 (("\\) \\$\\(STDLIBDIR\\)")
622 (string-append ") " (assoc-ref outputs "out")
623 "/lib/ocaml/site-lib")))
625 (add-after 'install 'fix-stubslib
626 (lambda* (#:key outputs #:allow-other-keys)
627 (format #t "~a~%" (find-files "." ".*.so"))
628 (let ((stubdir (string-append (assoc-ref outputs "out")
629 "/lib/ocaml/site-lib")))
631 (install-file "src/dllnums.so" stubdir))
633 (home-page "https://github.com/ocaml/num")
634 (synopsis "Arbitrary-precision integer and rational arithmetic")
635 (description "OCaml-Num contains the legacy Num library for
636 arbitrary-precision integer and rational arithmetic that used to be part of
637 the OCaml core distribution.")
638 (license license:lgpl2.1+))); with linking exception
640 (define-public emacs-tuareg
642 (name "emacs-tuareg")
646 (uri (string-append "https://github.com/ocaml/tuareg/archive/"
648 (file-name (string-append name "-" version ".tar.gz"))
651 "1ynpfc170f9jqx49biji9npfkvfpflbm29xf24wc7fnxxayr49ig"))))
652 (build-system gnu-build-system)
653 (native-inputs `(("emacs" ,emacs-minimal)
657 (modify-phases %standard-phases
659 (add-before 'install 'fix-install-path
660 (lambda* (#:key outputs #:allow-other-keys)
661 (substitute* "Makefile"
662 (("/emacs/site-lisp")
663 (string-append (assoc-ref %outputs "out")
664 "/share/emacs/site-lisp/")))
666 (add-after 'install 'post-install
667 (lambda* (#:key outputs #:allow-other-keys)
669 (string-append (assoc-ref outputs "out")
670 "/share/emacs/site-lisp/"
671 "tuareg-autoloads.el"))
673 (home-page "https://github.com/ocaml/tuareg")
674 (synopsis "OCaml programming mode, REPL, debugger for Emacs")
675 (description "Tuareg helps editing OCaml code, to highlight important
676 parts of the code, to run an OCaml REPL, and to run the OCaml debugger within
678 (license license:gpl2+)))
680 (define-public ocaml-menhir
682 (name "ocaml-menhir")
687 "http://gallium.inria.fr/~fpottier/menhir/"
688 "menhir-" version ".tar.gz"))
691 "1j8nmcj2gq6hyyi16z27amiahplgrnk4ppchpm0v4qy80kwkf47k"))))
692 (build-system gnu-build-system)
696 `(("ocamlbuild" ,ocamlbuild)))
698 `(#:parallel-build? #f ; Parallel build causes failure
699 #:tests? #f ; No check target
701 (modify-phases %standard-phases
703 (lambda* (#:key outputs #:allow-other-keys)
704 (let ((out (assoc-ref outputs "out")))
705 (setenv "PREFIX" out))
708 `((ocaml4.02-variant . ,(delay ocaml4.02-menhir))))
709 (home-page "http://gallium.inria.fr/~fpottier/menhir")
710 (synopsis "Parser generator")
711 (description "Menhir is a parser generator. It turns high-level grammar
712 specifications, decorated with semantic actions expressed in the OCaml
713 programming language into parsers, again expressed in OCaml. It is based on
714 Knuth’s LR(1) parser construction technique.")
715 ;; The file src/standard.mly and all files listed in src/mnehirLib.mlpack
716 ;; that have an *.ml or *.mli extension are GPL licensed. All other files
718 (license (list license:gpl2+ license:qpl))))
720 (define-public ocaml4.02-menhir
722 (inherit ocaml-menhir)
723 (name "ocaml4.02-menhir")
724 (inputs `(("ocaml" ,ocaml-4.02)))
725 (native-inputs '())))
727 (define-public lablgtk
733 (uri (ocaml-forge-uri name version 1726))
736 "1y38fdvswy6hmppm65qvgdk4pb3ghhnvz7n4ialf46340r1s5p2d"))))
737 (build-system gnu-build-system)
739 `((ocaml4.02-variant . ,(delay ocaml4.02-lablgtk))))
743 ("findlib" ,ocaml-findlib)
744 ("pkg-config" ,pkg-config)))
745 ;; FIXME: Add inputs gtkgl-2.0, libpanelapplet-2.0, gtkspell-2.0,
746 ;; and gtk+-quartz-2.0 once available.
749 ("gtksourceview" ,gtksourceview-2)
750 ("libgnomecanvas" ,libgnomecanvas)
751 ("libgnomeui" ,libgnomeui)
752 ("libglade" ,libglade)
753 ("librsvg" ,librsvg)))
755 `(#:tests? #f ; no check target
757 ;; opt: also install cmxa files
758 #:make-flags (list "all" "opt"
759 (string-append "FINDLIBDIR="
760 (assoc-ref %outputs "out")
762 ;; Occasionally we would get "Error: Unbound module GtkThread" when
763 ;; compiling 'gtkThInit.ml', with 'make -j'. So build sequentially.
767 (modify-phases %standard-phases
768 (add-before 'install 'prepare-install
769 (lambda* (#:key inputs outputs #:allow-other-keys)
770 (let ((out (assoc-ref outputs "out"))
771 (ocaml (assoc-ref inputs "ocaml")))
772 ;; Install into the output and not the ocaml directory.
773 (mkdir-p (string-append out "/lib/ocaml"))
774 (substitute* "config.make"
777 (home-page "http://lablgtk.forge.ocamlcore.org/")
778 (synopsis "GTK+ bindings for OCaml")
780 "LablGtk is an OCaml interface to GTK+ 1.2 and 2.x. It provides
781 a strongly-typed object-oriented interface that is compatible with the
782 dynamic typing of GTK+. Most widgets and methods are available. LablGtk
783 also provides bindings to
784 gdk-pixbuf, the GLArea widget (in combination with LablGL), gnomecanvas,
785 gnomeui, gtksourceview, gtkspell,
786 libglade (and it an generate OCaml code from .glade files),
787 libpanel, librsvg and quartz.")
788 (license license:lgpl2.1)))
790 (define-public ocaml4.02-lablgtk
793 (name "ocaml4.02-lablgtk")
797 (uri (ocaml-forge-uri name version 1627))
800 "0cyj6sfdvzx8hw7553lhgwc0krlgvlza0ph3dk9gsxy047dm3wib"))))
802 `(("camlp4" ,camlp4-4.02)
803 ("ocaml" ,ocaml-4.02)
804 ("findlib" ,ocaml4.02-findlib)
805 ("pkg-config" ,pkg-config)))))
807 (define-public unison
815 (url (string-append "https://webdav.seas.upenn.edu/svn/"
817 (version-major+minor version)))
819 (file-name (string-append name "-" version "-checkout"))
822 "0486s53wyayicj9f2raj2dvwvk4xyzar219rccc1iczdwixm4x05"))
823 (modules '((guix build utils)
829 ;; The svn revision in the release tarball appears to be
830 ;; artificially manipulated in order to set the desired point
831 ;; version number. Because the point version is calculated during
832 ;; the build, we can offset pointVersionOrigin by the desired
833 ;; point version and write that into "Rev: %d". We do this rather
834 ;; than hardcoding the necessary revision number, for
836 (with-atomic-file-replacement "src/mkProjectInfo.ml"
838 (let ((pt-ver (string->number (third (string-split ,version #\.))))
839 (pt-rx (make-regexp "^let pointVersionOrigin = ([0-9]+)"))
840 (rev-rx (make-regexp "Rev: [0-9]+")))
841 (let loop ((pt-origin #f))
842 (let ((line (read-line in 'concat)))
844 ((regexp-exec pt-rx line)
847 (loop (string->number (match:substring m 1)))))
848 ((regexp-exec rev-rx line)
850 (format out "~aRev: ~d~a"
854 (dump-port in out))) ;done
857 (loop pt-origin))))))))
858 ;; Without the '-fix' argument, the html file produced does not
859 ;; have functioning internal hyperlinks.
860 (substitute* "doc/Makefile"
861 (("hevea unison") "hevea -fix unison"))
863 (build-system gnu-build-system)
865 "doc")) ; 1.9 MiB of documentation
867 `(("ocaml" ,ocaml-4.02)
869 ("ghostscript" ,ghostscript)
870 ("texlive" ,texlive-tiny)
875 `(#:parallel-build? #f
877 #:test-target "selftest"
878 #:tests? #f ; Tests require writing to $HOME.
879 ; If some $HOME is provided, they fail with the message
880 ; "Fatal error: Skipping some tests -- remove me!"
882 (modify-phases %standard-phases
884 (add-before 'install 'prepare-install
885 (lambda* (#:key outputs #:allow-other-keys)
886 (let* ((out (assoc-ref outputs "out"))
887 (bin (string-append out "/bin")))
889 (setenv "HOME" out) ; forces correct INSTALLDIR in Makefile
891 (add-after 'install 'install-fsmonitor
892 (lambda* (#:key outputs #:allow-other-keys)
893 (let* ((out (assoc-ref outputs "out"))
894 (bin (string-append out "/bin")))
895 ;; 'unison-fsmonitor' is used in "unison -repeat watch" mode.
896 (install-file "src/unison-fsmonitor" bin)
898 (add-after 'install 'install-doc
899 (lambda* (#:key outputs #:allow-other-keys)
900 (let ((doc (string-append (assoc-ref outputs "doc")
901 "/share/doc/unison")))
903 ;; This is a workaround to prevent a build failure. Running
904 ;; make docs somehow allows it to pass, but the generated
905 ;; documentation is not pretty.
908 (invoke "make" "docs"
909 "TEXDIRECTIVES=\\\\draftfalse"))
911 ;; This file needs write-permissions, because it's
912 ;; overwritten by 'docs' during documentation generation.
913 (chmod "src/strings.ml" #o600)
914 (invoke "make" "docs"
915 "TEXDIRECTIVES=\\\\draftfalse")
916 (for-each (lambda (f)
917 (install-file f doc))
919 (string-append "doc/unison-manual." ext))
920 ;; Install only html documentation,
921 ;; since the build is currently
922 ;; non-reproducible with the ps, pdf,
924 '(;; "ps" "pdf" "dvi"
927 (home-page "https://www.cis.upenn.edu/~bcpierce/unison/")
928 (synopsis "File synchronizer")
930 "Unison is a file-synchronization tool. It allows two replicas of
931 a collection of files and directories to be stored on different hosts
932 (or different disks on the same host), modified separately, and then
933 brought up to date by propagating the changes in each replica
935 (license license:gpl3+)))
937 (define-public ocaml-findlib
939 (name "ocaml-findlib")
943 (uri (string-append "http://download.camlcity.org/download/"
944 "findlib" "-" version ".tar.gz"))
947 "1b97zqjdriqd2ikgh4rmqajgxwdwn013riji5j53y3xvcmnpsyrb"))))
948 (build-system gnu-build-system)
954 `(#:tests? #f ; no test suite
956 #:make-flags (list "all" "opt")
957 #:phases (modify-phases %standard-phases
960 (lambda* (#:key inputs outputs #:allow-other-keys)
961 (let ((out (assoc-ref outputs "out")))
964 "-bindir" (string-append out "/bin")
965 "-config" (string-append out "/etc/ocamfind.conf")
966 "-mandir" (string-append out "/share/man")
967 "-sitelib" (string-append out "/lib/ocaml/site-lib")
970 (lambda* (#:key outputs #:allow-other-keys)
971 (let ((out (assoc-ref outputs "out")))
972 (invoke "make" "install"
973 (string-append "OCAML_CORE_STDLIB="
974 out "/lib/ocaml/site-lib")))))
975 (add-after 'install 'remove-camlp4
976 (lambda* (#:key outputs #:allow-other-keys)
977 (let ((out (assoc-ref outputs "out")))
978 (delete-file-recursively
979 (string-append out "/lib/ocaml/site-lib/camlp4"))
981 (home-page "http://projects.camlcity.org/projects/findlib.html")
982 (synopsis "Management tool for OCaml libraries")
984 "The \"findlib\" library provides a scheme to manage reusable software
985 components (packages), and includes tools that support this scheme. Packages
986 are collections of OCaml modules for which metainformation can be stored. The
987 packages are kept in the file system hierarchy, but with strict directory
988 structure. The library contains functions to look the directory up that
989 stores a package, to query metainformation about a package, and to retrieve
990 dependency information about multiple packages. There is also a tool that
991 allows the user to enter queries on the command-line. In order to simplify
992 compilation and linkage, there are new frontends of the various OCaml
993 compilers that can directly deal with packages.")
994 (license license:x11)))
996 (define-public ocaml4.02-findlib
998 (inherit ocaml-findlib)
999 (name "ocaml4.02-findlib")
1001 `(("camlp4" ,camlp4-4.02)
1003 ("ocaml" ,ocaml-4.02)))))
1005 (define-public ocaml4.01-findlib
1007 (inherit ocaml-findlib)
1008 (name "ocaml4.01-findlib")
1011 ("ocaml" ,ocaml-4.01)))))
1013 ;; note that some tests may hang for no obvious reason.
1014 (define-public ocaml-ounit
1016 (name "ocaml-ounit")
1020 (uri (ocaml-forge-uri "ounit" version 1749))
1023 "03ifp9hjcxg4m5j190iy373jcn4039d3vy10kmd8p4lfciwzwc1f"))))
1024 (build-system ocaml-build-system)
1026 `(("libxml2" ,libxml2) ; for xmllint
1027 ("ocamlbuild" ,ocamlbuild)))
1030 (modify-phases %standard-phases
1031 (delete 'check)))) ; tests are run during build
1032 (home-page "http://ounit.forge.ocamlcore.org")
1033 (synopsis "Unit testing framework for OCaml")
1034 (description "Unit testing framework for OCaml. It is similar to JUnit and
1035 other XUnit testing frameworks.")
1036 (license license:expat)))
1038 (define-public ocaml4.01-ounit
1039 (package-with-ocaml4.01 ocaml-ounit))
1041 (define-public ocaml4.02-ounit
1042 (package-with-ocaml4.02 ocaml-ounit))
1044 (define-public camlzip
1050 (uri (ocaml-forge-uri name version 1616))
1053 "0m6gyjw46w3qnhxfsyqyag42znl5lwargks7w7rfchr9jzwpff68"))))
1054 (build-system ocaml-build-system)
1059 (modify-phases %standard-phases
1061 (add-after 'install 'install-camlzip
1062 (lambda* (#:key outputs #:allow-other-keys)
1063 (let* ((out (assoc-ref outputs "out"))
1064 (dir (string-append out "/lib/ocaml/site-lib/camlzip")))
1066 (call-with-output-file (string-append dir "/META")
1068 (format port "version=\"1.06\"\n")
1069 (format port "requires=\"unix\"\n")
1070 (format port "archive(byte)=\"zip.cma\"\n")
1071 (format port "archive(native)=\"zip.cmxa\"\n")
1072 (format port "archive(native,plugin)=\"zip.cmxs\"\n")
1073 (format port "directory=\"../zip\"\n")))))))
1074 #:install-target "install-findlib"
1076 (list "all" "allopt"
1077 (string-append "INSTALLDIR=" (assoc-ref %outputs "out")
1079 (home-page "http://forge.ocamlcore.org/projects/camlzip")
1080 (synopsis "Provides easy access to compressed files")
1081 (description "Provides easy access to compressed files in ZIP, GZIP and
1082 JAR format. It provides functions for reading from and writing to compressed
1083 files in these formats.")
1084 (license license:lgpl2.1+)))
1086 (define-public ocaml4.01-camlzip
1087 (let ((base (package-with-ocaml4.01 camlzip)))
1090 (name "ocaml4.01-camlzip")
1091 ;; Version 1.05 is the last version to support OCaml 4.01.0.
1098 "http://forge.ocamlcore.org/frs/download.php/1037/camlzip-"
1102 "0syh72jk9s0qwjmmfrkqchaj98m020ii082jn38pwnmb6v3p02wk")))))))
1104 (define-public ocaml4.02-camlzip
1105 (package-with-ocaml4.02 camlzip))
1107 (define-public ocamlmod
1113 (uri (ocaml-forge-uri name version 1702))
1116 "0cgp9qqrq7ayyhddrmqmq1affvfqcn722qiakjq4dkywvp67h4aa"))))
1117 (build-system ocaml-build-system)
1119 `(("ounit" ,ocaml-ounit)
1120 ("ocamlbuild" ,ocamlbuild)))
1123 (modify-phases %standard-phases
1124 ;; Tests are done during build.
1126 (home-page "https://forge.ocamlcore.org/projects/ocamlmod")
1127 (synopsis "Generate modules from OCaml source files")
1128 (description "Generate modules from OCaml source files.")
1129 (license license:lgpl2.1+))) ; with an exception
1131 (define-public ocaml4.02-ocamlmod
1132 (package-with-ocaml4.02 ocamlmod))
1134 (define-public ocaml-zarith
1136 (name "ocaml-zarith")
1140 (uri (ocaml-forge-uri "zarith" version 1574))
1143 "0l36hzmfbvdai2kcgynh13vfdim5x2grnaw61fxqalyjm90c3di3"))))
1144 (build-system ocaml-build-system)
1150 `(#:tests? #f ; no test target
1152 (modify-phases %standard-phases
1154 (lambda* (#:key #:allow-other-keys)
1155 (zero? (system* "./configure")))))))
1156 (home-page "https://forge.ocamlcore.org/projects/zarith/")
1157 (synopsis "Implements arbitrary-precision integers")
1158 (description "Implements arithmetic and logical operations over
1159 arbitrary-precision integers. It uses GMP to efficiently implement arithmetic
1160 over big integers. Small integers are represented as Caml unboxed integers,
1161 for speed and space economy.")
1162 (license license:lgpl2.1+))) ; with an exception
1164 (define-public ocaml4.02-zarith
1165 (package-with-ocaml4.02 ocaml-zarith))
1167 (define-public ocaml-frontc
1169 (name "ocaml-frontc")
1173 (uri (string-append "https://www.irit.fr/recherches/ARCHI/MARCH/"
1174 "frontc/Frontc-" version ".tgz"))
1177 "16dz153s92dgbw1rrfwbhscy73did87kfmjwyh3qpvs748h1sc4g"))))
1178 (build-system ocaml-build-system)
1180 `(#:ocaml ,ocaml-4.02
1181 #:findlib ,ocaml4.02-findlib
1183 (modify-phases %standard-phases
1185 (add-after 'install 'install-meta
1186 (lambda* (#:key outputs #:allow-other-keys)
1187 (let ((out (assoc-ref outputs "out")))
1188 (with-output-to-file
1189 (string-append out "/lib/ocaml/frontc/META")
1193 "description = \"Parser for the C language\"
1194 version = \"" ,version "\"
1196 archive(byte) = \"frontc.cma\"
1197 archive(native) = \"frontc.cmxa\""))))
1198 (symlink (string-append out "/lib/ocaml/frontc")
1199 (string-append out "/lib/ocaml/FrontC"))))))
1200 #:make-flags (list (string-append "PREFIX="
1201 (assoc-ref %outputs "out"))
1202 "OCAML_SITE=$(LIB_DIR)/ocaml/")))
1203 (home-page "https://www.irit.fr/FrontC")
1204 (synopsis "C parser and lexer library")
1205 (description "FrontC is an OCAML library providing a C parser and lexer.
1206 The result is a syntactic tree easy to process with usual OCAML tree management.
1207 It provides support for ANSI C syntax, old-C K&R style syntax and the standard
1208 GNU CC attributes. It provides also a C pretty printer as an example of use.")
1209 (license license:lgpl2.1)))
1211 (define-public ocaml-qcheck
1213 (name "ocaml-qcheck")
1217 (uri (string-append "https://github.com/c-cube/qcheck/archive/"
1219 (file-name (string-append name "-" version ".tar.gz"))
1222 "1zs1pg5cb1iry554v3cdmmiglsrwmsqa9x8zxmzb118fnk5d3ha6"))))
1223 (build-system ocaml-build-system)
1225 `(("ounit" ,ocaml-ounit)
1226 ("ocamlbuild" ,ocamlbuild)))
1227 (home-page "https://github.com/c-cube/qcheck")
1228 (synopsis "QuickCheck inspired property-based testing for OCaml")
1229 (description "QuickCheck inspired property-based testing for OCaml. This
1230 module allows to check invariants (properties of some types) over randomly
1231 generated instances of the type. It provides combinators for generating
1232 instances and printing them.")
1233 (license license:lgpl3+)))
1235 (define-public ocaml4.02-qcheck
1236 (package-with-ocaml4.02 ocaml-qcheck))
1238 (define-public ocaml-qtest
1240 (name "ocaml-qtest")
1244 (uri (string-append "https://github.com/vincent-hugot/qtest/"
1245 "archive/" version ".tar.gz"))
1246 (file-name (string-append name "-" version ".tar.gz"))
1249 "1ff4if64mc9c7wmhjdgnlnh6k6a713piqzr4043zzj4s5pw7smxk"))))
1250 (build-system ocaml-build-system)
1252 `(("ocamlbuild" ,ocamlbuild)))
1254 `(("ounit" ,ocaml-ounit)
1255 ("qcheck" ,ocaml-qcheck)))
1257 `(#:tests? #f ; No test target.
1259 (list (string-append "BIN=" (assoc-ref %outputs "out") "/bin"))
1261 (modify-phases %standard-phases
1262 (delete 'configure))))
1263 (home-page "https://github.com/vincent-hugot/qtest")
1264 (synopsis "Inline (Unit) Tests for OCaml")
1265 (description "Qtest extracts inline unit tests written using a special
1266 syntax in comments. Those tests are then run using the oUnit framework and the
1267 qcheck library. The possibilities range from trivial tests -- extremely simple
1268 to use -- to sophisticated random generation of test cases.")
1269 (license license:lgpl3+)))
1271 (define-public ocaml4.01-qtest
1272 (package-with-ocaml4.01 ocaml-qtest))
1274 (define-public ocaml4.02-qtest
1275 (package-with-ocaml4.02 ocaml-qtest))
1277 (define-public ocaml-stringext
1279 (name "ocaml-stringext")
1283 (uri (string-append "https://github.com/rgrinberg/stringext"
1284 "/archive/v" version ".tar.gz"))
1285 (file-name (string-append name "-" version ".tar.gz"))
1288 "19g6lfn03iki9f8h91hi0yiqn0b3wkxyq08b3y23wgv6jw6mssfh"))))
1289 (build-system ocaml-build-system)
1291 `(("ocamlbuild" ,ocamlbuild)
1292 ("qtest" ,ocaml-qtest)))
1293 (home-page "https://github.com/rgrinberg/stringext")
1294 (synopsis "Extra string functions for OCaml")
1295 (description "Provides a single module named Stringext that provides a grab
1296 bag of often used but missing string functions from the stdlib. E.g, split,
1297 full_split, cut, rcut, etc..")
1298 ;; the only mention of a license in this project is in its `opam' file
1299 ;; where it says `mit'.
1300 (license license:expat)))
1302 (define-public ocaml4.02-stringext
1303 (package-with-ocaml4.02 ocaml-stringext))
1305 (define-public ocaml-bisect
1307 (name "ocaml-bisect")
1311 (uri (string-append "https://github.com/gasche/bisect/archive/"
1313 (file-name (string-append name "-" version ".tar.gz"))
1316 "0p67fppk5ifb63b00kxwrb1xg75hrqhknng3bsdyw3gxxqyjlpmx"))
1319 "ocaml-bisect-fix-camlp4-in-another-directory.patch"))))
1320 (build-system ocaml-build-system)
1322 `(("camlp4" ,camlp4)
1323 ("libxml2" ,libxml2)
1324 ("ocamlbuild" ,ocamlbuild)
1327 `(("camlp4" ,camlp4)))
1329 `(#:test-target "tests"
1331 (list "all" (string-append "CAMLP4_LIBDIR="
1332 (assoc-ref %build-inputs "camlp4")
1333 "/lib/ocaml/site-lib/camlp4"))
1335 (modify-phases %standard-phases
1337 (lambda* (#:key inputs outputs #:allow-other-keys)
1338 (invoke "./configure" "-prefix" (assoc-ref outputs "out")
1339 "-ocaml-prefix" (assoc-ref inputs "ocaml")
1340 "-camlp4-prefix" (assoc-ref inputs "camlp4"))
1342 (home-page "http://bisect.x9c.fr")
1343 (synopsis "Code coverage tool for the OCaml language")
1344 (description "Bisect is a code coverage tool for the OCaml language. It is
1345 a camlp4-based tool that allows to instrument your application before running
1346 tests. After application execution, it is possible to generate a report in HTML
1347 format that is the replica of the application source code annotated with code
1348 coverage information.")
1350 `((ocaml4.01-variant . ,(delay ocaml4.01-bisect))
1351 (ocaml4.02-variant . ,(delay ocaml4.02-bisect))))
1352 (license license:gpl3+)))
1354 (define-public ocaml4.01-bisect
1355 (let ((base (package-with-ocaml4.01 (strip-ocaml4.01-variant ocaml-bisect))))
1361 (uri (string-append "https://github.com/gasche/bisect/archive/"
1363 (file-name (string-append "ocaml-bisect-" version ".tar.gz"))
1366 "1ip49jqf0kkbrqf8qspmfjbg9ap9fhvjkg718myzix88dg5rv8d4"))))
1368 `(#:ocaml ,ocaml-4.01
1369 ,@(substitute-keyword-arguments (package-arguments ocaml-bisect)
1370 ((#:make-flags flags)
1373 `(modify-phases ,phases
1375 (lambda* (#:key inputs outputs #:allow-other-keys)
1376 (invoke "./configure"
1377 "-ocaml-prefix" (assoc-ref inputs "ocaml"))
1379 (native-inputs `(,@(alist-delete "camlp4" (package-native-inputs base))))
1381 `(,@(alist-delete "camlp4" (package-propagated-inputs base)))))))
1383 (define-public ocaml4.02-bisect
1384 (let ((base (package-with-ocaml4.02 (strip-ocaml4.02-variant ocaml-bisect))))
1388 `(("camlp4" ,camlp4-4.02)
1389 ("libxml2" ,libxml2)
1392 `(("camlp4" ,camlp4-4.02))))))
1400 (uri (string-append "https://github.com/ocaml/dune/releases/"
1401 "download/" version "/dune-" version ".tbz"))
1404 "00c5dbm4hkdapc2i7pg07b2lj8sv6ly38qr7zid58cdmbmzq21z9"))))
1405 (build-system ocaml-build-system)
1407 `(#:tests? #f; require odoc
1408 #:make-flags (list (string-append "PREFIX=" (assoc-ref %outputs "out")))
1410 (modify-phases %standard-phases
1412 (lambda* (#:key outputs #:allow-other-keys)
1413 (invoke "./configure")
1415 (home-page "https://github.com/ocaml/dune")
1416 (synopsis "OCaml build system")
1417 (description "Dune is a build system that was designed to simplify the
1418 release of Jane Street packages. It reads metadata from @file{dune} files
1419 following a very simple s-expression syntax.")
1420 (license license:expat)))
1422 (define-public ocaml-migrate-parsetree
1424 (name "ocaml-migrate-parsetree")
1428 (uri (string-append "https://github.com/ocaml-ppx/"
1429 "ocaml-migrate-parsetree/releases/download/v"
1430 version "/ocaml-migrate-parsetree-"
1434 "01zjp1q4hryqaxv4apkjd868fycz2kf887r6lkb6x2a545h1lh7f"))))
1435 (build-system dune-build-system)
1440 `(("ocamlbuild" ,ocamlbuild)
1441 ("ocaml-result" ,ocaml-result)))
1442 (home-page "https://github.com/ocaml-ppx/ocaml-migrate-parsetree")
1443 (synopsis "OCaml parsetree convertor")
1444 (description "This library converts between parsetrees of different OCaml
1445 versions. For each version, there is a snapshot of the parsetree and conversion
1446 functions to the next and/or previous version.")
1447 (license license:lgpl2.1+)))
1449 (define-public ocaml-ppx-tools-versioned
1451 (name "ocaml-ppx-tools-versioned")
1455 (uri (string-append "https://github.com/ocaml-ppx/"
1456 "ppx_tools_versioned/archive/"
1458 (file-name (string-append name "-" version ".tar.gz"))
1461 "1x2xfjpkzbcz4rza1d7gh3ipliw6jqfcklbsln82v3561qgkqgmh"))))
1462 (build-system dune-build-system)
1464 `(#:test-target "."))
1466 `(("ocaml-migrate-parsetree" ,ocaml-migrate-parsetree)))
1467 (home-page "https://github.com/let-def/ppx_tools_versioned")
1468 (synopsis "Variant of ppx_tools")
1469 (description "This package is a variant of ppx_tools based on
1470 ocaml-migrate-parsetree")
1471 (license license:expat)))
1473 (define-public ocaml-bitstring
1475 (name "ocaml-bitstring")
1479 (uri (string-append "https://bitbucket.org/thanatonauts/bitstring/"
1480 "get/v" version ".tar.gz"))
1481 (file-name (string-append name "-" version ".tar.gz"))
1484 "15jjk2pq1vx311gl49s5ag6x5y0654x35w75z07g7kr2q334hqps"))))
1485 (build-system dune-build-system)
1487 `(("camlp4" ,camlp4)
1489 ("autoconf" ,autoconf)
1490 ("automake" ,automake)
1491 ("bisect" ,ocaml-bisect)))
1493 `(("camlp4" ,camlp4)
1494 ("ocaml-ppx-tools-versioned" ,ocaml-ppx-tools-versioned)))
1496 `(#:tests? #f; Tests fail to build
1499 `((ocaml4.02-variant . ,(delay ocaml4.02-bitstring))))
1500 (home-page "https://github.com/xguerin/bitstring")
1501 (synopsis "Bitstrings and bitstring matching for OCaml")
1502 (description "Adds Erlang-style bitstrings and matching over bitstrings as
1503 a syntax extension and library for OCaml. You can use this module to both parse
1504 and generate binary formats, files and protocols. Bitstring handling is added
1505 as primitives to the language, making it exceptionally simple to use and very
1507 (license license:isc)))
1509 (define-public ocaml4.02-bitstring
1510 (let ((base (package-with-ocaml4.02 (strip-ocaml4.02-variant ocaml-bitstring))))
1516 (uri (string-append "https://github.com/xguerin/bitstring"
1517 "/archive/v" version ".tar.gz"))
1518 (file-name (string-append "ocaml-bitstring-" version ".tar.gz"))
1521 "0vy8ibrxccii1jbsk5q6yh1kxjigqvi7lhhcmizvd5gfhf7mfyc8"))
1522 (patches (search-patches "ocaml-bitstring-fix-configure.patch"))))
1523 (build-system ocaml-build-system)
1525 `(#:ocaml ,ocaml-4.02
1526 #:findlib ,ocaml4.02-findlib
1528 (list "CAMLP4OF=camlp4of" "--enable-coverage")
1530 (list (string-append "BISECTLIB="
1531 (assoc-ref %build-inputs "bisect")
1532 "/lib/ocaml/site-lib")
1533 (string-append "OCAMLCFLAGS=-g -I "
1534 (assoc-ref %build-inputs "camlp4")
1535 "/lib/ocaml/site-lib/camlp4 -I "
1536 "$(BISECTLIB)/bisect")
1537 (string-append "OCAMLOPTFLAGS=-g -I "
1538 (assoc-ref %build-inputs "camlp4")
1539 "/lib/ocaml/site-lib/camlp4 -I "
1540 "$(BISECTLIB)/bisect"))
1542 (modify-phases %standard-phases
1543 (add-after 'install 'link-lib
1544 (lambda* (#:key outputs #:allow-other-keys)
1545 (let* ((out (assoc-ref outputs "out"))
1546 (stubs (string-append out
1547 "/lib/ocaml/site-lib/stubslibs"))
1548 (lib (string-append out
1549 "/lib/ocaml/site-lib/bitstring")))
1551 (symlink (string-append lib "/dllbitstring.so")
1552 (string-append stubs "/dllbitstring.so")))
1554 (add-before 'configure 'fix-configure
1555 (lambda* (#:key inputs #:allow-other-keys)
1556 (substitute* "Makefile.in"
1557 (("@abs_top_builddir@")
1558 (string-append "@abs_top_builddir@:" (getenv "LIBRARY_PATH"))))
1559 (substitute* "configure"
1560 (("-/bin/sh") (string-append "-" (assoc-ref inputs "bash")
1563 `(("camlp4" ,camlp4-4.02)
1565 ("autoconf" ,autoconf)
1566 ("automake" ,automake)
1567 ("bisect" ,ocaml4.02-bisect)))
1569 `(("camlp4" ,camlp4-4.02))))))
1571 (define-public ocaml-result
1573 (name "ocaml-result")
1577 (uri (string-append "https://github.com/janestreet/result"
1578 "/archive/" version ".tar.gz"))
1579 (file-name (string-append name "-" version ".tar.gz"))
1582 "1pgpfsgvhxnh0i37fkvp9j8nadns9hz9iqgabj4dr519j2gr1xvw"))))
1583 (build-system ocaml-build-system)
1587 (modify-phases %standard-phases
1588 (delete 'configure))))
1589 (home-page "https://github.com/janestreet/result")
1590 (synopsis "Compatibility Result module")
1591 (description "Uses the new result type defined in OCaml >= 4.03 while
1592 staying compatible with older version of OCaml should use the Result module
1593 defined in this library.")
1594 (license license:bsd-3)))
1596 (define-public ocaml4.02-result
1597 (package-with-ocaml4.02 ocaml-result))
1599 (define-public ocaml-topkg
1601 (name "ocaml-topkg")
1605 (uri (string-append "http://erratique.ch/software/topkg/releases/"
1606 "topkg-" version ".tbz"))
1609 "18rrh6fmf708z7dd30amljmcgaypj3kk49jrmrj68r4wnw8004j8"))))
1610 (build-system ocaml-build-system)
1613 ("ocamlbuild" ,ocamlbuild)))
1615 `(("result" ,ocaml-result)))
1618 #:build-flags '("build")
1620 (modify-phases %standard-phases
1621 (delete 'configure))))
1622 (home-page "http://erratique.ch/software/topkg")
1623 (synopsis "Transitory OCaml software packager")
1624 (description "Topkg is a packager for distributing OCaml software. It
1625 provides an API to describe the files a package installs in a given build
1626 configuration and to specify information about the package's distribution,
1627 creation and publication procedures.")
1628 (license license:isc)))
1630 (define-public ocaml4.02-topkg
1631 (package-with-ocaml4.02 ocaml-topkg))
1633 (define-public ocaml-rresult
1635 (name "ocaml-rresult")
1639 (uri (string-append "http://erratique.ch/software/rresult/releases/"
1640 "rresult-" version ".tbz"))
1643 "1xxycxhdhaq8p9vhwi93s2mlxjwgm44fcxybx5vghzgbankz9yhm"))))
1644 (build-system ocaml-build-system)
1647 ("ocamlbuild" ,ocamlbuild)))
1649 `(("topkg" ,ocaml-topkg)))
1652 #:build-flags '("build")
1654 (modify-phases %standard-phases
1655 (delete 'configure))))
1656 (home-page "http://erratique.ch/software/rresult")
1657 (synopsis "Result value combinators for OCaml")
1658 (description "Handle computation results and errors in an explicit and
1659 declarative manner, without resorting to exceptions. It defines combinators
1660 to operate on the result type available from OCaml 4.03 in the standard
1662 (license license:isc)))
1664 (define-public ocaml4.02-rresult
1665 (package-with-ocaml4.02 ocaml-rresult))
1667 (define-public ocaml-sqlite3
1669 (name "ocaml-sqlite3")
1675 "https://github.com/mmottl/sqlite3-ocaml/releases/download/v"
1676 version "/sqlite3-ocaml-" version ".tar.gz"))
1679 "14c1nir7c6bivajg0vyx853y7la7r5d25g1v5hjb2wfi73r15p1m"))))
1680 (build-system ocaml-build-system)
1682 `(("ocamlbuild" ,ocamlbuild)
1683 ("pkg-config" ,pkg-config)))
1685 `(("sqlite" ,sqlite)))
1686 (home-page "https://mmottl.github.io/sqlite3-ocaml")
1687 (synopsis "SQLite3 Bindings for OCaml")
1689 "SQLite3-OCaml is an OCaml library with bindings to the SQLite3 client
1690 API. Sqlite3 is a self-contained, serverless, zero-configuration,
1691 transactional SQL database engine with outstanding performance for many use
1692 cases. These bindings are written in a way that enables a friendly
1693 coexistence with the old (version 2) SQLite and its OCaml wrapper
1694 @code{ocaml-sqlite}.")
1695 (license license:expat)))
1697 (define-public ocaml4.01-sqlite3
1698 (package-with-ocaml4.01 ocaml-sqlite3))
1700 (define-public ocaml4.02-sqlite3
1701 (package-with-ocaml4.02 ocaml-sqlite3))
1703 (define-public ocaml-csv
1712 "https://github.com/Chris00/ocaml-csv/releases/download/"
1713 version "/csv-" version ".tar.gz"))
1716 "0rv7x843vn6scxj87hzl01yqrl26rc27lr8s7z6rp9vs745g05zj"))))
1717 (build-system ocaml-build-system)
1719 `(("ocamlbuild" ,ocamlbuild)))
1720 (home-page "https://github.com/Chris00/ocaml-csv")
1721 (synopsis "Pure OCaml functions to read and write CSV")
1723 "@dfn{Comma separated values} (CSV) is a simple tabular format supported
1724 by all major spreadsheets. This library implements pure OCaml functions to
1725 read and write files in this format as well as some convenience functions to
1726 manipulate such data.")
1727 (license (package-license camlp4))))
1729 (define-public ocaml4.01-csv
1730 (package-with-ocaml4.01 ocaml-csv))
1732 (define-public ocaml4.02-csv
1733 (package-with-ocaml4.02 ocaml-csv))
1735 (define-public ocaml-mtime
1737 (name "ocaml-mtime")
1741 (uri (string-append "http://erratique.ch/software/mtime/releases/"
1742 "mtime-" version ".tbz"))
1745 "1hfx4ny2dkw6jf3jppz0640dafl5xgn8r2si9kpwzhmibal8qrah"))))
1746 (build-system ocaml-build-system)
1748 `(("ocamlbuild" ,ocamlbuild)
1751 `(("topkg" ,ocaml-topkg)))
1755 '("native=true" "native-dynlink=true" "jsoo=false")
1757 (modify-phases %standard-phases
1758 (delete 'configure))))
1759 (home-page "http://erratique.ch/software/mtime")
1760 (synopsis "Monotonic wall-clock time for OCaml")
1761 (description "Access monotonic wall-clock time. It allows to measure time
1762 spans without being subject to operating system calendar time adjustments.")
1763 (license license:isc)))
1765 (define-public ocaml4.02-mtime
1766 (package-with-ocaml4.02 ocaml-mtime))
1768 (define-public ocaml-cmdliner
1770 (name "ocaml-cmdliner")
1774 (uri (string-append "http://erratique.ch/software/cmdliner/releases/"
1775 "cmdliner-" version ".tbz"))
1778 "18jqphjiifljlh9jg8zpl6310p3iwyaqphdkmf89acyaix0s4kj1"))))
1779 (build-system ocaml-build-system)
1781 `(("ocaml-result" ,ocaml-result)))
1783 `(("ocamlbuild" ,ocamlbuild)
1787 #:build-flags '("native=true" "native-dynlink=true")
1789 (modify-phases %standard-phases
1791 ;; The makefile says 'adjust on cli invocation'
1792 (lambda* (#:key outputs #:allow-other-keys)
1793 (let ((out (assoc-ref outputs "out")))
1794 (invoke "make" "install" (string-append "PREFIX=" out))
1796 (delete 'configure))))
1797 (home-page "http://erratique.ch/software/cmdliner")
1798 (synopsis "Declarative definition of command line interfaces for OCaml")
1799 (description "Cmdliner is a module for the declarative definition of command
1800 line interfaces. It provides a simple and compositional mechanism to convert
1801 command line arguments to OCaml values and pass them to your functions. The
1802 module automatically handles syntax errors, help messages and UNIX man page
1803 generation. It supports programs with single or multiple commands and respects
1804 most of the POSIX and GNU conventions.")
1805 (license license:bsd-3)))
1807 (define-public ocaml4.02-cmdliner
1808 (package-with-ocaml4.02 ocaml-cmdliner))
1810 (define-public ocaml-fmt
1817 (uri (string-append "http://erratique.ch/software/fmt/releases/fmt-"
1820 "1zj9azcxcn6skmb69ykgmi9z8c50yskwg03wqgh87lypgjdcz060"))))
1821 (build-system ocaml-build-system)
1823 `(("ocamlbuild" ,ocamlbuild)
1825 ("topkg" ,ocaml-topkg)))
1827 `(("result" ,ocaml-result)
1828 ("ocaml-uchar" ,ocaml-uchar)
1829 ("cmdliner" ,ocaml-cmdliner)))
1830 (arguments `(#:tests? #f
1831 #:build-flags (list "build" "--with-base-unix" "true"
1832 "--with-cmdliner" "true")
1834 (modify-phases %standard-phases
1835 (delete 'configure))))
1836 (home-page "http://erratique.ch/software/fmt")
1837 (synopsis "OCaml Format pretty-printer combinators")
1838 (description "Fmt exposes combinators to devise Format pretty-printing
1840 (license license:isc)))
1842 (define-public ocaml4.02-fmt
1843 (package-with-ocaml4.02 ocaml-fmt))
1845 (define-public ocaml-astring
1847 (name "ocaml-astring")
1852 (uri (string-append "http://erratique.ch/software/astring/releases/astring-"
1855 "0ixjwc3plrljvj24za3l9gy0w30lsbggp8yh02lwrzw61ls4cri0"))))
1856 (build-system ocaml-build-system)
1858 `(("ocamlbuild" ,ocamlbuild)
1860 ("topkg" ,ocaml-topkg)))
1863 #:build-flags (list "build")
1865 (modify-phases %standard-phases
1866 (delete 'configure))))
1867 (home-page "http://erratique.ch/software/astring")
1868 (synopsis "Alternative String module for OCaml")
1869 (description "Astring exposes an alternative String module for OCaml. This
1870 module balances minimality and expressiveness for basic, index-free, string
1871 processing and provides types and functions for substrings, string sets and
1872 string maps. The String module exposed by Astring has exception safe functions,
1873 removes deprecated and rarely used functions, alters some signatures and names,
1874 adds a few missing functions and fully exploits OCaml's newfound string
1876 (license license:isc)))
1878 (define-public ocaml4.02-astring
1879 (package-with-ocaml4.02 ocaml-astring))
1881 (define-public ocaml-alcotest
1883 (name "ocaml-alcotest")
1887 (uri (string-append "https://github.com/mirage/alcotest/releases/"
1888 "download/" version "/alcotest-" version ".tbz"))
1891 "0g5lzk0gpfx4q8hyhr460gr4lab5wakfxsmhfwvb3yinxwzs95gc"))))
1892 (build-system ocaml-build-system)
1895 #:build-flags (list "build")
1897 (modify-phases %standard-phases
1898 (delete 'configure))))
1900 `(("ocamlbuild" ,ocamlbuild)
1902 ("topkg" ,ocaml-topkg)))
1904 `(("fmt" ,ocaml-fmt)
1905 ("astring" ,ocaml-astring)))
1906 (home-page "https://github.com/mirage/alcotest")
1907 (synopsis "Lightweight OCaml test framework")
1908 (description "Alcotest exposes simple interface to perform unit tests. It
1909 exposes a simple TESTABLE module type, a check function to assert test
1910 predicates and a run function to perform a list of unit -> unit test callbacks.
1911 Alcotest provides a quiet and colorful output where only faulty runs are fully
1912 displayed at the end of the run (with the full logs ready to inspect), with a
1913 simple (yet expressive) query language to select the tests to run.")
1914 (license license:isc)))
1916 (define-public ocaml4.02-alcotest
1917 (package-with-ocaml4.02 ocaml-alcotest))
1919 (define-public ocaml-ppx-tools
1921 (name "ocaml-ppx-tools")
1922 (version "5.1+4.06.0")
1926 (uri (string-append "https://github.com/alainfrisch/ppx_tools/archive/"
1929 "0mncpy9v2mcjgnj7s2vqpp2b1ixv54djicfx66ic9wny9d202gj1"))))
1930 (build-system ocaml-build-system)
1932 `(#:phases (modify-phases %standard-phases (delete 'configure))
1935 `((ocaml4.02-variant . ,(delay ocaml4.02-ppx-tools))))
1936 (home-page "https://github.com/alainfrisch/ppx_tools")
1937 (synopsis "Tools for authors of ppx rewriters and other syntactic tools")
1938 (description "Tools for authors of ppx rewriters and other syntactic tools.")
1939 (license license:expat)))
1941 (define-public ocaml4.02-ppx-tools
1942 (let ((base (package-with-ocaml4.02 (strip-ocaml4.02-variant ocaml-ppx-tools))))
1945 (version "5.0+4.02.0")
1949 (uri (string-append "https://github.com/alainfrisch/ppx_tools/archive/"
1952 "0rjg4rngi8k9873z4zq95zn9hj8qyw1vcrf11y15aqasfpqq16rc")))))))
1954 (define-public ocaml-react
1956 (name "ocaml-react")
1961 (uri (string-append "http://erratique.ch/software/react/releases/react-"
1964 "0knhgbngphv5sp1yskfd97crf169qhpc0igr6w7vqw0q36lswyl8"))))
1965 (build-system ocaml-build-system)
1967 `(("ocamlbuild" ,ocamlbuild)
1971 #:build-flags (list "native=true" "native-dynlink=true")
1973 (modify-phases %standard-phases
1974 (delete 'configure))))
1975 (home-page "http://erratique.ch/software/react")
1976 (synopsis "Declarative events and signals for OCaml")
1977 (description "React is an OCaml module for functional reactive programming
1978 (FRP). It provides support to program with time varying values: declarative
1979 events and signals. React doesn't define any primitive event or signal, it
1980 lets the client choose the concrete timeline.")
1981 (license license:bsd-3)))
1983 (define-public ocaml4.02-react
1984 (package-with-ocaml4.02 ocaml-react))
1986 (define-public ocaml-ssl
1994 (url "https://github.com/savonet/ocaml-ssl.git")
1996 (file-name (git-file-name name version))
1998 "0fviq8xhp3qk7pmkl7knchywsipxgb7p0z489hj8qnf2sx8xzdmy"))))
1999 (build-system ocaml-build-system)
2002 #:make-flags (list "OCAMLFIND_LDCONF=ignore")
2004 (modify-phases %standard-phases
2005 (add-after 'unpack 'bootstrap
2006 (lambda* (#:key #:allow-other-keys)
2007 (system* "sh" "bootstrap")
2008 (substitute* "src/OCamlMakefile"
2009 (("/bin/sh") (which "bash")))
2010 (substitute* "configure"
2011 (("/bin/sh") (which "bash")))
2014 `(("autoconf" ,autoconf)
2015 ("automake" ,automake)
2017 (propagated-inputs `(("openssl" ,openssl)))
2018 (home-page "https://github.com/savonet/ocaml-ssl/")
2019 (synopsis "OCaml bindings for OpenSSL")
2021 "OCaml-SSL is a set of bindings for OpenSSL, a library for communicating
2022 through Transport Layer Security (@dfn{TLS}) encrypted connections.")
2023 (license license:lgpl2.1)))
2025 (define-public ocaml4.02-ssl
2026 (package-with-ocaml4.02 ocaml-ssl))
2028 (define-public ocaml-lwt
2035 (uri (string-append "https://github.com/ocsigen/lwt/archive/" version
2037 (file-name (string-append name "-" version ".tar.gz"))
2039 "0mhh019bjkg5xfvpy1pxs4xdxb759fyydmgb6l4j0qww1qgr8klp"))))
2040 (build-system dune-build-system)
2042 `(#:tests? #f; require lwt_ppx
2045 (modify-phases %standard-phases
2046 (add-before 'build 'configure
2048 (invoke "ocaml" "src/util/configure.ml" "-use-libev" "true")
2051 `(("ocaml-cppo" ,ocaml-cppo)
2052 ("ocaml-migrate-parsetree" ,ocaml-migrate-parsetree)
2053 ("pkg-config" ,pkg-config)
2054 ("ppx-tools-versioned" ,ocaml-ppx-tools-versioned)))
2059 `(("result" ,ocaml-result)
2060 ("ocaml-ssl" ,ocaml-ssl)
2061 ("ocaml-react" ,ocaml-react)))
2062 (home-page "https://github.com/ocsigen/lwt")
2063 (synopsis "Cooperative threads and I/O in monadic style")
2064 (description "Lwt provides typed, composable cooperative threads. These
2065 make it easy to run normally-blocking I/O operations concurrently in a single
2066 process. Also, in many cases, Lwt threads can interact without the need for
2067 locks or other synchronization primitives.")
2068 (license license:lgpl2.1)))
2070 (define-public ocaml4.02-lwt
2071 (package-with-ocaml4.02 ocaml-lwt))
2073 (define-public ocaml-lwt-log
2075 (name "ocaml-lwt-log")
2080 (uri (string-append "https://github.com/aantron/lwt_log/archive/" version
2082 (file-name (string-append name "-" version ".tar.gz"))
2084 "1lr62j2266pbsi54xmzsfvl2z7fi7smhak7fp1ybl8hssxwi6in2"))))
2085 (build-system dune-build-system)
2087 `(#:tests? #f; require lwt_ppx
2090 `(("lwt" ,ocaml-lwt)))
2091 (home-page "https://github.com/aantron/lwt_log")
2092 (synopsis "Logging library")
2093 (description "This package provides a deprecated logging component for
2095 (license license:lgpl2.1)))
2097 (define-public ocaml4.02-lwt-log
2098 (package-with-ocaml4.02 ocaml-lwt-log))
2100 (define-public ocaml-logs
2106 (uri (string-append "http://erratique.ch/software/logs/releases/"
2107 "logs-" version ".tbz"))
2110 "1khbn7jqpid83zn8rvyh1x1sirls7zc878zj4fz985m5xlsfy853"))))
2111 (build-system ocaml-build-system)
2114 #:build-flags (list "build" "--with-js_of_ocaml" "false")
2116 (modify-phases %standard-phases
2117 (delete 'configure))))
2119 `(("ocamlbuild" ,ocamlbuild)
2122 `(("fmt" ,ocaml-fmt)
2124 ("mtime" ,ocaml-mtime)
2125 ("result" ,ocaml-result)
2126 ("cmdliner" ,ocaml-cmdliner)
2127 ("topkg" ,ocaml-topkg)))
2128 (home-page "http://erratique.ch/software/logs")
2129 (synopsis "Logging infrastructure for OCaml")
2130 (description "Logs provides a logging infrastructure for OCaml. Logging is
2131 performed on sources whose reporting level can be set independently. Log
2132 message report is decoupled from logging and is handled by a reporter.")
2133 (license license:isc)))
2135 (define-public ocaml4.02-logs
2136 (package-with-ocaml4.02 ocaml-logs))
2138 (define-public ocaml-fpath
2140 (name "ocaml-fpath")
2144 (uri (string-append "http://erratique.ch/software/fpath/releases/"
2145 "fpath-" version ".tbz"))
2148 "05134ij27xjl6gaqsc65yl19vfj6cjxq3mbm9bf4mija8grdpn6g"))))
2149 (build-system ocaml-build-system)
2152 #:build-flags (list "build")
2154 (modify-phases %standard-phases
2155 (delete 'configure))))
2157 `(("ocamlbuild" ,ocamlbuild)
2160 `(("topkg" ,ocaml-topkg)
2161 ("astring" ,ocaml-astring)))
2162 (home-page "http://erratique.ch/software/fpath")
2163 (synopsis "File system paths for OCaml")
2164 (description "Fpath is an OCaml module for handling file system paths with
2165 POSIX or Windows conventions. Fpath processes paths without accessing the
2166 file system and is independent from any system library.")
2167 (license license:isc)))
2169 (define-public ocaml4.02-fpath
2170 (package-with-ocaml4.02 ocaml-fpath))
2172 (define-public ocaml-bos
2178 (uri (string-append "http://erratique.ch/software/bos/releases/"
2179 "bos-" version ".tbz"))
2182 "1ly66lysk4w6mdy4k1n3ynlpfpq7lw4wshcpzgx58v6x613w5s7q"))))
2183 (build-system ocaml-build-system)
2186 #:build-flags (list "build")
2188 (modify-phases %standard-phases
2189 (delete 'configure))))
2191 `(("ocamlbuild" ,ocamlbuild)
2194 `(("topkg" ,ocaml-topkg)
2195 ("astring" ,ocaml-astring)
2197 ("fpath" ,ocaml-fpath)
2198 ("logs" ,ocaml-logs)
2199 ("rresult" ,ocaml-rresult)))
2200 (home-page "http://erratique.ch/software/bos")
2201 (synopsis "Basic OS interaction for OCaml")
2202 (description "Bos provides support for basic and robust interaction with
2203 the operating system in OCaml. It has functions to access the process
2204 environment, parse command line arguments, interact with the file system and
2205 run command line programs.")
2206 (license license:isc)))
2208 (define-public ocaml4.02-bos
2209 (package-with-ocaml4.02 ocaml-bos))
2211 (define-public ocaml-xmlm
2217 (uri (string-append "http://erratique.ch/software/xmlm/releases/"
2218 "xmlm-" version ".tbz"))
2221 "1rrdxg5kh9zaqmgapy9bhdqyxbbvxxib3bdfg1vhw4rrkp1z0x8n"))))
2222 (build-system ocaml-build-system)
2225 #:build-flags (list "build")
2227 (modify-phases %standard-phases
2228 (delete 'configure))))
2230 `(("ocamlbuild" ,ocamlbuild)
2231 ("ocaml-topkg" ,ocaml-topkg)
2233 (home-page "http://erratique.ch/software/xmlm")
2234 (synopsis "Streaming XML codec for OCaml")
2235 (description "Xmlm is a streaming codec to decode and encode the XML data
2236 format. It can process XML documents without a complete in-memory
2237 representation of the data.")
2238 (license license:isc)))
2240 (define-public ocaml4.01-xmlm
2241 (package-with-ocaml4.01 ocaml-xmlm))
2243 (define-public ocaml4.02-xmlm
2244 (package-with-ocaml4.02 ocaml-xmlm))
2246 (define-public ocaml-ulex
2252 (uri (string-append "https://github.com/whitequark/ulex/archive/v"
2254 (file-name (string-append name "-" version ".tar.gz"))
2257 "16gnbhqs6y2v89vw4igzvxdf2g8ybh5643636824aldcv8sscac0"))))
2258 (build-system ocaml-build-system)
2260 `(#:phases (modify-phases %standard-phases (delete 'configure))
2264 (string-append "OCAMLBUILD=ocamlbuild -byte-plugin "
2265 "-cflags -I," (assoc-ref %build-inputs "camlp4")
2266 "/lib/ocaml/site-lib/camlp4"))))
2268 `(("camlp4" ,camlp4)
2269 ("ocamlbuild" ,ocamlbuild)))
2270 (home-page "http://www.cduce.org/download.html#side")
2271 (synopsis "Lexer generator for Unicode and OCaml")
2272 (description "Lexer generator for Unicode and OCaml.")
2273 (license license:expat)))
2275 (define-public ocaml4.02-ulex
2276 (package-with-ocaml4.02 ocaml-ulex))
2278 (define-public ocaml-uchar
2280 (name "ocaml-uchar")
2285 (uri (string-append "https://github.com/ocaml/uchar/releases/download/v"
2286 version "/uchar-" version ".tbz"))
2288 "1w2saw7zanf9m9ffvz2lvcxvlm118pws2x1wym526xmydhqpyfa7"))))
2289 (build-system ocaml-build-system)
2292 #:build-flags (list "native=true" "native-dynlink=true")
2294 (modify-phases %standard-phases
2295 (delete 'configure))))
2297 `(("ocamlbuild" ,ocamlbuild)
2299 (home-page "https://github.com/ocaml/uchar")
2300 (synopsis "Compatibility library for OCaml's Uchar module")
2301 (description "The uchar package provides a compatibility library for the
2302 `Uchar` module introduced in OCaml 4.03.")
2303 (license license:lgpl2.1)))
2305 (define-public ocaml4.02-uchar
2306 (package-with-ocaml4.02 ocaml-uchar))
2308 (define-public ocaml-uutf
2314 (uri (string-append "http://erratique.ch/software/uutf/releases/"
2315 "uutf-" version ".tbz"))
2318 "1gp96dcggq7s84934vimxh89caaxa77lqiff1yywbwkilkkjcfqj"))))
2319 (build-system ocaml-build-system)
2322 #:build-flags (list "build")
2324 (modify-phases %standard-phases
2325 (delete 'configure))))
2327 `(("ocamlbuild" ,ocamlbuild)
2329 ("topkg" ,ocaml-topkg)))
2331 `(("uchar" ,ocaml-uchar)
2332 ("cmdliner" ,ocaml-cmdliner)))
2333 (home-page "http://erratique.ch/software/uutf")
2334 (synopsis "Non-blocking streaming Unicode codec for OCaml")
2335 (description "Uutf is a non-blocking streaming codec to decode and encode
2336 the UTF-8, UTF-16, UTF-16LE and UTF-16BE encoding schemes. It can efficiently
2337 work character by character without blocking on IO. Decoders perform character
2338 position tracking and support newline normalization.
2340 Functions are also provided to fold over the characters of UTF encoded OCaml
2341 string values and to directly encode characters in OCaml Buffer.t values.")
2342 (license license:isc)))
2344 (define-public ocaml4.02-uutf
2345 (package-with-ocaml4.02 ocaml-uutf))
2347 (define-public ocaml-jsonm
2349 (name "ocaml-jsonm")
2353 (uri (string-append "http://erratique.ch/software/jsonm/releases/"
2354 "jsonm-" version ".tbz"))
2357 "1176dcmxb11fnw49b7yysvkjh0kpzx4s48lmdn5psq9vshp5c29w"))))
2358 (build-system ocaml-build-system)
2361 #:build-flags (list "build")
2363 (modify-phases %standard-phases
2364 (delete 'configure))))
2366 `(("ocamlbuild" ,ocamlbuild)
2368 ("topkg" ,ocaml-topkg)))
2370 `(("uutf" ,ocaml-uutf)
2371 ("cmdliner" ,ocaml-cmdliner)))
2372 (home-page "http://erratique.ch/software/jsonm")
2373 (synopsis "Non-blocking streaming JSON codec for OCaml")
2374 (description "Jsonm is a non-blocking streaming codec to decode and encode
2375 the JSON data format. It can process JSON text without blocking on IO and
2376 without a complete in-memory representation of the data.")
2377 (license license:isc)))
2379 (define-public ocaml4.02-jsonm
2380 (package-with-ocaml4.02 ocaml-jsonm))
2382 (define-public ocaml-ocurl
2384 (name "ocaml-ocurl")
2388 (uri (string-append "http://ygrek.org.ua/p/release/ocurl/ocurl-"
2392 "1ax3xdlzgb1zg7d0wr9nwgmh6a45a764m0wk8p6mx07ad94hz0q9"))))
2393 (build-system ocaml-build-system)
2396 (modify-phases %standard-phases
2397 (add-before 'configure 'fix-/bin/sh
2398 (lambda* (#:key inputs #:allow-other-keys)
2399 (substitute* "configure"
2400 (("-/bin/sh") (string-append "-" (which "bash")))))))))
2402 `(("pkg-config" ,pkg-config)))
2403 (inputs `(("curl" ,curl)))
2404 (home-page "http://ocurl.forge.ocamlcore.org/")
2405 (synopsis "OCaml bindings for libcurl")
2406 (description "Client-side URL transfer library, supporting HTTP and a
2407 multitude of other network protocols (FTP/SMTP/RTSP/etc).")
2408 (license license:isc)))
2410 (define-public ocaml4.02-ocurl
2411 (package-with-ocaml4.02 ocaml-ocurl))
2413 (define-public ocaml-base64
2415 (name "ocaml-base64")
2419 (uri (string-append "https://github.com/mirage/ocaml-base64/"
2420 "releases/download/v" version "/base64-"
2422 (file-name (string-append name "-" version ".tar.gz"))
2425 "1p45sawchmrkr22gkmydjc4ary23pisp58zsnb7iq7d82nxs1lfq"))))
2426 (build-system ocaml-build-system)
2428 `(#:build-flags (list "build" "--tests" "true")
2430 (modify-phases %standard-phases
2431 (delete 'configure))))
2433 `(("topkg" ,ocaml-topkg)
2434 ("ocamlbuild" ,ocamlbuild)
2436 ("rresult" ,ocaml-rresult)
2438 ("alcotest" ,ocaml-alcotest)))
2439 (home-page "https://github.com/mirage/ocaml-base64")
2440 (synopsis "Base64 encoding for OCaml")
2441 (description "Base64 is a group of similar binary-to-text encoding schemes
2442 that represent binary data in an ASCII string format by translating it into a
2443 radix-64 representation. It is specified in RFC 4648.")
2444 (license license:isc)))
2446 (define-public ocaml4.02-base64
2447 (package-with-ocaml4.02 ocaml-base64))
2449 (define-public ocamlify
2455 (uri (ocaml-forge-uri name version 1209))
2458 "1f0fghvlbfryf5h3j4as7vcqrgfjb4c8abl5y0y5h069vs4kp5ii"))))
2459 (build-system ocaml-build-system)
2460 ; tests are done during build
2462 `(#:ocaml ,ocaml-4.02
2463 #:findlib ,ocaml4.02-findlib
2465 (modify-phases %standard-phases
2467 (home-page "https://forge.ocamlcore.org/projects/ocamlify")
2468 (synopsis "Include files in OCaml code")
2469 (description "OCamlify allows to create OCaml source code by including
2470 whole files into OCaml string or string list. The code generated can be
2471 compiled as a standard OCaml file. It allows embedding external resources as
2473 (license license:lgpl2.1+))); with the OCaml static compilation exception
2475 (define-public omake
2481 (uri (string-append "http://download.camlcity.org/download/"
2482 "omake-" version ".tar.gz"))
2485 "07bdg1h5i7qnlv9xq81ad5hfypl10hxm771h4rjyl5cn8plhfcgz"))
2486 (patches (search-patches "omake-fix-non-determinism.patch"))))
2487 (build-system ocaml-build-system)
2490 (list (string-append "PREFIX=" (assoc-ref %outputs "out")))
2491 #:tests? #f ; no test target
2493 (modify-phases %standard-phases
2494 (add-before 'configure 'fix-makefile
2495 (lambda* (#:key outputs #:allow-other-keys)
2496 (substitute* "mk/osconfig_unix.mk"
2497 (("CC = cc") "CC = gcc")))))))
2499 `((ocaml4.02-variant . ,(delay ocaml4.02-omake))))
2500 (native-inputs `(("hevea" ,hevea)))
2501 (home-page "http://projects.camlcity.org/projects/omake.html")
2502 (synopsis "Build system designed for scalability and portability")
2503 (description "Similar to make utilities you may have used, but it features
2504 many additional enhancements, including:
2507 @item Support for projects spanning several directories or directory hierarchies.
2508 @item Fast, reliable, automated, scriptable dependency analysis using MD5 digests,
2509 with full support for incremental builds.
2510 @item Dependency analysis takes the command lines into account — whenever the
2511 command line used to build a target changes, the target is considered
2513 @item Fully scriptable, includes a library that providing support for standard
2514 tasks in C, C++, OCaml, and LaTeX projects, or a mixture thereof.
2516 (license (list license:lgpl2.1 ; libmojave
2517 license:expat ; OMake scripts
2518 license:gpl2)))) ; OMake itself, with ocaml linking exception
2521 (define-public ocaml4.02-omake
2522 (let ((base (package-with-ocaml4.02 (strip-ocaml4.02-variant omake))))
2528 (uri (string-append "http://download.camlcity.org/download/"
2529 "omake-" version ".tar.gz"))
2532 "1znnlkpz89hk44byvnl1pr92ym6hwfyyw2qm9clq446r6l2z4m64"))
2533 (patches (search-patches "omake-fix-non-determinism.patch")))))))
2535 (define-public ocaml-batteries
2537 (name "ocaml-batteries")
2541 (uri (string-append "https://github.com/ocaml-batteries-team/"
2542 "batteries-included/releases/download/v"
2543 version "/batteries-" version ".tar.gz"))
2546 "0lkdmv2my5hirkswmci2cch341n6wkkj2q8apjhs83sg6528caxi"))))
2547 (build-system ocaml-build-system)
2549 `(("ocamlbuild" ,ocamlbuild)
2550 ("qtest" ,ocaml-qtest)
2551 ("bisect" ,ocaml-bisect)
2552 ("ounit" ,ocaml-ounit)))
2554 `(("ocaml-num" ,ocaml-num)))
2557 (modify-phases %standard-phases
2558 (delete 'check) ; tests are run by the build phase
2560 (lambda* (#:key inputs outputs #:allow-other-keys)
2563 (substring str 0 (- (string-length str) 1)))
2565 (find-files "src" ".*.mliv")
2566 (find-files "src" ".*.mlv")
2567 (find-files "src" ".*.mlp")))))
2568 (apply invoke "ocamlbuild" "-no-links" "-use-ocamlfind" "-I" "num"
2569 "-lflag" "-dllpath-all" files)
2570 (for-each (lambda (file)
2571 (copy-file (string-append "_build/" file) file))
2573 (invoke "ocamlbuild" "-no-links" "-use-ocamlfind" "-I" "num"
2574 "-lflag" "-dllpath-all" "build/mkconf.byte")
2575 (copy-file "_build/build/mkconf.byte" "build/mkconf.byte")
2576 (invoke "make" "all")
2579 `((ocaml4.01-variant . ,(delay ocaml4.01-batteries))
2580 (ocaml4.02-variant . ,(delay ocaml4.02-batteries))))
2581 (home-page "http://batteries.forge.ocamlcore.org/")
2582 (synopsis "Development platform for the OCaml programming language")
2583 (description "Define a standard set of libraries which may be expected on
2584 every compliant installation of OCaml and organize these libraries into a
2585 hierarchy of modules.")
2586 (license license:lgpl2.1+)))
2588 (define-public ocaml4.02-batteries
2589 (let ((base (package-with-ocaml4.02 (strip-ocaml4.02-variant ocaml-batteries))))
2595 (uri (ocaml-forge-uri "batteries" version 1650))
2598 "1a97w3x2l1jr5x9kj5gqm1x6b0q9fjqdcsvls7arnl3bvzgsia0n"))))
2599 (propagated-inputs '()))))
2601 (define-public ocaml4.01-batteries
2602 (let ((base (package-with-ocaml4.01 (strip-ocaml4.01-variant ocaml4.02-batteries))))
2605 (name "ocaml4.01-batteries"))))
2607 (define-public ocaml-pcre
2613 (uri (string-append "https://github.com/mmottl/pcre-ocaml/archive"
2614 "/v" version ".tar.gz"))
2615 (file-name (string-append name "-" version ".tar.gz"))
2618 "0rj6dw79px4sj2kq0iss2nzq3rnsn9wivvc0f44wa1mppr6njfb3"))))
2619 (build-system ocaml-build-system)
2622 (modify-phases %standard-phases
2623 (add-after 'install 'link-lib
2624 (lambda* (#:key outputs #:allow-other-keys)
2625 (let* ((out (assoc-ref outputs "out"))
2626 (stubs (string-append out "/lib/ocaml/site-lib/stubslibs"))
2627 (lib (string-append out "/lib/ocaml/site-lib/pcre")))
2629 (symlink (string-append lib "/dllpcre_stubs.so")
2630 (string-append stubs "/dllpcre_stubs.so")))
2633 `(("batteries" ,ocaml-batteries)
2634 ("ocamlbuild" ,ocamlbuild)
2635 ("pcre:bin" ,pcre "bin")))
2636 (propagated-inputs `(("pcre" ,pcre)))
2637 (home-page "https://mmottl.github.io/pcre-ocaml")
2638 (synopsis "Bindings to the Perl Compatibility Regular Expressions library")
2639 (description "Pcre-ocaml offers library functions for string pattern
2640 matching and substitution, similar to the functionality offered by the Perl
2642 (license license:lgpl2.1+))); with the OCaml link exception
2644 (define-public ocaml4.02-pcre
2645 (package-with-ocaml4.02 ocaml-pcre))
2647 (define-public ocaml-expect
2649 (name "ocaml-expect")
2653 (uri (ocaml-forge-uri name version 1736))
2656 "098qvg9d4yrqzr5ax291y3whrpax0m3sx4gi6is0mblc96r9yqk0"))))
2659 (build-system ocaml-build-system)
2661 `(("ocamlbuild" ,ocamlbuild)
2662 ("ocaml-num" ,ocaml-num)
2663 ("ocaml-pcre" ,ocaml-pcre)
2664 ("ounit" ,ocaml-ounit)))
2665 (propagated-inputs `(("batteries" ,ocaml-batteries)))
2666 (home-page "https://forge.ocamlcore.org/projects/ocaml-expect/")
2667 (synopsis "Simple implementation of expect")
2668 (description "Help building unitary testing of interactive program. You
2669 can match the question using a regular expression or a timeout.")
2670 (license license:lgpl2.1+))) ; with the OCaml static compilation exception
2672 (define-public ocaml4.02-fileutils
2674 (name "ocaml4.02-fileutils")
2678 (uri (ocaml-forge-uri name version 1728))
2681 "1rc4cqlvdhbs55i85zfbfhz938fsy4fj6kwlkfm3ra7bpwn8bmpd"))))
2682 (build-system ocaml-build-system)
2684 `(#:ocaml ,ocaml-4.02
2685 #:findlib ,ocaml4.02-findlib))
2687 `(("ounit" ,ocaml4.02-ounit)))
2688 (home-page "http://ocaml-fileutils.forge.ocamlcore.org")
2689 (synopsis "Pure OCaml functions to manipulate real file and filename")
2690 (description "Library to provide pure OCaml functions to manipulate real
2691 file (POSIX like) and filename.")
2692 (license license:lgpl2.1+))) ; with the OCaml static compilation exception
2694 (define-public ocaml-oasis
2696 (name "ocaml-oasis")
2700 (uri (ocaml-forge-uri name version 1757))
2703 "0bn13mzfa98dq3y0jwzzndl55mnywaxv693z6f1rlvpdykp3vdqq"))
2704 (modules '((guix build utils)))
2707 (substitute* "test/test-main/Test.ml"
2708 ;; most of these tests fail because ld cannot find crti.o, but according
2709 ;; to the log file, the environment variables {LD_,}LIBRARY_PATH
2710 ;; are set correctly when LD_LIBRARY_PATH is defined beforhand.
2711 (("TestBaseCompat.tests;") "")
2712 (("TestExamples.tests;") "")
2713 (("TestFull.tests;") "")
2714 (("TestPluginDevFiles.tests;") "")
2715 (("TestPluginInternal.tests;") "")
2716 (("TestPluginOCamlbuild.tests;") "")
2717 (("TestPluginOMake.tests;") ""))
2719 (build-system ocaml-build-system)
2723 `(("ocamlbuild" ,ocamlbuild)
2724 ("ocamlify" ,ocamlify)
2725 ("ocamlmod" ,ocamlmod)))
2726 (home-page "https://oasis.forge.ocamlcore.org")
2727 (synopsis "Integrates a configure, build, install system in OCaml projects")
2728 (description "OASIS is a tool to integrate a configure, build and install
2729 system in your OCaml projects. It helps to create standard entry points in your
2730 build system and allows external tools to analyse your project easily.")
2731 (license license:lgpl2.1+))) ; with ocaml static compilation exception
2733 (define-public ocaml4.02-oasis
2734 (package-with-ocaml4.02 ocaml-oasis))
2736 (define-public ocaml-js-build-tools
2738 (name "ocaml-js-build-tools")
2739 (version "113.33.06")
2740 (source (janestreet-origin "js-build-tools" version
2741 "0r8z4fz8iy5y6hkdlkpwf6rk4qigcr3dzyv35585xgg2ahf12zy6"))
2743 `(("oasis" ,ocaml-oasis)
2744 ("ocamlbuild" ,ocamlbuild)
2746 (build-system ocaml-build-system)
2747 (arguments janestreet-arguments)
2748 (home-page "https://github.com/janestreet/js-build-tools")
2749 (synopsis "Collection of tools to help building Jane Street Packages")
2750 (description "This package contains tools to help building Jane Street
2751 packages, but can be used for other purposes. It contains:
2753 @item an @command{oasis2opam-install} tool to produce a @file{.install} file
2754 from the oasis build log
2755 @item a @code{js_build_tools} ocamlbuild plugin with various goodies.
2757 (license license:asl2.0)))
2759 (define-public ocaml4.02-js-build-tools
2760 (package-with-ocaml4.02 ocaml-js-build-tools))
2762 (define-public ocaml4.02-bin-prot
2764 (name "ocaml4.02-bin-prot")
2765 (version "113.33.03")
2766 (source (janestreet-origin "bin_prot" version
2767 "1ws8c017z8nbj3vw92ndvjk9011f71rmp3llncbv8r5fc76wqv3l"))
2768 (build-system ocaml-build-system)
2770 `(("js-build-tools" ,ocaml4.02-js-build-tools)
2773 (ensure-keyword-arguments janestreet-arguments
2774 `(#:ocaml ,ocaml-4.02
2775 #:findlib ,ocaml4.02-findlib)))
2776 (home-page "https://github.com/janestreet/bin_prot/")
2777 (synopsis "Binary protocol generator")
2778 (description "This library contains functionality for reading and writing
2779 OCaml-values in a type-safe binary protocol. It is extremely efficient,
2780 typically supporting type-safe marshalling and unmarshalling of even highly
2781 structured values at speeds sufficient to saturate a gigabit connection. The
2782 protocol is also heavily optimized for size, making it ideal for long-term
2783 storage of large amounts of data.")
2784 (license license:asl2.0)))
2786 (define-public ocaml4.02-fieldslib
2788 (name "ocaml4.02-fieldslib")
2789 (version "113.33.03")
2790 (source (janestreet-origin "fieldslib" version
2791 "1rm3bn54bzk2hlq8f3w067ak8s772w4a8f78i3yh79vxfzq8ncvv"))
2792 (build-system ocaml-build-system)
2794 `(("js-build-tools" ,ocaml4.02-js-build-tools)
2797 (ensure-keyword-arguments janestreet-arguments
2798 `(#:ocaml ,ocaml-4.02
2799 #:findlib ,ocaml4.02-findlib)))
2800 (home-page "https://github.com/janestreet/fieldslib/")
2801 (synopsis "Syntax extension to record fields")
2802 (description "Syntax extension to define first class values representing
2803 record fields, to get and set record fields, iterate and fold over all fields
2804 of a record and create new record values.")
2805 (license license:asl2.0)))
2807 (define-public ocaml4.02-ppx-core
2809 (name "ocaml4.02-ppx-core")
2810 (version "113.33.03")
2811 (source (janestreet-origin "ppx_core" version
2812 "0f69l4czhgssnhb5ds2j9dbqjyz8dp1y3i3x0i4h6pxnms20zbxa"))
2813 (build-system ocaml-build-system)
2815 `(("js-build-tools" ,ocaml4.02-js-build-tools)
2817 (inputs `(("ppx-tools" ,ocaml4.02-ppx-tools)))
2819 (ensure-keyword-arguments janestreet-arguments
2820 `(#:ocaml ,ocaml-4.02
2821 #:findlib ,ocaml4.02-findlib)))
2822 (home-page "https://github.com/janestreet/ppx_core/")
2823 (synopsis "Standard library for ppx rewriters")
2824 (description "Ppx_core is a standard library for OCaml AST transformers.
2827 @item various auto-generated AST traversal using an open recursion scheme
2828 @item helpers for building AST fragments
2829 @item helpers for matching AST fragments
2830 @item a framework for dealing with attributes and extension points.
2832 (license license:asl2.0)))
2834 (define-public ocaml4.02-ppx-optcomp
2836 (name "ocaml4.02-ppx-optcomp")
2837 (version "113.33.03")
2838 (source (janestreet-origin "ppx_optcomp" version
2839 "13an8p2r7sd0d5lv54mlzrxdni47408bwqi3bjcx4m6005170q30"))
2840 (build-system ocaml-build-system)
2842 `(("js-build-tools" ,ocaml4.02-js-build-tools)
2845 `(("ppx-tools" ,ocaml4.02-ppx-tools)
2846 ("ppx-core" ,ocaml4.02-ppx-core)))
2848 (ensure-keyword-arguments janestreet-arguments
2849 `(#:ocaml ,ocaml-4.02
2850 #:findlib ,ocaml4.02-findlib)))
2851 (home-page "https://github.com/janestreet/ppx_optcomp/")
2852 (synopsis "Optional compilation for OCaml")
2853 (description "Ppx_optcomp stands for Optional Compilation. It is a tool
2854 used to handle optional compilations of pieces of code depending of the word
2855 size, the version of the compiler, ...")
2856 (license license:asl2.0)))
2858 (define-public ocaml4.02-ppx-driver
2860 (name "ocaml4.02-ppx-driver")
2861 (version "113.33.03")
2862 (source (janestreet-origin "ppx_driver" version
2863 "011zzr45897j49b7iiybb29k7pspcx36mlnp7nh6pxb8b0ga76fh"))
2864 (build-system ocaml-build-system)
2866 `(("js-build-tools" ,ocaml4.02-js-build-tools)
2868 ("ppx-optcomp" ,ocaml4.02-ppx-optcomp)))
2870 `(("ppx-optcomp" ,ocaml4.02-ppx-optcomp)
2871 ("ppx-core" ,ocaml4.02-ppx-core)))
2873 (ensure-keyword-arguments janestreet-arguments
2874 `(#:ocaml ,ocaml-4.02
2875 #:findlib ,ocaml4.02-findlib)))
2876 (home-page "https://github.com/janestreet/ppx_driver/")
2877 (synopsis "Feature-full driver for OCaml AST transformers")
2878 (description "A driver is an executable created from a set of OCaml AST
2879 transformers linked together with a command line frontend. The aim is to
2880 provide a tool that can be used to:
2882 @item easily view the pre-processed version of a file, no need to construct a
2883 complex command line: @command{ppx file.ml} will do
2884 @item use a single executable to run several transformations: no need to fork
2885 many times just for pre-processing
2886 @item improved errors for misspelled/misplaced attributes and extension points.
2888 (license license:asl2.0)))
2890 (define-public ocaml-cppo
2897 (uri (string-append "https://github.com/mjambon/cppo/archive/v" version
2900 "1dkm3d5h6h56y937gcdk2wixlpzl59vv5pmiafglr89p20kf7gqf"))
2901 (file-name (string-append name "-" version ".tar.gz"))))
2902 (build-system dune-build-system)
2905 #:build-flags (list "--profile" "release")))
2907 `(("ocamlbuild" ,ocamlbuild)))
2908 (home-page "https://github.com/mjambon/cppo")
2909 (synopsis "Equivalent of the C preprocessor for OCaml programs")
2910 (description "Cppo is an equivalent of the C preprocessor for OCaml
2911 programs. It allows the definition of simple macros and file inclusion. Cpp ois:
2913 @item more OCaml-friendly than cpp
2914 @item easy to learn without consulting a manual
2915 @item reasonably fast
2916 @item simple to install and to maintain.
2918 (license license:bsd-3)))
2920 (define-public ocaml4.02-cppo
2921 (package-with-ocaml4.02 ocaml-cppo))
2923 ;; this package is not reproducible. This is related to temporary filenames
2924 ;; such as findlib_initxxxxx where xxxxx is random.
2925 (define-public ocaml4.02-ppx-deriving
2927 (name "ocaml4.02-ppx-deriving")
2932 (uri (string-append "https://github.com/whitequark/ppx_deriving//archive/v"
2935 "1fr16g121j6zinwcprzlhx2py4271n9jzs2m9hq2f3qli2b1p0vl"))
2936 (file-name (string-append name "-" version ".tar.gz"))))
2937 (build-system ocaml-build-system)
2939 `(("js-build-tools" ,ocaml4.02-js-build-tools)
2940 ("cppo" ,ocaml4.02-cppo)
2941 ("ounit" ,ocaml4.02-ounit)
2944 `(("result" ,ocaml4.02-result)
2945 ("ppx-tools" ,ocaml4.02-ppx-tools)))
2947 `(#:ocaml ,ocaml-4.02
2948 #:findlib ,ocaml4.02-findlib
2950 (modify-phases %standard-phases
2952 (add-before 'install 'fix-environment
2953 (lambda* (#:key outputs #:allow-other-keys)
2954 ;; the installation procedures looks for the installed module
2956 (string-append (getenv "OCAMLPATH") ":"
2957 (getenv "OCAMLFIND_DESTDIR"))))))))
2958 (home-page "https://github.com/whitequark/ppx_deriving/")
2959 (synopsis "Type-driven code generation for OCaml >=4.02")
2960 (description "Ppx_deriving provides common infrastructure for generating
2961 code based on type definitions, and a set of useful plugins for common tasks.")
2962 (license license:expat)))
2964 (define-public ocaml4.02-ppx-type-conv
2966 (name "ocaml4.02-ppx-type-conv")
2967 (version "113.33.03")
2969 (janestreet-origin "ppx_type_conv" version
2970 "1sp602ads2f250nv4d4rgw54d14k7flyhb4w8ff084f657hhmxv2"))
2971 (build-system ocaml-build-system)
2973 `(("js-build-tools" ,ocaml4.02-js-build-tools)
2976 `(("ppx-deriving" ,ocaml4.02-ppx-deriving)
2977 ("ppx-core" ,ocaml4.02-ppx-core)
2978 ("ppx-driver" ,ocaml4.02-ppx-driver)))
2980 (ensure-keyword-arguments janestreet-arguments
2981 `(#:ocaml ,ocaml-4.02
2982 #:findlib ,ocaml4.02-findlib)))
2983 (home-page "https://github.com/janestreet/ppx_type_conv/")
2984 (synopsis "Support Library for type-driven code generators")
2985 (description "The type_conv library factors out functionality needed by
2986 different preprocessors that generate code from type specifications.")
2987 (license license:asl2.0)))
2989 (define-public ocaml4.02-ppx-inline-test
2991 (name "ocaml4.02-ppx-inline-test")
2992 (version "113.33.03")
2993 (source (janestreet-origin "ppx_inline_test" version
2994 "0859ni43fl39dd5g6cxfhq0prxmx59bd2bfq8jafp593ba4q0icq"))
2995 (build-system ocaml-build-system)
2997 `(("js-build-tools" ,ocaml4.02-js-build-tools)
2999 ("ppx-core" ,ocaml4.02-ppx-core)))
3001 `(("ppx-driver" ,ocaml4.02-ppx-driver)
3002 ("ppx-tools" ,ocaml4.02-ppx-tools)
3003 ("ppx-core" ,ocaml4.02-ppx-core)))
3005 (ensure-keyword-arguments janestreet-arguments
3006 `(#:ocaml ,ocaml-4.02
3007 #:findlib ,ocaml4.02-findlib)))
3008 (home-page "https://github.com/janestreet/ppx_inline_test/")
3009 (synopsis "Syntax extension for writing in-line tests in ocaml code")
3010 (description "Syntax extension for writing in-line tests in ocaml code.")
3011 (license license:asl2.0)))
3013 (define-public ocaml4.02-ppx-bench
3015 (name "ocaml4.02-ppx-bench")
3016 (version "113.33.03")
3017 (source (janestreet-origin "ppx_bench" version
3018 "1hky3y17qpb925rymf97wv54di9gaqdmkix7wpkjw14qzl512b68"))
3019 (build-system ocaml-build-system)
3021 `(("js-build-tools" ,ocaml4.02-js-build-tools)
3023 ("ppx-core" ,ocaml4.02-ppx-core)))
3025 `(("ppx-driver" ,ocaml4.02-ppx-driver)
3026 ("ppx-tools" ,ocaml4.02-ppx-tools)
3027 ("ppx-inline-test" ,ocaml4.02-ppx-inline-test)
3028 ("ppx-core" ,ocaml4.02-ppx-core)))
3030 (ensure-keyword-arguments janestreet-arguments
3031 `(#:ocaml ,ocaml-4.02
3032 #:findlib ,ocaml4.02-findlib)))
3033 (home-page "https://github.com/janestreet/ppx_bench/")
3034 (synopsis "Syntax extension for writing in-line benchmarks in ocaml code")
3035 (description "Syntax extension for writing in-line benchmarks in ocaml code.")
3036 (license license:asl2.0)))
3038 (define-public ocaml4.02-ppx-compare
3040 (name "ocaml4.02-ppx-compare")
3041 (version "113.33.03")
3042 (source (janestreet-origin "ppx_compare" version
3043 "0bfhi33kq9l4q6zzc6svki2csracz5j4731c3npcy6cs73jynn0z"))
3044 (build-system ocaml-build-system)
3046 `(("js-build-tools" ,ocaml4.02-js-build-tools)
3048 ("ppx-core" ,ocaml4.02-ppx-core)))
3050 `(("ppx-driver" ,ocaml4.02-ppx-driver)
3051 ("ppx-tools" ,ocaml4.02-ppx-tools)
3052 ("ppx-core" ,ocaml4.02-ppx-core)
3053 ("ppx-type-conv" ,ocaml4.02-ppx-type-conv)))
3055 (ensure-keyword-arguments janestreet-arguments
3056 `(#:ocaml ,ocaml-4.02
3057 #:findlib ,ocaml4.02-findlib)))
3058 (home-page "https://github.com/janestreet/ppx_compare/")
3059 (synopsis "Generation of comparison functions from types")
3060 (description "Generation of fast comparison functions from type expressions
3061 and definitions. Ppx_compare is a ppx rewriter that derives comparison functions
3062 from type representations. The scaffolded functions are usually much faster
3063 than ocaml's Pervasives.compare. Scaffolding functions also gives you more
3064 flexibility by allowing you to override them for a specific type and more safety
3065 by making sure that you only compare comparable values.")
3066 (license license:asl2.0)))
3068 (define-public ocaml4.02-sexplib
3070 (name "ocaml4.02-sexplib")
3071 (version "113.33.03")
3072 (source (janestreet-origin "sexplib" version
3073 "1ffjmj8if9lyv965cgn2ld1xv7g52qsr8mqflbm515ck1i8l2ima"))
3074 (build-system ocaml-build-system)
3076 `(("js-build-tools" ,ocaml4.02-js-build-tools)
3079 (ensure-keyword-arguments janestreet-arguments
3080 `(#:ocaml ,ocaml-4.02
3081 #:findlib ,ocaml4.02-findlib)))
3082 (home-page "https://github.com/janestreet/sexplib/")
3083 (synopsis "Library for serializing OCaml values to and from S-expressions")
3084 (description "Sexplib contains functionality for parsing and pretty-printing
3086 (license license:asl2.0)))
3088 (define-public ocaml4.02-typerep
3090 (name "ocaml4.02-typerep")
3091 (version "113.33.03")
3092 (source (janestreet-origin "typerep" version
3093 "1b9v5bmi824a9d4sx0f40ixq0yfcbiqxafg4a1jx95xg9199zafy"))
3094 (build-system ocaml-build-system)
3096 `(("js-build-tools" ,ocaml4.02-js-build-tools)
3099 (ensure-keyword-arguments janestreet-arguments
3100 `(#:ocaml ,ocaml-4.02
3101 #:findlib ,ocaml4.02-findlib)))
3102 (home-page "https://github.com/janestreet/typerep/")
3103 (synopsis "Typerep is a library for runtime types")
3104 (description "Typerep is a library for runtime types.")
3105 (license license:asl2.0)))
3107 (define-public ocaml4.02-variantslib
3109 (name "ocaml4.02-variantslib")
3110 (version "113.33.03")
3111 (source (janestreet-origin "variantslib" version
3112 "05vp799vl38fvl98ga5miwbzh09cnnpapi6q6gdvwyqi6w7s919n"))
3113 (build-system ocaml-build-system)
3115 `(("js-build-tools" ,ocaml4.02-js-build-tools)
3118 (ensure-keyword-arguments janestreet-arguments
3119 `(#:ocaml ,ocaml-4.02
3120 #:findlib ,ocaml4.02-findlib)))
3121 (home-page "https://github.com/janestreet/variantslib")
3122 (synopsis "OCaml variants as first class values")
3123 (description "OCaml variants as first class values.")
3124 (license license:asl2.0)))
3126 (define-public ocaml4.02-ppx-sexp-conv
3128 (name "ocaml4.02-ppx-sexp-conv")
3129 (version "113.33.03")
3130 (source (janestreet-origin "ppx_sexp_conv" version
3131 "1rbj6d5dl625gdxih34xcrdvikci6h8i2dl9x3wraa4qrgishiw7"))
3132 (build-system ocaml-build-system)
3134 `(("js-build-tools" ,ocaml4.02-js-build-tools)
3136 ("ppx-core" ,ocaml4.02-ppx-core)))
3138 `(("sexplib" ,ocaml4.02-sexplib)
3139 ("ppx-core" ,ocaml4.02-ppx-core)
3140 ("ppx-type-conv" ,ocaml4.02-ppx-type-conv)
3141 ("ppx-tools" ,ocaml4.02-ppx-tools)))
3143 (ensure-keyword-arguments janestreet-arguments
3144 `(#:ocaml ,ocaml-4.02
3145 #:findlib ,ocaml4.02-findlib)))
3146 (home-page "https://github.com/janestreet/ppx_sexp_conv")
3147 (synopsis "Generation of S-expression conversion functions from type definitions")
3148 (description "Generation of S-expression conversion functions from type
3150 (license license:asl2.0)))
3152 (define-public ocaml4.02-ppx-variants-conv
3154 (name "ocaml4.02-ppx-variants-conv")
3155 (version "113.33.03")
3156 (source (janestreet-origin "ppx_variants_conv" version
3157 "0vnn2l1118cj72413d3f7frlw6yc09l8f64jlzkzbgb9bxpalx34"))
3158 (build-system ocaml-build-system)
3160 `(("js-build-tools" ,ocaml4.02-js-build-tools)
3163 `(("ppx-core" ,ocaml4.02-ppx-core)
3164 ("variantslib" ,ocaml4.02-variantslib)
3165 ("ppx-tools" ,ocaml4.02-ppx-tools)
3166 ("ppx-type-conv" ,ocaml4.02-ppx-type-conv)))
3168 (ensure-keyword-arguments janestreet-arguments
3169 `(#:ocaml ,ocaml-4.02
3170 #:findlib ,ocaml4.02-findlib)))
3171 (home-page "https://github.com/janestreet/ppx_variants_conv")
3172 (synopsis "Generation of accessor and iteration functions for ocaml variant
3174 (description "Generation of accessor and iteration functions for ocaml
3176 (license license:asl2.0)))
3178 (define-public ocaml4.02-ppx-here
3180 (name "ocaml4.02-ppx-here")
3181 (version "113.33.03")
3182 (source (janestreet-origin "ppx_here" version
3183 "1ay8lfxi0qg3ib2zkwh4h0vqk3gjmxaz572gzab0bbxyqn3z86v7"))
3184 (build-system ocaml-build-system)
3186 `(("js-build-tools" ,ocaml4.02-js-build-tools)
3189 `(("ppx-driver" ,ocaml4.02-ppx-driver)
3190 ("ppx-core" ,ocaml4.02-ppx-core)))
3192 (ensure-keyword-arguments janestreet-arguments
3193 `(#:ocaml ,ocaml-4.02
3194 #:findlib ,ocaml4.02-findlib)))
3195 (home-page "https://github.com/janestreet/ppx_here")
3196 (synopsis "Expands [%here] into its location")
3197 (description "Expands [%here] into its location.")
3198 (license license:asl2.0)))
3200 (define-public ocaml4.02-ppx-assert
3202 (name "ocaml4.02-ppx-assert")
3203 (version "113.33.03")
3204 (source (janestreet-origin "ppx_assert" version
3205 "1k5kxmqkibp5fk25pgz81f3c1r4mgvb5byzf6bnmxd24y60wn46p"))
3206 (build-system ocaml-build-system)
3208 `(("js-build-tools" ,ocaml4.02-js-build-tools)
3211 `(("ppx-compare" ,ocaml4.02-ppx-compare)
3212 ("ppx-core" ,ocaml4.02-ppx-core)
3213 ("ppx-driver" ,ocaml4.02-ppx-driver)
3214 ("ppx-sexp-conv" ,ocaml4.02-ppx-sexp-conv)
3215 ("ppx-tools" ,ocaml4.02-ppx-tools)
3216 ("ppx-type-conv" ,ocaml4.02-ppx-type-conv)
3217 ("ppx-sexplib" ,ocaml4.02-sexplib)
3218 ("ppx-here" ,ocaml4.02-ppx-here)))
3220 (ensure-keyword-arguments janestreet-arguments
3221 `(#:ocaml ,ocaml-4.02
3222 #:findlib ,ocaml4.02-findlib)))
3223 (home-page "https://github.com/janestreet/ppx_assert")
3224 (synopsis "Assert-like extension nodes that raise useful errors on failure")
3225 (description "Assert-like extension nodes that raise useful errors on failure.")
3226 (license license:asl2.0)))
3228 (define-public ocaml4.02-ppx-enumerate
3230 (name "ocaml4.02-ppx-enumerate")
3231 (version "113.33.03")
3232 (source (janestreet-origin "ppx_enumerate" version
3233 "15g7yfv9wg2h9r6k6q1zrhygmsl4xrfn25mrb0i4czjjivzmxjh4"))
3234 (build-system ocaml-build-system)
3236 `(("js-build-tools" ,ocaml4.02-js-build-tools)
3239 `(("ppx-tools" ,ocaml4.02-ppx-tools)
3240 ("ppx-type-conv" ,ocaml4.02-ppx-type-conv)
3241 ("ppx-core" ,ocaml4.02-ppx-core)))
3243 (ensure-keyword-arguments janestreet-arguments
3244 `(#:ocaml ,ocaml-4.02
3245 #:findlib ,ocaml4.02-findlib)))
3246 (home-page "https://github.com/janestreet/ppx_enumerate")
3247 (synopsis "Generate a list containing all values of a finite type")
3248 (description "Ppx_enumerate is a ppx rewriter which generates a definition
3249 for the list of all values of a type (for a type which only has finitely
3251 (license license:asl2.0)))
3253 (define-public ocaml4.02-ppx-let
3255 (name "ocaml4.02-ppx-let")
3256 (version "113.33.03")
3257 (source (janestreet-origin "ppx_let" version
3258 "0gd6d3gdaqfwjcs7gaw1qxc30i584q6a86ndaj1bx1q63xqd6yx9"))
3259 (build-system ocaml-build-system)
3261 `(("js-build-tools" ,ocaml4.02-js-build-tools)
3264 `(("ppx-driver" ,ocaml4.02-ppx-driver)
3265 ("ppx-core" ,ocaml4.02-ppx-core)))
3267 (ensure-keyword-arguments janestreet-arguments
3268 `(#:ocaml ,ocaml-4.02
3269 #:findlib ,ocaml4.02-findlib)))
3270 (home-page "https://github.com/janestreet/ppx_let")
3271 (synopsis "Monadic let-bindings")
3272 (description "A ppx rewriter for monadic and applicative let bindings,
3273 match expressions, and if expressions.")
3274 (license license:asl2.0)))
3276 (define-public ocaml4.02-ppx-typerep-conv
3278 (name "ocaml4.02-ppx-typerep-conv")
3279 (version "113.33.03")
3280 (source (janestreet-origin "ppx_typerep_conv" version
3281 "0g0xqm9s1b2jjvxb8yp69281q2s3bwz6sibn10fvgcdawpa0rmrg"))
3282 (build-system ocaml-build-system)
3284 `(("js-build-tools" ,ocaml4.02-js-build-tools)
3287 `(("ppx-tools" ,ocaml4.02-ppx-tools)
3288 ("ppx-type-conv" ,ocaml4.02-ppx-type-conv)
3289 ("ppx-core" ,ocaml4.02-ppx-core)
3290 ("typerep" ,ocaml4.02-typerep)))
3292 (ensure-keyword-arguments janestreet-arguments
3293 `(#:ocaml ,ocaml-4.02
3294 #:findlib ,ocaml4.02-findlib)))
3295 (home-page "https://github.com/janestreet/ppx_typerep_conv")
3296 (synopsis "Generation of runtime types from type declarations")
3297 (description "Automatic generation of runtime types from type definitions.")
3298 (license license:asl2.0)))
3300 (define-public ocaml4.02-ppx-sexp-value
3302 (name "ocaml4.02-ppx-sexp-value")
3303 (version "113.33.03")
3304 (source (janestreet-origin "ppx_sexp_value" version
3305 "0m3ag23mbqm0i2pv1dzilfks15ipa5q60mf57a0cd3p0pvarq10g"))
3306 (build-system ocaml-build-system)
3308 `(("js-build-tools" ,ocaml4.02-js-build-tools)
3311 `(("ppx-driver" ,ocaml4.02-ppx-driver)
3312 ("ppx-here" ,ocaml4.02-ppx-here)
3313 ("ppx-sexp-conv" ,ocaml4.02-ppx-sexp-conv)
3314 ("ppx-tools" ,ocaml4.02-ppx-tools)
3315 ("ppx-core" ,ocaml4.02-ppx-core)))
3317 (ensure-keyword-arguments janestreet-arguments
3318 `(#:ocaml ,ocaml-4.02
3319 #:findlib ,ocaml4.02-findlib)))
3320 (home-page "https://github.com/janestreet/ppx_sexp_value/")
3321 (synopsis "Simplify building s-expressions from ocaml values")
3322 (description "A ppx rewriter that simplifies building s-expressions from
3324 (license license:asl2.0)))
3326 (define-public ocaml4.02-ppx-pipebang
3328 (name "ocaml4.02-ppx-pipebang")
3329 (version "113.33.03")
3330 (source (janestreet-origin "ppx_pipebang" version
3331 "1965c7hymp26ncmjs0pfxi2s5jlj60z2c9b194lgcwxqiav56pcw"))
3332 (build-system ocaml-build-system)
3334 `(("js-build-tools" ,ocaml4.02-js-build-tools)
3337 `(("ppx-driver" ,ocaml4.02-ppx-driver)
3338 ("ppx-tools" ,ocaml4.02-ppx-tools)
3339 ("ppx-core" ,ocaml4.02-ppx-core)))
3341 (ensure-keyword-arguments janestreet-arguments
3342 `(#:ocaml ,ocaml-4.02
3343 #:findlib ,ocaml4.02-findlib)))
3344 (home-page "https://github.com/janestreet/ppx_pipebang/")
3345 (synopsis "Inline reverse application operators `|>` and `|!`")
3346 (description "A ppx rewriter that inlines reverse application operators
3347 @code{|>} and @code{|!}.")
3348 (license license:asl2.0)))
3350 (define-public ocaml4.02-ppx-bin-prot
3352 (name "ocaml4.02-ppx-bin-prot")
3353 (version "113.33.03")
3354 (source (janestreet-origin "ppx_bin_prot" version
3355 "173kjv36giik11zgfvsbzwfbpr66dm2pcha9vf990jgzh8hqz39h"))
3356 (build-system ocaml-build-system)
3358 `(("js-build-tools" ,ocaml4.02-js-build-tools)
3361 `(("bin-prot" ,ocaml4.02-bin-prot)
3362 ("ppx-tools" ,ocaml4.02-ppx-tools)
3363 ("ppx-type-conv" ,ocaml4.02-ppx-type-conv)
3364 ("ppx-core" ,ocaml4.02-ppx-core)))
3366 (ensure-keyword-arguments janestreet-arguments
3367 `(#:ocaml ,ocaml-4.02
3368 #:findlib ,ocaml4.02-findlib)))
3369 (home-page "https://github.com/janestreet/ppx_bin_prot/")
3370 (synopsis "Generation of bin_prot readers and writers from types")
3371 (description "Generation of binary serialization and deserialization
3372 functions from type definitions.")
3373 (license license:asl2.0)))
3375 (define-public ocaml4.02-ppx-fail
3377 (name "ocaml4.02-ppx-fail")
3378 (version "113.33.03")
3379 (source (janestreet-origin "ppx_fail" version
3380 "1dwgad0f05gqp5rnwf9dcasidpfi7q3mrpazsw3a2vijjblbhjgn"))
3381 (build-system ocaml-build-system)
3383 `(("js-build-tools" ,ocaml4.02-js-build-tools)
3386 `(("ppx-driver" ,ocaml4.02-ppx-driver)
3387 ("ppx-tools" ,ocaml4.02-ppx-tools)
3388 ("ppx-here" ,ocaml4.02-ppx-here)
3389 ("ppx-core" ,ocaml4.02-ppx-core)))
3391 (ensure-keyword-arguments janestreet-arguments
3392 `(#:ocaml ,ocaml-4.02
3393 #:findlib ,ocaml4.02-findlib)))
3394 (home-page "https://github.com/janestreet/ppx_fail/")
3395 (synopsis "Add location to calls to failwiths")
3396 (description "Syntax extension that makes [failwiths] always include a
3398 (license license:asl2.0)))
3400 (define-public ocaml4.02-ppx-custom-printf
3402 (name "ocaml4.02-ppx-custom-printf")
3403 (version "113.33.03")
3404 (source (janestreet-origin "ppx_custom_printf" version
3405 "11jlx0n87g2j1vyyp343dibx7lvvwig5j5q0nq0b80kbsq0k6yr8"))
3406 (build-system ocaml-build-system)
3408 `(("js-build-tools" ,ocaml4.02-js-build-tools)
3411 `(("ppx-sexp-conv" ,ocaml4.02-ppx-sexp-conv)
3412 ("ppx-tools" ,ocaml4.02-ppx-tools)
3413 ("ppx-core" ,ocaml4.02-ppx-core)
3414 ("ppx-driver" ,ocaml4.02-ppx-driver)))
3416 (ensure-keyword-arguments janestreet-arguments
3417 `(#:ocaml ,ocaml-4.02
3418 #:findlib ,ocaml4.02-findlib)))
3419 (home-page "https://github.com/janestreet/ppx_custom_printf/")
3420 (synopsis "Printf-style format-strings for user-defined string conversion")
3421 (description "Extensions to printf-style format-strings for user-defined
3422 string conversion.")
3423 (license license:asl2.0)))
3425 (define-public ocaml4.02-ppx-sexp-message
3427 (name "ocaml4.02-ppx-sexp-message")
3428 (version "113.33.03")
3429 (source (janestreet-origin "ppx_sexp_message" version
3430 "084w1l3gnyw4ri9vbn7bv9b2xkw1520qczfxpxdarfivdrz8xr68"))
3431 (build-system ocaml-build-system)
3433 `(("js-build-tools" ,ocaml4.02-js-build-tools)
3436 `(("ppx-driver" ,ocaml4.02-ppx-driver)
3437 ("ppx-here" ,ocaml4.02-ppx-here)
3438 ("ppx-sexp-conv" ,ocaml4.02-ppx-sexp-conv)
3439 ("ppx-tools" ,ocaml4.02-ppx-tools)
3440 ("ppx-core" ,ocaml4.02-ppx-core)))
3442 (ensure-keyword-arguments janestreet-arguments
3443 `(#:ocaml ,ocaml-4.02
3444 #:findlib ,ocaml4.02-findlib)))
3445 (home-page "https://github.com/janestreet/ppx_sexp_message/")
3446 (synopsis "A ppx rewriter for easy construction of s-expressions")
3447 (description "Ppx_sexp_message aims to ease the creation of s-expressions
3448 in OCaml. This is mainly motivated by writing error and debugging messages,
3449 where one needs to construct a s-expression based on various element of the
3450 context such as function arguments.")
3451 (license license:asl2.0)))
3453 (define-public ocaml4.02-ppx-fields-conv
3455 (name "ocaml4.02-ppx-fields-conv")
3456 (version "113.33.03")
3457 (source (janestreet-origin "ppx_fields_conv" version
3458 "1vzbdz27g5qhhfs7wx6rjf979q4xyssxqbmp6sc1sxknbghslbdv"))
3459 (build-system ocaml-build-system)
3461 `(("js-build-tools" ,ocaml4.02-js-build-tools)
3463 ("ppx-core" ,ocaml4.02-ppx-core)))
3465 `(("fieldslib" ,ocaml4.02-fieldslib)
3466 ("ppx-tools" ,ocaml4.02-ppx-tools)
3467 ("ppx-core" ,ocaml4.02-ppx-core)
3468 ("ppx-type-conv" ,ocaml4.02-ppx-type-conv)))
3470 (ensure-keyword-arguments janestreet-arguments
3471 `(#:ocaml ,ocaml-4.02
3472 #:findlib ,ocaml4.02-findlib)))
3473 (home-page "https://github.com/janestreet/ppx_fields_conv/")
3474 (synopsis "Generation of accessor and iteration functions for ocaml records")
3475 (description "Ppx_fields_conv is a ppx rewriter that can be used to define
3476 first class values representing record fields, and additional routines, to get
3477 and set record fields, iterate and fold over all fields of a record and create
3478 new record values.")
3479 (license license:asl2.0)))
3481 (define-public ocaml-seq
3487 (uri (string-append "https://github.com/c-cube/seq/archive/"
3489 (file-name (string-append name "-" version ".tar.gz"))
3492 "02lb2d9i12bxrz2ba5wygk2bycan316skqlyri0597q7j9210g8r"))))
3493 (build-system ocaml-build-system)
3497 (modify-phases %standard-phases
3501 (lambda* (#:key outputs #:allow-other-keys)
3502 (let ((install-dir (string-append (assoc-ref outputs "out")
3503 "/lib/ocaml/site-lib/seq")))
3504 (mkdir-p install-dir)
3505 (with-output-to-file (string-append install-dir "/META")
3507 (display "name=\"seq\"
3508 version=\"[distributed with ocaml]\"
3509 description=\"dummy package for compatibility\"
3513 `((ocaml4.02-variant . ,(delay ocaml4.02-seq))))
3514 (home-page "https://github.com/c-cube/seq")
3515 (synopsis "OCaml's standard iterator type")
3516 (description "This package is a compatibility package for OCaml's
3517 standard iterator type starting from 4.07.")
3518 (license license:lgpl2.1+)))
3520 (define-public ocaml4.02-seq
3521 (let ((base (package-with-ocaml4.02 (strip-ocaml4.02-variant ocaml-seq))))
3525 `(#:ocaml ,ocaml-4.02
3526 #:findlib ,ocaml4.02-findlib
3527 #:tests? #f; no tests
3528 #:phases (modify-phases %standard-phases (delete 'configure)))))))
3530 (define-public ocaml-re
3536 (uri (string-append "https://github.com/ocaml/ocaml-re//archive/"
3538 (file-name (string-append name "-" version ".tar.gz"))
3541 "1pdb0mr6z5ax6szblr3f5lbdnqq9grm97cmsfjmdma60yrx2rqhd"))))
3542 (build-system dune-build-system)
3545 #:build-flags (list "--profile" "release")))
3547 `(("ocaml-seq" ,ocaml-seq)))
3549 `(("ounit" ,ocaml-ounit)))
3550 (home-page "https://github.com/ocaml/ocaml-re/")
3551 (synopsis "Regular expression library for OCaml")
3552 (description "Pure OCaml regular expressions with:
3554 @item Perl-style regular expressions (module Re_perl)
3555 @item Posix extended regular expressions (module Re_posix)
3556 @item Emacs-style regular expressions (module Re_emacs)
3557 @item Shell-style file globbing (module Re_glob)
3558 @item Compatibility layer for OCaml's built-in Str module (module Re_str)
3560 (license license:expat)))
3562 (define-public ocaml4.02-re
3563 (package-with-ocaml4.02 ocaml-re))
3565 (define-public ocaml4.02-ppx-expect
3567 (name "ocaml4.02-ppx-expect")
3568 (version "113.33.03")
3569 (source (janestreet-origin "ppx_expect" version
3570 "03sbs4s5i8l9syr45v25f5hzy7msd2b47k2a9wsq9m43d4imgkrc"))
3571 (build-system ocaml-build-system)
3573 `(("js-build-tools" ,ocaml4.02-js-build-tools)
3576 `(("fieldslib" ,ocaml4.02-fieldslib)
3577 ("ppx-tools" ,ocaml4.02-ppx-tools)
3578 ("ppx-assert" ,ocaml4.02-ppx-assert)
3579 ("ppx-compare" ,ocaml4.02-ppx-compare)
3580 ("ppx-core" ,ocaml4.02-ppx-core)
3581 ("ppx-custom-printf" ,ocaml4.02-ppx-custom-printf)
3582 ("ppx-driver" ,ocaml4.02-ppx-driver)
3583 ("ppx-fields-conv" ,ocaml4.02-ppx-fields-conv)
3584 ("ppx-inline-test" ,ocaml4.02-ppx-inline-test)
3585 ("ppx-sexp-conv" ,ocaml4.02-ppx-sexp-conv)
3586 ("ppx-variants-conv" ,ocaml4.02-ppx-variants-conv)
3587 ("re" ,ocaml4.02-re)
3588 ("sexplib" ,ocaml4.02-sexplib)
3589 ("variantslib" ,ocaml4.02-variantslib)))
3591 (ensure-keyword-arguments janestreet-arguments
3592 `(#:ocaml ,ocaml-4.02
3593 #:findlib ,ocaml4.02-findlib)))
3594 (home-page "https://github.com/janestreet/ppx_expect/")
3595 (synopsis "Cram like framework for OCaml")
3596 (description "Expect-test is a framework for writing tests in OCaml, similar
3597 to Cram. Expect-tests mimic the existing inline tests framework with the
3598 let%expect_test construct. The body of an expect-test can contain
3599 output-generating code, interleaved with %expect extension expressions to denote
3600 the expected output.")
3601 (license license:asl2.0)))
3603 (define-public ocaml4.02-ppx-jane
3605 (name "ocaml4.02-ppx-jane")
3606 (version "113.33.03")
3607 (source (janestreet-origin "ppx_jane" version
3608 "0bjxkhmzgm6x9dcvjwybbccn34khbvyyjimcbaja30fp6qcqk5yl"))
3609 (build-system ocaml-build-system)
3611 `(("js-build-tools" ,ocaml4.02-js-build-tools)
3614 `(("ppx-assert" ,ocaml4.02-ppx-assert)
3615 ("ppx-bench" ,ocaml4.02-ppx-bench)
3616 ("ppx-bin-prot" ,ocaml4.02-ppx-bin-prot)
3617 ("ppx-compare" ,ocaml4.02-ppx-compare)
3618 ("ppx-custom-printf" ,ocaml4.02-ppx-custom-printf)
3619 ("ppx-deriving" ,ocaml4.02-ppx-deriving)
3620 ("ppx-enumerate" ,ocaml4.02-ppx-enumerate)
3621 ("ppx-expect" ,ocaml4.02-ppx-expect)
3622 ("ppx-fail" ,ocaml4.02-ppx-fail)
3623 ("ppx-fields-conv" ,ocaml4.02-ppx-fields-conv)
3624 ("ppx-here" ,ocaml4.02-ppx-here)
3625 ("ppx-inline-test" ,ocaml4.02-ppx-inline-test)
3626 ("ppx-let" ,ocaml4.02-ppx-let)
3627 ("ppx-pipebang" ,ocaml4.02-ppx-pipebang)
3628 ("ppx-sexp-conv" ,ocaml4.02-ppx-sexp-conv)
3629 ("ppx-sexp-message" ,ocaml4.02-ppx-sexp-message)
3630 ("ppx-sexp-value" ,ocaml4.02-ppx-sexp-value)
3631 ("ppx-typerep-conv" ,ocaml4.02-ppx-typerep-conv)
3632 ("ppx-variants-conv" ,ocaml4.02-ppx-variants-conv)))
3634 (ensure-keyword-arguments janestreet-arguments
3635 `(#:ocaml ,ocaml-4.02
3636 #:findlib ,ocaml4.02-findlib)))
3637 (home-page "https://github.com/janestreet/ppx_jane/")
3638 (synopsis "Standard Jane Street ppx rewriters")
3639 (description "Ppx_jane is a ppx_driver including all standard ppx rewriters.")
3640 (license license:asl2.0)))
3642 (define-public ocaml4.02-core-kernel
3644 (name "ocaml4.02-core-kernel")
3645 (version "113.33.03")
3646 (source (janestreet-origin "core_kernel" version
3647 "0fl23jrwivixawhxinbwaw9cabqnzn7fini7dxpxjjvkxdc8ip5y"))
3649 `(("js-build-tools" ,ocaml4.02-js-build-tools)
3650 ("ppx-jane" ,ocaml4.02-ppx-jane)
3653 `(("bin_prot" ,ocaml4.02-bin-prot)
3654 ("ppx-assert" ,ocaml4.02-ppx-assert)
3655 ("ppx-bench" ,ocaml4.02-ppx-bench)
3656 ("ppx-driver" ,ocaml4.02-ppx-driver)
3657 ("ppx-expect" ,ocaml4.02-ppx-expect)
3658 ("ppx-inline-test" ,ocaml4.02-ppx-inline-test)
3659 ("typerep" ,ocaml4.02-typerep)
3660 ("sexplib" ,ocaml4.02-sexplib)
3661 ("variantslib" ,ocaml4.02-variantslib)
3662 ("result" ,ocaml4.02-result)
3663 ("fieldslib" ,ocaml4.02-fieldslib)))
3664 (build-system ocaml-build-system)
3666 (ensure-keyword-arguments janestreet-arguments
3667 `(#:ocaml ,ocaml-4.02
3668 #:findlib ,ocaml4.02-findlib)))
3669 (home-page "https://github.com/janestreet/core_kernel/")
3670 (synopsis "Portable standard library for OCaml")
3671 (description "Core is an alternative to the OCaml standard library.
3673 Core_kernel is the system-independent part of Core. It is aimed for cases when
3674 the full Core is not available, such as in Javascript.")
3675 (license license:asl2.0)))
3677 (define-public ocaml4.02-async-kernel
3679 (name "ocaml4.02-async-kernel")
3680 (version "113.33.03")
3681 (source (janestreet-origin "async_kernel" version
3682 "04bjsaa23j831r09r38x6xx9nhryvp0z5ihickvhxqa4fb2snyvd"))
3684 `(("oasis" ,ocaml-oasis)
3685 ("js-build-tools" ,ocaml4.02-js-build-tools)
3686 ("ppx-jane" ,ocaml4.02-ppx-jane)
3689 `(("core-kernel" ,ocaml4.02-core-kernel)))
3690 (build-system ocaml-build-system)
3692 (ensure-keyword-arguments janestreet-arguments
3693 `(#:ocaml ,ocaml-4.02
3694 #:findlib ,ocaml4.02-findlib)))
3695 (home-page "https://github.com/janestreet/async_kernel/")
3696 (synopsis "Monadic concurrency library")
3697 (description "Async-kernel is a library for concurrent programming in OCaml.")
3698 (license license:asl2.0)))
3700 (define-public ocaml4.02-async-rpc-kernel
3702 (name "ocaml4.02-async-rpc-kernel")
3703 (version "113.33.03")
3704 (source (janestreet-origin "async_rpc_kernel" version
3705 "0y97h9pkb00v7jpf87m8cbb0ffkclj9g26ph6sq97q8dpisnkjwh"))
3707 `(("oasis" ,ocaml-oasis)
3708 ("js-build-tools" ,ocaml4.02-js-build-tools)
3709 ("ppx-jane" ,ocaml4.02-ppx-jane)
3712 `(("async-kernel" ,ocaml4.02-async-kernel)))
3713 (build-system ocaml-build-system)
3715 (ensure-keyword-arguments janestreet-arguments
3716 `(#:ocaml ,ocaml-4.02
3717 #:findlib ,ocaml4.02-findlib)))
3718 (home-page "https://github.com/janestreet/async_rpc_kernel/")
3719 (synopsis "Platform-independent core of the Async RPC library")
3720 (description "Async_rpc_kernel is the platform-independent core of
3721 the Async RPC library.")
3722 (license license:asl2.0)))
3724 (define-public ocaml4.02-core
3726 (name "ocaml4.02-core")
3727 (version "113.33.03")
3728 (source (janestreet-origin "core" version
3729 "1znll157qg56g9d3247fjibv1hxv3r9wxgr4nhy19j2vzdh6a268"))
3731 `(("oasis" ,ocaml-oasis)
3732 ("js-build-tools" ,ocaml4.02-js-build-tools)
3733 ("ppx-jane" ,ocaml4.02-ppx-jane)
3736 `(("core-kernel" ,ocaml4.02-core-kernel)))
3737 (build-system ocaml-build-system)
3739 (ensure-keyword-arguments janestreet-arguments
3740 `(#:ocaml ,ocaml-4.02
3741 #:findlib ,ocaml4.02-findlib)))
3742 (home-page "https://github.com/janestreet/core/")
3743 (synopsis "Alternative to OCaml's standard library")
3744 (description "The Core suite of libraries is an alternative to OCaml's
3745 standard library that was developed by Jane Street.")
3746 (license license:asl2.0)))
3748 (define-public ocaml4.02-async-unix
3750 (name "ocaml4.02-async-unix")
3751 (version "113.33.03")
3752 (source (janestreet-origin "async_unix" version
3753 "1fwl0lfrizllcfjk8hk8m7lsz9ha2jg6qgk4gssfyz377qvpcq4h"))
3755 `(("oasis" ,ocaml-oasis)
3756 ("js-build-tools" ,ocaml4.02-js-build-tools)
3757 ("ppx-jane" ,ocaml4.02-ppx-jane)
3760 `(("async-kernel" ,ocaml4.02-async-kernel)
3761 ("core" ,ocaml4.02-core)))
3762 (build-system ocaml-build-system)
3764 (ensure-keyword-arguments janestreet-arguments
3765 `(#:ocaml ,ocaml-4.02
3766 #:findlib ,ocaml4.02-findlib)))
3767 (home-page "https://github.com/janestreet/async_unix")
3768 (synopsis "Asynchronous execution library for Unix")
3769 (description "Async_unix is an asynchronous execution library for Unix.")
3770 (license license:asl2.0)))
3772 (define-public ocaml4.02-async-extra
3774 (name "ocaml4.02-async-extra")
3775 (version "113.33.03")
3776 (source (janestreet-origin "async_extra" version
3777 "1si8jgiq5xh5sl9f2b7f9p17p7zx5h1pg557x2cxywi2x7pxqg4f"))
3779 `(("oasis" ,ocaml-oasis)
3780 ("js-build-tools" ,ocaml4.02-js-build-tools)
3781 ("ppx-jane" ,ocaml4.02-ppx-jane)
3784 `(("async-rpc-kernel" ,ocaml4.02-async-rpc-kernel)
3785 ("async-unix" ,ocaml4.02-async-unix)
3786 ("core" ,ocaml4.02-core)))
3787 (build-system ocaml-build-system)
3789 (ensure-keyword-arguments janestreet-arguments
3790 `(#:ocaml ,ocaml-4.02
3791 #:findlib ,ocaml4.02-findlib)))
3792 (home-page "https://github.com/janestreet/async_extra")
3793 (synopsis "Extra functionnalities for the async library")
3794 (description "Async_extra provides additional functionnalities for the
3796 (license license:asl2.0)))
3798 (define-public ocaml4.02-async
3800 (name "ocaml4.02-async")
3801 (version "113.33.03")
3802 (source (janestreet-origin "async" version
3803 "0210fyhcs12kpmmd26015bgivkfd2wqkyn3c5wd7688d0f872y25"))
3805 `(("oasis" ,ocaml-oasis)
3806 ("js-build-tools" ,ocaml4.02-js-build-tools)
3807 ("ppx-jane" ,ocaml4.02-ppx-jane)
3810 `(("async-extra" ,ocaml4.02-async-extra)))
3811 (build-system ocaml-build-system)
3813 (ensure-keyword-arguments janestreet-arguments
3814 `(#:ocaml ,ocaml-4.02
3815 #:findlib ,ocaml4.02-findlib)))
3816 (home-page "https://github.com/janestreet/async")
3817 (synopsis "Monadic concurrency library")
3818 (description "Async is a library for concurrent programming in OCaml.")
3819 (license license:asl2.0)))
3821 (define-public ocaml-ocplib-endian
3823 (name "ocaml-ocplib-endian")
3827 (uri (string-append "https://github.com/OCamlPro/ocplib-endian/"
3828 "archive/" version ".tar.gz"))
3831 "0hwj09rnzjs0m0kazz5h2mgs6p95j0zlga8cda5srnzqmzhniwkn"))
3832 (file-name (string-append name "-" version ".tar.gz"))))
3833 (build-system ocaml-build-system)
3835 `(("cppo" ,ocaml-cppo)
3836 ("ocamlbuild" ,ocamlbuild)))
3837 (home-page "https://github.com/OCamlPro/ocplib-endian")
3838 (synopsis "Optimised functions to read and write int16/32/64 from strings
3840 (description "Optimised functions to read and write int16/32/64 from strings
3841 and bigarrays, based on new primitives added in version 4.01. It works on
3842 strings, bytes and bigstring (Bigarrys of chars), and provides submodules for
3843 big- and little-endian, with their unsafe counter-parts.")
3844 (license license:lgpl2.1)))
3846 (define-public ocaml4.02-ocplib-endian
3847 (package-with-ocaml4.02 ocaml-ocplib-endian))
3849 (define-public ocaml4.02-cstruct
3851 (name "ocaml4.02-cstruct")
3855 (uri (string-append "https://github.com/mirage/ocaml-cstruct/"
3856 "archive/v" version ".tar.gz"))
3859 "15qpdc8421shq4pprdas9jznpva45229wkfqbwcxw9khaiiz7949"))
3860 (file-name (string-append name "-" version ".tar.gz"))))
3861 (build-system ocaml-build-system)
3863 `(#:ocaml ,ocaml-4.02
3864 #:findlib ,ocaml4.02-findlib
3866 (list "--enable-lwt" "--enable-async")
3868 (modify-phases %standard-phases
3869 (add-after 'install 'link-stubs
3870 (lambda* (#:key outputs #:allow-other-keys)
3871 (let* ((out (assoc-ref outputs "out"))
3872 (stubs (string-append out "/lib/ocaml/site-lib/stubslibs"))
3873 (lib (string-append out "/lib/ocaml/site-lib/cstruct")))
3875 (symlink (string-append lib "/dllcstruct_stubs.so")
3876 (string-append stubs "/dllcstruct_stubs.so"))))))))
3878 `(("ounit" ,ocaml4.02-ounit)
3879 ("ppx-tools" ,ocaml4.02-ppx-tools)
3880 ("camlp4" ,camlp4-4.02)))
3882 `(("ocplib-endian" ,ocaml4.02-ocplib-endian)
3883 ("lwt" ,ocaml4.02-lwt)
3884 ("async" ,ocaml4.02-async)
3885 ("sexplib" ,ocaml4.02-sexplib)))
3886 (home-page "https://github.com/mirage/ocaml-cstruct")
3887 (synopsis "Access C structures via a camlp4 extension")
3888 (description "Cstruct is a library and syntax extension to make it easier
3889 to access C-like structures directly from OCaml. It supports both reading and
3890 writing to these structures, and they are accessed via the Bigarray module.")
3891 (license license:isc)))
3893 (define-public ocaml4.02-hex
3895 (name "ocaml4.02-hex")
3899 (uri (string-append "https://github.com/mirage/ocaml-hex/"
3900 "archive/" version ".tar.gz"))
3903 "0s63g0b8gfv2xm6fv6xg7bva8h76b5pcjb0zw3f8cygs0lq9072v"))
3904 (file-name (string-append name "-" version ".tar.gz"))))
3905 (build-system ocaml-build-system)
3907 `(#:ocaml ,ocaml-4.02
3908 #:findlib ,ocaml4.02-findlib))
3910 `(("cstruct" ,ocaml4.02-cstruct)))
3911 (home-page "https://github.com/mirage/ocaml-hex/")
3912 (synopsis "Minimal library providing hexadecimal converters")
3913 (description "Hex is a minimal library providing hexadecimal converters.")
3914 (license license:isc)))
3916 (define-public ocaml4.02-ezjsonm
3918 (name "ocaml4.02-ezjsonm")
3922 (uri (string-append "https://github.com/mirage/ezjsonm/archive/"
3926 "1kag0z2xlk4rw73a240dmkxh9rj6psxxcxkm7d7z0rrj6hzjajgq"))
3927 (file-name (string-append name "-" version ".tar.gz"))))
3928 (build-system ocaml-build-system)
3930 `(("alcotest" ,ocaml4.02-alcotest)))
3932 `(("hex" ,ocaml4.02-hex)
3933 ("jsonm" ,ocaml4.02-jsonm)
3934 ("lwt" ,ocaml4.02-lwt)
3935 ("sexplib" ,ocaml4.02-sexplib)))
3937 `(#:configure-flags (list "--enable-lwt")
3939 #:findlib ,ocaml4.02-findlib))
3940 (home-page "https://github.com/mirage/ezjsonm/")
3941 (synopsis "Read and write JSON data")
3942 (description "Ezjsonm provides more convenient (but far less flexible) input
3943 and output functions that go to and from [string] values than jsonm. This avoids
3944 the need to write signal code, which is useful for quick scripts that manipulate
3946 (license license:isc)))
3948 (define-public ocaml4.02-uri
3950 (name "ocaml4.02-uri")
3954 (uri (string-append "https://github.com/mirage/ocaml-uri/archive/v"
3958 "02bzrag79prx261rxf9mlak749pwf4flpfl8p012x1xznv9m0clc"))
3959 (file-name (string-append name "-" version ".tar.gz"))))
3960 (build-system ocaml-build-system)
3962 `(#:ocaml ,ocaml-4.02
3963 #:findlib ,ocaml4.02-findlib))
3965 `(("ounit" ,ocaml4.02-ounit)))
3967 `(("ppx-sexp-conv" ,ocaml4.02-ppx-sexp-conv)
3968 ("re" ,ocaml4.02-re)
3969 ("ppx-deriving" ,ocaml4.02-ppx-deriving)
3970 ("sexplib" ,ocaml4.02-sexplib)
3971 ("stringext" ,ocaml4.02-stringext)))
3972 (home-page "https://github.com/mirage/ocaml-uri")
3973 (synopsis "RFC3986 URI/URL parsing library")
3974 (description "OCaml-uri is a library for parsing URI/URL in the RFC3986 format.")
3975 (license license:isc)))
3977 (define-public ocaml-easy-format
3979 (name "ocaml-easy-format")
3983 (uri (string-append "https://github.com/mjambon/easy-format/"
3984 "archive/v" version ".tar.gz"))
3987 "1zcz682y9figa84k7lgdjcab5qbzk3yy14ygfqp2dhhrvjygm252"))
3988 (file-name (string-append name "-" version ".tar.gz"))))
3989 (build-system ocaml-build-system)
3992 (modify-phases %standard-phases
3993 (delete 'configure))))
3994 (home-page "https://github.com/mjambon/easy-format")
3995 (synopsis "Interface to the Format module")
3996 (description "Easy-format is a high-level and functional interface to the
3997 Format module of the OCaml standard library.")
3998 (license license:bsd-3)))
4000 (define-public ocaml4.02-easy-format
4001 (package-with-ocaml4.02 ocaml-easy-format))
4003 (define-public optcomp
4009 (uri (string-append "https://github.com/diml/optcomp/archive/"
4013 "0hhhb2gisah1h22zlg5iszbgqxdd7x85cwd57bd4mfkx9l7dh8jh"))
4014 (file-name (string-append name "-" version ".tar.gz"))))
4015 (build-system ocaml-build-system)
4017 `(#:ocaml ,ocaml-4.02
4018 #:findlib ,ocaml4.02-findlib
4021 (list (string-append "BUILDFLAGS=\"-cflags -I,"
4022 (assoc-ref %build-inputs "camlp4")
4023 "/lib/ocaml/site-lib/camlp4/Camlp4Parsers\""))))
4024 (native-inputs `(("camlp4" ,camlp4-4.02)))
4025 (propagated-inputs `(("camlp4" ,camlp4-4.02)))
4026 (home-page "https://github.com/diml/optcomp")
4027 (synopsis "Optional compilation for OCaml")
4028 (description "Optcomp provides an optional compilation facility with
4029 cpp-like directives.")
4030 (license license:bsd-3)))
4032 (define-public ocaml-piqilib
4034 (name "ocaml-piqilib")
4038 (uri (string-append "https://github.com/alavrik/piqi/archive/v"
4042 "1ssccnwqzfyf7syfq2fv4zyhwayxwd75rhq9y28mvq1w6qbww4l7"))
4043 (file-name (string-append name "-" version ".tar.gz"))))
4044 (build-system ocaml-build-system)
4047 (modify-phases %standard-phases
4048 (add-before 'configure 'fix-ocamlpath
4050 (substitute* '("Makefile" "make/Makefile.ocaml")
4051 (("OCAMLPATH := ") "OCAMLPATH := $(OCAMLPATH):"))
4054 (lambda* (#:key outputs #:allow-other-keys)
4055 (let ((out (assoc-ref outputs "out")))
4056 (substitute* "make/OCamlMakefile"
4057 (("/bin/sh") (which "bash")))
4058 (invoke "./configure" "--prefix" out "--ocaml-libdir"
4059 (string-append out "/lib/ocaml/site-lib")))
4061 (add-after 'build 'build-ocaml
4062 (lambda* (#:key outputs #:allow-other-keys)
4063 (invoke "make" "ocaml")
4065 (add-after 'install 'install-ocaml
4066 (lambda* (#:key outputs #:allow-other-keys)
4067 (invoke "make" "ocaml-install")
4069 (add-after 'install-ocaml 'link-stubs
4070 (lambda* (#:key outputs #:allow-other-keys)
4071 (let* ((out (assoc-ref outputs "out"))
4072 (stubs (string-append out "/lib/ocaml/site-lib/stubslibs"))
4073 (lib (string-append out "/lib/ocaml/site-lib/piqilib")))
4075 (symlink (string-append lib "/dllpiqilib_stubs.so")
4076 (string-append stubs "/dllpiqilib_stubs.so"))
4080 ("camlp4" ,camlp4)))
4082 `(("xmlm" ,ocaml-xmlm)
4083 ("ulex" ,ocaml-ulex)
4084 ("easy-format" ,ocaml-easy-format)
4085 ("base64" ,ocaml-base64)))
4086 (home-page "http://piqi.org")
4087 (synopsis "Data serialization and conversion library")
4088 (description "Piqilib is the common library used by the piqi command-line
4089 tool and piqi-ocaml.")
4090 (license license:asl2.0)))
4092 (define-public ocaml4.02-piqilib
4093 (package-with-ocaml4.02 ocaml-piqilib))
4095 (define-public ocaml-uuidm
4097 (name "ocaml-uuidm")
4101 (uri (string-append "http://erratique.ch/software/uuidm/"
4102 "releases/uuidm-" version ".tbz"))
4105 "0hz4fdx0x16k0pw9995vkz5d1hmzz6b16wck9li399rcbfnv5jlc"))))
4106 (build-system ocaml-build-system)
4109 (list "build" "--tests" "true" "--with-cmdliner" "true")
4111 (modify-phases %standard-phases
4112 (delete 'configure))))
4114 `(("ocamlbuild" ,ocamlbuild)
4117 `(("cmdliner" ,ocaml-cmdliner)
4118 ("topkg" ,ocaml-topkg)))
4119 (home-page "http://erratique.ch/software/uuidm")
4120 (synopsis "Universally unique identifiers for OCaml")
4121 (description "Uuidm is an OCaml module implementing 128 bits universally
4122 unique identifiers (UUIDs) version 3, 5 (named based with MD5, SHA-1 hashing)
4123 and 4 (random based) according to RFC 4122.")
4124 (license license:isc)))
4126 (define-public ocaml4.02-uuidm
4127 (package-with-ocaml4.02 ocaml-uuidm))
4129 (define-public ocaml-graph
4131 (name "ocaml-graph")
4135 (uri (string-append "http://ocamlgraph.lri.fr/download/"
4136 "ocamlgraph-" version ".tar.gz"))
4139 "0m9g16wrrr86gw4fz2fazrh8nkqms0n863w7ndcvrmyafgxvxsnr"))))
4140 (build-system ocaml-build-system)
4142 `(#:install-target "install-findlib"
4145 (modify-phases %standard-phases
4146 (add-before 'configure 'set-shell
4147 (lambda* (#:key inputs #:allow-other-keys)
4148 (setenv "CONFIG_SHELL" (string-append (assoc-ref inputs "bash")
4150 (inputs `(("lablgtk" ,lablgtk)))
4151 (properties `((upstream-name . "ocamlgraph")))
4152 (home-page "http://ocamlgraph.lri.fr/")
4153 (synopsis "Graph library for OCaml")
4154 (description "OCamlgraph is a generic graph library for OCaml.")
4155 (license license:lgpl2.1)))
4157 (define-public ocaml4.02-graph
4158 (package-with-ocaml4.02 ocaml-graph))
4160 (define-public ocaml-piqi
4166 (uri (string-append "https://github.com/alavrik/piqi-ocaml/"
4167 "archive/v" version ".tar.gz"))
4168 (file-name (string-append name "-" version ".tar.gz"))
4171 "0da0v2v28aj65b0cwpvvmcqyrfvz94pp3j5zgfdr1jrl5s37c21g"))))
4172 (build-system ocaml-build-system)
4175 (list (string-append "DESTDIR=" (assoc-ref %outputs "out"))
4176 (string-append "SHELL=" (assoc-ref %build-inputs "bash")
4179 (modify-phases %standard-phases
4180 (delete 'configure))))
4184 ("protobuf" ,protobuf))) ; for tests
4186 `(("num" ,ocaml-num)
4187 ("piqilib" ,ocaml-piqilib)))
4189 `((ocaml4.02-variant . ,(delay ocaml4.02-piqi))))
4190 (home-page "https://github.com/alavrik/piqi-ocaml")
4191 (synopsis "Protocol serialization system for OCaml")
4192 (description "Piqi is a multi-format data serialization system for OCaml.
4193 It provides a uniform interface for serializing OCaml data structures to JSON,
4194 XML and Protocol Buffers formats.")
4195 (license license:asl2.0)))
4197 (define-public ocaml4.02-piqi
4198 (let ((base (package-with-ocaml4.02 (strip-ocaml4.02-variant ocaml-piqi))))
4202 `(("piqilib" ,ocaml4.02-piqilib))))))
4208 (home-page "https://github.com/BinaryAnalysisPlatform/bap")
4211 (uri (string-append home-page "/archive/v" version ".tar.gz"))
4214 "0v95v9mp7mg8fj25ry0w7566zd9xp6cs8nnqj4l38q54fb1hfav9"))
4215 (file-name (string-append name "-" version ".tar.gz"))))
4216 (build-system ocaml-build-system)
4218 `(("oasis" ,ocaml4.02-oasis)
4219 ("clang" ,clang-3.8)
4220 ("ounit" ,ocaml4.02-ounit)))
4222 `(("core-kernel" ,ocaml4.02-core-kernel)
4223 ("ppx-driver" ,ocaml4.02-ppx-driver)
4224 ("bin-prot" ,ocaml4.02-bin-prot)
4225 ("uri" ,ocaml4.02-uri)
4228 ("clang-runtime" ,clang-runtime)
4229 ("fileutils" ,ocaml4.02-fileutils)
4230 ("cmdliner" ,ocaml4.02-cmdliner)
4231 ("zarith" ,ocaml4.02-zarith)
4232 ("uuidm" ,ocaml4.02-uuidm)
4233 ("camlzip" ,ocaml4.02-camlzip)
4234 ("frontc" ,ocaml-frontc)
4235 ("ezjsonm" ,ocaml4.02-ezjsonm)
4236 ("ocurl" ,ocaml4.02-ocurl)
4237 ("piqi" ,ocaml4.02-piqi)
4238 ("ocamlgraph" ,ocaml4.02-graph)
4239 ("bitstring" ,ocaml4.02-bitstring)
4240 ("ppx-jane" ,ocaml4.02-ppx-jane)
4241 ("re" ,ocaml4.02-re)))
4242 (inputs `(("llvm" ,llvm-3.8)))
4244 `(#:ocaml ,ocaml-4.02
4245 #:findlib ,ocaml4.02-findlib
4248 (modify-phases %standard-phases
4250 (lambda* (#:key outputs inputs #:allow-other-keys)
4251 (invoke "./configure" "--prefix"
4252 (assoc-ref outputs "out")
4255 (assoc-ref outputs "out")
4256 "/lib/ocaml/site-lib")
4257 "--with-llvm-version=3.8"
4258 "--with-llvm-config=llvm-config"
4259 "--enable-everything")
4260 (substitute* "plugins/objdump/objdump_main.ml"
4261 (("Re_perl") "Re.Perl"))
4262 (substitute* "oasis/objdump"
4263 (("re.pcre") "re.pcre, re.perl")))))))
4264 (synopsis "Binary Analysis Platform")
4265 (description "Binary Analysis Platform is a framework for writing program
4266 analysis tools, that target binary files. The framework consists of a plethora
4267 of libraries, plugins, and frontends. The libraries provide code reusability,
4268 the plugins facilitate extensibility, and the frontends serve as entry points.")
4269 (license license:expat)))
4271 (define-public ocaml-camomile
4273 (name "ocaml-camomile")
4275 (home-page "https://github.com/yoriyuki/Camomile")
4278 (uri (string-append home-page "/releases/download/" version
4279 "/camomile-" version ".tbz"))
4282 "01ssjrqz41jvrqh27jxnh9cx7ywi9b5sgsykd00i7z9nrcwhlfy2"))))
4283 (build-system dune-build-system)
4285 `(("camlp4" ,camlp4)))
4287 `(#:build-flags (list "--profile" "realease")
4289 (synopsis "Comprehensive Unicode library")
4290 (description "Camomile is a Unicode library for OCaml. Camomile provides
4291 Unicode character type, UTF-8, UTF-16, UTF-32 strings, conversion to/from about
4292 200 encodings, collation and locale-sensitive case mappings, and more. The
4293 library is currently designed for Unicode Standard 3.2.")
4294 ;; with an exception for linked libraries to use a different license
4295 (license license:lgpl2.0+)))
4297 (define-public ocaml4.02-camomile
4298 (package-with-ocaml4.02 ocaml-camomile))
4300 (define-public ocaml-jbuilder
4302 (name "ocaml-jbuilder")
4303 (version "1.0+beta16")
4307 "https://github.com/janestreet/jbuilder/archive/"
4309 (file-name (string-append name "-" version ".tar.gz"))
4312 "1cy07pwvbrlysszs938yd74yyvvbgkffpb82qrjph77zf0h2gdi7"))))
4313 (build-system ocaml-build-system)
4315 `(#:ocaml ,ocaml-4.02
4316 #:findlib ,ocaml4.02-findlib
4318 (modify-phases %standard-phases
4320 (lambda* (#:key outputs #:allow-other-keys)
4321 (let ((out (assoc-ref outputs "out")))
4322 (setenv "PREFIX" out))
4325 `(("menhir" ,ocaml4.02-menhir)))
4328 (home-page "https://github.com/janestreet/jbuilder")
4329 (synopsis "Composable build system for OCaml")
4330 (description "Jbuilder is a build system designed for OCaml/Reason projects
4331 only. It focuses on providing the user with a consistent experience and takes
4332 care of most of the low-level details of OCaml compilation. All you have to do
4333 is provide a description of your project and Jbuilder will do the rest.")
4334 (license license:asl2.0)))
4336 (define-public ocaml-zed
4342 (uri (string-append "https://github.com/diml/zed/archive/"
4344 (file-name (string-append name "-" version ".tar.gz"))
4347 "19m5vrj60vg1b63qfsv0aabdlzgn40cqmx65s3wafqi4fs9xp6jn"))))
4348 (build-system ocaml-build-system)
4351 (modify-phases %standard-phases
4354 (lambda* (#:key #:allow-other-keys)
4355 (zero? (system* "jbuilder" "build"))))
4358 (lambda* (#:key outputs #:allow-other-keys)
4359 (let ((out (assoc-ref outputs "out")))
4360 (zero? (system* "jbuilder" "install" "--prefix" out))))))))
4362 `(("jbuilder" ,ocaml-jbuilder)))
4364 `(("camomile" ,ocaml-camomile)
4365 ("react" ,ocaml-react)))
4366 (home-page "https://github.com/diml/zed")
4367 (synopsis "Abstract engine for text editing in OCaml")
4368 (description "Zed is an abstract engine for text edition. It can be used
4369 to write text editors, edition widgets, readlines, etc. You just have to
4370 connect an engine to your inputs and rendering functions to get an editor.")
4371 (license license:bsd-3)))
4373 (define-public ocaml4.02-zed
4374 (package-with-ocaml4.02 ocaml-zed))
4376 (define-public ocaml-lambda-term
4378 (name "ocaml-lambda-term")
4383 (uri (string-append "https://github.com/diml/lambda-term/archive/"
4385 (file-name (string-append name "-" version ".tar.gz"))
4387 (base32 "1hy5ryagqclgdm9lzh1qil5mrynlypv7mn6qm858hdcnmz9zzn0l"))))
4388 (build-system dune-build-system)
4390 `(#:build-flags (list "--profile" "release")
4393 `(("lwt" ,ocaml-lwt)
4394 ("lwt-log" ,ocaml-lwt-log)
4395 ("zed" ,ocaml-zed)))
4396 (home-page "https://github.com/diml/lambda-term")
4397 (synopsis "Terminal manipulation library for OCaml")
4398 (description "Lambda-Term is a cross-platform library for manipulating the
4399 terminal. It provides an abstraction for keys, mouse events, colors, as well as
4400 a set of widgets to write curses-like applications. The main objective of
4401 Lambda-Term is to provide a higher level functional interface to terminal
4402 manipulation than, for example, ncurses, by providing a native OCaml interface
4403 instead of bindings to a C library.")
4404 (license license:bsd-3)))
4406 (define-public ocaml4.02-lambda-term
4407 (package-with-ocaml4.02 ocaml-lambda-term))
4409 (define-public ocaml-utop
4415 (uri (string-append "https://github.com/ocaml-community/utop/archive/"
4417 (file-name (string-append name "-" version ".tar.gz"))
4420 "1414snwmqaxs1x8wbpjf6fn3jsl01hq0phrr7639xmb5vh15mgd4"))))
4421 (build-system gnu-build-system)
4423 `(#:test-target "test"
4425 (modify-phases %standard-phases
4428 (lambda* (#:key outputs #:allow-other-keys)
4429 (let* ((out (assoc-ref outputs "out"))
4430 (libdir (string-append out "/lib/ocaml/site-lib")))
4432 (zero? (system* "jbuilder" "install"
4434 "--libdir" libdir))))))))
4437 ("cppo" ,ocaml-cppo)
4438 ("jbuilder" ,ocaml-jbuilder)))
4440 `(("ocaml-findlib" ,ocaml-findlib)
4441 ("lambda-term" ,ocaml-lambda-term)
4443 ("react" ,ocaml-react)
4444 ("camomile" ,ocaml-camomile)
4445 ("zed" ,ocaml-zed)))
4446 (home-page "https://github.com/diml/utop")
4447 (synopsis "Improved interface to the OCaml toplevel")
4448 (description "UTop is an improved toplevel for OCaml. It can run in a
4449 terminal or in Emacs. It supports line editing, history, real-time and context
4450 sensitive completion, colors, and more.")
4451 (license license:bsd-3)))
4453 (define-public ocaml-integers
4455 (name "ocaml-integers")
4457 (home-page "https://github.com/ocamllabs/ocaml-integers")
4460 (uri (string-append home-page
4461 "/releases/download/v0.2.2/integers-"
4463 (file-name (string-append name "-" version ".tbz"))
4466 "08b1ljw88ny3l0mdq6xmffjk8anfc77igryva5jz1p6f4f746ywk"))))
4467 (build-system ocaml-build-system)
4469 `(#:tests? #f; no tests
4470 #:build-flags (list "build")
4472 (modify-phases %standard-phases
4473 (delete 'configure))))
4475 `(("ocamlbuild" ,ocamlbuild)))
4477 `(("topkg" ,ocaml-topkg)
4479 (synopsis "Various signed and unsigned integer types for OCaml")
4480 (description "The ocaml-integers library provides a number of 8-, 16-, 32-
4481 and 64-bit signed and unsigned integer types, together with aliases such as
4482 long and size_t whose sizes depend on the host platform.")
4483 (license license:expat)))
4485 (define-public ocaml-ctypes
4487 (name "ocaml-ctypes")
4489 (home-page "https://github.com/ocamllabs/ocaml-ctypes")
4492 (uri (string-append home-page "/archive/" version ".tar.gz"))
4493 (file-name (string-append name "-" version ".tar.gz"))
4496 "0zrsd42q2nciyg9375g2kydqax6ay299rhyfgms59qiw7d9ylyp9"))))
4497 (build-system ocaml-build-system)
4499 `(#:tests? #f; require an old lwt
4501 (list (string-append "INSTALL_HEADERS = $(wildcard $($(PROJECT).dir)/*.h)"))
4503 (modify-phases %standard-phases
4504 (delete 'configure))))
4506 `(("pkg-config" ,pkg-config)))
4508 `(("libffi" ,libffi)
4509 ("ounit" ,ocaml-ounit)
4510 ("integers" ,ocaml-integers)
4512 ("topkg" ,ocaml-topkg)
4514 (synopsis "Library for binding to C libraries using pure OCaml")
4515 (description "Ctypes is a library for binding to C libraries using pure
4516 OCaml. The primary aim is to make writing C extensions as straightforward as
4517 possible. The core of ctypes is a set of combinators for describing the
4518 structure of C types -- numeric types, arrays, pointers, structs, unions and
4519 functions. You can use these combinators to describe the types of the
4520 functions that you want to call, then bind directly to those functions -- all
4521 without writing or generating any C!")
4522 (license license:expat)))
4524 (define-public ocaml-ocb-stubblr
4526 (name "ocaml-ocb-stubblr")
4528 (home-page "https://github.com/pqwy/ocb-stubblr")
4532 home-page "/releases/download/v0.1.1/ocb-stubblr-"
4534 (file-name (string-append name "-" version ".tbz"))
4537 "167b7x1j21mkviq8dbaa0nmk4rps2ilvzwx02igsc2706784z72f"))))
4538 (build-system ocaml-build-system)
4540 `(#:build-flags (list "build" "--tests" "true")
4542 (modify-phases %standard-phases
4543 (delete 'configure))))
4545 `(("topkg" ,ocaml-topkg)
4548 `(("astring" ,ocaml-astring)
4549 ("ocamlbuild" ,ocamlbuild)))
4550 (synopsis "OCamlbuild plugin for C stubs")
4551 (description "Ocb-stubblr is about ten lines of code that you need to
4552 repeat over, over, over and over again if you are using ocamlbuild to build
4553 OCaml projects that contain C stubs.")
4554 (license license:isc)))
4556 (define-public ocaml-tsdl
4560 (home-page "http://erratique.ch/software/tsdl")
4563 (uri (string-append home-page "/releases/tsdl-"
4565 (file-name (string-append name "-" version ".tar.gz"))
4568 "08bb97fhvz829fb0sgjn2p20mp7b04v98zy2qxpk2w390a6c4b34"))))
4569 (build-system ocaml-build-system)
4571 `(#:build-flags '("build")
4572 #:tests? #f; tests require a display device
4574 (modify-phases %standard-phases
4575 (delete 'configure))))
4577 `(("ocamlbuild" ,ocamlbuild)
4579 ("pkg-config" ,pkg-config)))
4581 `(("topkg" ,ocaml-topkg)
4582 ("result" ,ocaml-result)
4584 ("integers" ,ocaml-integers)
4585 ("ctypes" ,ocaml-ctypes)))
4586 (synopsis "Thin bindings to SDL for OCaml")
4587 (description "Tsdl is an OCaml library providing thin bindings to the
4588 cross-platform SDL C library.")
4589 (license license:isc)))
4591 (define-public dedukti
4595 (home-page "https://deducteam.github.io/")
4600 (url "https://github.com/deducteam/dedukti.git")
4601 (commit (string-append "v" version))))
4602 (file-name (git-file-name name version))
4605 "0frl3diff033i4fmq304b8wbsdnc9mvlhmwd7a3zd699ng2lzbxb"))))
4607 `(("menhir" ,ocaml-menhir)))
4609 `(("ocamlbuild" ,ocamlbuild)))
4610 (build-system ocaml-build-system)
4613 (modify-phases %standard-phases
4621 (invoke "make" "tests")
4623 (add-before 'install 'set-binpath
4624 ;; Change binary path in the makefile
4626 (let ((out (assoc-ref %outputs "out")))
4627 (substitute* "GNUmakefile"
4629 (string-append "BINDIR = " out "/bin"))))
4633 (invoke "make" "install")
4635 (synopsis "Proof-checker for the λΠ-calculus modulo theory, an extension of
4637 (description "Dedukti is a proof-checker for the λΠ-calculus modulo
4638 theory. The λΠ-calculus is an extension of the simply typed λ-calculus with
4639 dependent types. The λΠ-calculus modulo theory is itself an extension of the
4640 λΠ-calculus where the context contains variable declaration as well as rewrite
4641 rules. This system is not designed to develop proofs, but to check proofs
4642 developed in other systems. In particular, it enjoys a minimalistic syntax.")
4643 (license license:cecill-c)))
4645 (define-public emacs-dedukti-mode
4646 (let ((commit "d7c3505a1046187de3c3aeb144455078d514594e"))
4648 (name "emacs-dedukti-mode")
4649 (version (git-version "0" "0" commit))
4650 (home-page "https://github.com/rafoo/dedukti-mode")
4658 "1842wikq24c8rg0ac84vb1qby9ng1nssxswyyni4kq85lng5lcrp"))
4659 (file-name (git-file-name name version))))
4661 `(("dedukti" ,dedukti)))
4662 (build-system emacs-build-system)
4665 (modify-phases %standard-phases
4666 (add-before 'install 'patch-dkpath
4668 (let ((dkcheck-path (which "dkcheck")))
4669 (substitute* "dedukti-mode.el"
4670 (("dedukti-path \"(.*)\"")
4671 (string-append "dedukti-path \"" dkcheck-path "\"")))))))))
4672 (synopsis "Emacs major mode for Dedukti files")
4673 (description "This package provides an Emacs major mode for editing
4675 (license license:cecill-b))))
4677 (define-public emacs-flycheck-dedukti
4678 (let ((commit "3dbff5646355f39d57a3ec514f560a6b0082a1cd"))
4680 (name "emacs-flycheck-dedukti")
4681 (version (git-version "0" "0" commit))
4682 (home-page "https://github.com/rafoo/flycheck-dedukti")
4690 "1ffpxnwl3wx244n44mbw81g00nhnykd0lnid29f4aw1av7w6nw8l"))
4691 (file-name (git-file-name name version))))
4692 (build-system emacs-build-system)
4694 `(("dedukti-mode" ,emacs-dedukti-mode)
4695 ("flycheck-mode" ,emacs-flycheck)))
4696 (synopsis "Flycheck integration for the dedukti language")
4697 (description "This package provides a frontend for Flycheck to perform
4698 syntax checking on dedukti files.")
4699 (license license:cecill-b))))
4701 (define-public ocaml-biniou
4703 (name "ocaml-biniou")
4705 (home-page "https://github.com/mjambon/biniou")
4710 (url (string-append home-page ".git"))
4711 (commit (string-append "v" version))))
4712 (file-name (git-file-name name version))
4715 "0mjpgwyfq2b2izjw0flmlpvdjgqpq8shs89hxj1np2r50csr8dcb"))))
4716 (build-system dune-build-system)
4718 `(("ocaml-easy-format" ,ocaml-easy-format)))
4720 `(("which" ,which)))
4721 (synopsis "Data format designed for speed, safety, ease of use and backward
4723 (description "Biniou (pronounced \"be new\" is a binary data format
4724 designed for speed, safety, ease of use and backward compatibility as
4725 protocols evolve. Biniou is vastly equivalent to JSON in terms of
4726 functionality but allows implementations several times faster (4 times faster
4727 than yojson), with 25-35% space savings.")
4728 (license license:bsd-3)))
4730 (define-public ocaml-yojson
4732 (name "ocaml-yojson")
4734 (home-page "https://github.com/ocaml-community/yojson")
4739 (url (string-append home-page ".git"))
4740 (commit (string-append "v" version))))
4741 (file-name (git-file-name name version))
4744 "0nwsfkmqpyfab4rxq76q8ff7giyanghw08094jyrp275v99zdjr9"))))
4745 (build-system dune-build-system)
4747 `(#:test-target "."))
4749 `(("ocaml-biniou" ,ocaml-biniou)
4750 ("ocaml-easy-format" ,ocaml-easy-format)))
4752 `(("ocaml-cppo" ,ocaml-cppo)))
4753 (synopsis "Low-level JSON library for OCaml")
4754 (description "Yojson is an optimized parsing and printing library for the
4755 JSON format. It addresses a few shortcomings of json-wheel including 2x
4756 speedup, polymorphic variants and optional syntax for tuples and variants.
4757 @code{ydump} is a pretty printing command-line program provided with the
4758 yojson package. The program @code{atdgen} can be used to derive OCaml-JSON
4759 serializers and deserializers from type definitions.")
4760 (license license:bsd-3)))
4762 (define-public ocaml-craml
4764 (name "ocaml-craml")
4766 (home-page "https://github.com/realworldocaml/craml")
4771 (url (string-append home-page ".git"))
4773 (file-name (git-file-name name version))
4776 "197xjp4vmzdymf2ndinw271ihpf45h04mx8gqj8ypspxdr5fj1a5"))))
4777 (build-system dune-build-system)
4779 `(("ocaml-fmt" ,ocaml-fmt)
4780 ("ocaml-astring" ,ocaml-astring)
4781 ("ocaml-logs" ,ocaml-logs)
4782 ("ocaml-cmdliner" ,ocaml-cmdliner)))
4784 "CRAM-testing framework for testing command line applications")
4785 (description "CRAM is a is functional testing framework for command line
4786 applications. @code{craml} is freely inspired by the
4787 Mercurial's @code{https://www.selenic.com/blog/?p=663, unified test
4788 format}. @code{craml} is released as a single binary (called @code{craml}).")
4789 (license license:isc)))
4791 (define-public ocaml-merlin
4793 (name "ocaml-merlin")
4795 (home-page "https://ocaml.github.io/merlin/")
4800 (url "https://github.com/ocaml/merlin.git")
4801 (commit (string-append "v" version))))
4802 (file-name (git-file-name name version))
4805 "15ssgmwdxylbwhld9p1cq8x6kadxyhll5bfyf11dddj6cldna3hb"))))
4806 (build-system dune-build-system)
4808 `(("ocaml-biniou" ,ocaml-biniou)
4809 ("ocaml-yojson" ,ocaml-yojson)
4810 ("ocaml-easy-format" ,ocaml-easy-format)))
4812 `(("ocaml-findlib" ,ocaml-findlib)))
4814 '(#:tests? #f)) ;; Errors in tests in version 3.2.2
4815 (synopsis "Context sensitive completion for OCaml in Vim and Emacs")
4816 (description "Merlin is an editor service that provides modern IDE
4817 features for OCaml. Emacs and Vim support is provided out-of-the-box.
4818 External contributors added support for Visual Studio Code, Sublime Text and
4820 (license license:expat)))
4822 (define-public ocaml-gsl
4831 "https://github.com/mmottl/gsl-ocaml/releases/download/"
4832 version "/gsl-" version ".tbz"))
4835 "17vcswipliq1b2idbzx1z95kskn1a4q4s5v04igilg0f7lnkaarb"))))
4836 (build-system ocaml-build-system)
4839 (home-page "https://mmottl.github.io/gsl-ocaml")
4840 (synopsis "Bindings to the GNU Scientific Library")
4842 "GSL-OCaml is an interface to the @dfn{GNU scientific library} (GSL) for
4843 the OCaml language.")
4844 (license license:gpl3+)))
4846 (define-public ocaml4.01-gsl
4847 (package-with-ocaml4.01 ocaml-gsl))
4849 (define-public cubicle
4855 (uri (string-append "http://cubicle.lri.fr/cubicle-"
4859 "10kk80jdmpdvql88sdjsh7vqzlpaphd8vip2lp47aarxjkwjlz1q"))))
4860 (build-system gnu-build-system)
4862 `(("automake" ,automake)
4864 ("which" ,(@@ (gnu packages base) which))))
4866 `(("ocaml-num" ,ocaml-num)
4869 `(#:configure-flags (list "--with-z3")
4870 #:make-flags (list "QUIET=")
4873 (modify-phases %standard-phases
4874 (add-before 'configure 'configure-for-release
4876 (substitute* "Makefile.in"
4877 (("SVNREV=") "#SVNREV="))
4879 (add-before 'configure 'fix-/bin/sh
4881 (substitute* "configure"
4882 (("-/bin/sh") (string-append "-" (which "sh"))))
4884 (add-before 'configure 'fix-smt-z3wrapper.ml
4886 (substitute* "Makefile.in"
4889 (add-before 'configure 'fix-ocaml-num
4890 (lambda* (#:key inputs #:allow-other-keys)
4891 (substitute* "Makefile.in"
4892 (("= \\$\\(FUNCTORYLIB\\)")
4893 (string-append "= -I "
4894 (assoc-ref inputs "ocaml-num")
4895 "/lib/ocaml/site-lib"
4896 " $(FUNCTORYLIB)")))
4898 (home-page "http://cubicle.lri.fr/")
4899 (synopsis "Model checker for array-based systems")
4900 (description "Cubicle is a model checker for verifying safety properties
4901 of array-based systems. This is a syntactically restricted class of
4902 parametrized transition systems with states represented as arrays indexed by
4903 an arbitrary number of processes. Cache coherence protocols and mutual
4904 exclusion algorithms are typical examples of such systems.")
4905 (license license:asl2.0)))
4907 (define-public ocaml-sexplib0
4909 (name "ocaml-sexplib0")
4911 (home-page "https://github.com/janestreet/sexplib0")
4916 (url (string-append home-page ".git"))
4917 (commit (string-append "v" version))))
4918 (file-name (git-file-name name version))
4921 "07v3ggyss7xhfv14bjk1n87sr42iqwj4cgjiv2lcdfkqk49i2bmi"))))
4922 (build-system dune-build-system)
4924 '(#:tests? #f)) ;no tests
4925 (synopsis "Library containing the definition of S-expressions and some
4927 (description "Part of Jane Street's Core library The Core suite of
4928 libraries is an industrial strength alternative to OCaml's standard library
4929 that was developed by Jane Street, the largest industrial user of OCaml.")
4930 (license license:expat)))
4932 (define-public ocaml-parsexp
4934 (name "ocaml-parsexp")
4936 (home-page "https://github.com/janestreet/parsexp")
4941 (url (string-append home-page ".git"))
4942 (commit (string-append "v" version))))
4943 (file-name (git-file-name name version))
4946 "1nyq23s5igd8cf3n4qxprjvhbmb6ighb3fy5mw7hxl0mdgsw5fvz"))))
4947 (build-system dune-build-system)
4949 `(("ocaml-sexplib0" ,ocaml-sexplib0)))
4950 (synopsis "S-expression parsing library")
4952 "This library provides generic parsers for parsing S-expressions from
4953 strings or other medium.
4955 The library is focused on performances but still provide full generic
4956 parsers that can be used with strings, bigstrings, lexing buffers,
4957 character streams or any other sources effortlessly.
4959 It provides three different class of parsers:
4962 the normal parsers, producing [Sexp.t] or [Sexp.t list] values
4964 the parsers with positions, building compact position sequences so
4965 that one can recover original positions in order to report properly
4966 located errors at little cost
4968 the Concrete Syntax Tree parsers, produce values of type
4969 @code{Parsexp.Cst.t} which record the concrete layout of the s-expression
4970 syntax, including comments
4973 This library is portable and doesn't provide IO functions. To read
4974 s-expressions from files or other external sources, you should use
4976 (license license:expat)))
4978 (define-public ocaml-sexplib
4980 (name "ocaml-sexplib")
4982 (home-page "https://github.com/janestreet/sexplib")
4987 (url (string-append home-page ".git"))
4988 (commit (string-append "v" version))))
4989 (file-name (git-file-name name version))
4992 "1qfl0m04rpcjvc4yw1hzh6r16jpwmap0sa9ax6zjji67dz4szpyb"))))
4993 (build-system dune-build-system)
4995 `(("ocaml-num" ,ocaml-num)
4996 ("ocaml-parsexp" ,ocaml-parsexp)
4997 ("ocaml-sexplib0" ,ocaml-sexplib0)))
4999 "Library for serializing OCaml values to and from S-expressions")
5001 "This package is part of Jane Street's Core library. Sexplib contains
5002 functionality for parsing and pretty-printing s-expressions.")
5003 (license license:expat)))
5005 (define-public ocaml-base
5009 (home-page "https://github.com/janestreet/base")
5014 (url (string-append home-page ".git"))
5015 (commit (string-append "v" version))))
5016 (file-name (git-file-name name version))
5019 "0j6xb4265jr41vw4fjzak6yr8s30qrnzapnc6rl1dxy8bjai0nir"))))
5020 (build-system dune-build-system)
5022 `(("ocaml-sexplib0" ,ocaml-sexplib0)))
5025 (modify-phases %standard-phases
5027 ;; make warnings non fatal (jbuilder behaviour)
5029 (invoke "dune" "build" "@install" "--profile=release"))))))
5031 "Full standard library replacement for OCaml")
5033 "Base is a complete and portable alternative to the OCaml standard
5034 library. It provides all standard functionalities one would expect
5035 from a language standard library. It uses consistent conventions
5036 across all of its module.
5038 Base aims to be usable in any context. As a result system dependent
5039 features such as I/O are not offered by Base. They are instead
5040 provided by companion libraries such as
5041 @url{https://github.com/janestreet/stdio, ocaml-stdio}.")
5042 (license license:expat)))
5044 (define-public ocaml-compiler-libs
5046 (name "ocaml-compiler-libs")
5048 (home-page "https://github.com/janestreet/ocaml-compiler-libs")
5053 (url (string-append home-page ".git"))
5054 (commit (string-append "v" version))))
5055 (file-name (git-file-name name version))
5058 "03jds7bszh8wwpfwxb3dg0gyr1j1872wxwx1xqhry5ir0i84bg0s"))))
5059 (build-system dune-build-system)
5061 '(#:tests? #f)) ;no tests
5062 (synopsis "Compiler libraries repackaged")
5063 (description "This packaeg simply repackages the OCaml compiler libraries
5064 so they don't expose everything at toplevel. For instance, @code{Ast_helper}
5065 is now @code{Ocaml_common.Ast_helper}.")
5066 (license license:expat)))
5068 (define-public ocaml-stdio
5070 (name "ocaml-stdio")
5072 (home-page "https://github.com/janestreet/stdio")
5077 (url (string-append home-page ".git"))
5078 (commit (string-append "v" version))))
5079 (file-name (git-file-name name version))
5082 "1facajqhvq34g2wrg368y0ajxd6lrj5b3lyzyj0jhdmraxajjcwn"))))
5083 (build-system dune-build-system)
5084 (inputs `(("ocaml-base" ,ocaml-base)
5085 ("ocaml-sexplib0" ,ocaml-sexplib0)))
5087 '(#:tests? #f)) ;no tests
5088 (synopsis "Standard IO library for OCaml")
5090 "Stdio implements simple input/output functionalities for OCaml. It
5091 re-exports the input/output functions of the OCaml standard libraries using
5092 a more consistent API.")
5093 (license license:expat)))
5095 (define-public ocaml-ppx-derivers
5097 (name "ocaml-ppx-derivers")
5100 "https://github.com/ocaml-ppx/ppx_derivers")
5105 (url (string-append home-page ".git"))
5107 (file-name (git-file-name name version))
5110 "0bnhihl1w31as5w2czly1v3d6pbir9inmgsjg2cj6aaj9v1dzd85"))))
5111 (build-system dune-build-system)
5113 '(#:tests? #f)) ;no tests
5114 (synopsis "Shared @code{@@deriving} plugin registry")
5116 "Ppx_derivers is a tiny package whose sole purpose is to allow
5117 ppx_deriving and ppx_type_conv to inter-operate gracefully when linked
5118 as part of the same ocaml-migrate-parsetree driver.")
5119 (license license:bsd-3)))
5121 (define-public ocaml-ppxlib
5123 (name "ocaml-ppxlib")
5125 (home-page "https://github.com/ocaml-ppx/ppxlib")
5130 (url (string-append home-page ".git"))
5132 (file-name (git-file-name name version))
5135 "1nr4igf5m4prvigvv470dnhfdhdw0p6hz6zw8gnm5bzcv7s2lg5l"))))
5136 (build-system dune-build-system)
5138 `(("ocaml-base" ,ocaml-base)
5139 ("ocaml-compiler-libs" ,ocaml-compiler-libs)
5140 ("ocaml-migrate-parsetree" ,ocaml-migrate-parsetree)
5141 ("ocaml-ppx-derivers" ,ocaml-ppx-derivers)
5142 ("ocaml-stdio" ,ocaml-stdio)
5143 ("ocaml-result" ,ocaml-result)
5144 ("ocaml-sexplib0" ,ocaml-sexplib0)))
5146 `(("ocaml-findlib" ,ocaml-findlib)))
5149 (modify-phases %standard-phases
5150 (add-before 'check 'set-topfind
5151 (lambda* (#:key inputs #:allow-other-keys)
5152 ;; add the line #directory ".." at the top of each file
5153 ;; using #use "topfind";; to be able to find topfind
5154 (let* ((findlib-path (assoc-ref inputs "ocaml-findlib"))
5156 (string-append findlib-path "/lib/ocaml/site-lib")))
5157 (substitute* '("test/base/test.ml"
5158 "test/deriving/test.ml"
5159 "test/driver/attributes/test.ml"
5160 "test/driver/non-compressible-suffix/test.ml"
5161 "test/driver/transformations/test.ml")
5162 (("#use \"topfind\";;" all)
5163 (string-append "#directory \"" findlib-libdir "\"\n"
5167 "Base library and tools for ppx rewriters")
5169 "A comprehensive toolbox for ppx development. It features:
5171 @item an OCaml AST / parser / pretty-printer snapshot, to create a full frontend
5172 independent of the version of OCaml;
5173 @item a library for library for ppx rewriters in general, and type-driven code
5174 generators in particular;
5176 a feature-full driver for OCaml AST transformers;
5177 @item a quotation mechanism allowing to write values representing the
5178 OCaml AST in the OCaml syntax;
5179 @item a generator of open recursion classes from type definitions.
5181 (license license:expat)))