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 "0hdxlkgiwjml9dpaa80282a8350if7mc1m6yz2mrd7gci3fszykx"))))
1779 (build-system ocaml-build-system)
1781 `(("ocamlbuild" ,ocamlbuild)
1785 #:build-flags '("native=true" "native-dynlink=true")
1787 (modify-phases %standard-phases
1788 (delete 'configure))))
1789 (home-page "http://erratique.ch/software/cmdliner")
1790 (synopsis "Declarative definition of command line interfaces for OCaml")
1791 (description "Cmdliner is a module for the declarative definition of command
1792 line interfaces. It provides a simple and compositional mechanism to convert
1793 command line arguments to OCaml values and pass them to your functions. The
1794 module automatically handles syntax errors, help messages and UNIX man page
1795 generation. It supports programs with single or multiple commands and respects
1796 most of the POSIX and GNU conventions.")
1797 (license license:bsd-3)))
1799 (define-public ocaml4.02-cmdliner
1800 (package-with-ocaml4.02 ocaml-cmdliner))
1802 (define-public ocaml-fmt
1809 (uri (string-append "http://erratique.ch/software/fmt/releases/fmt-"
1812 "1zj9azcxcn6skmb69ykgmi9z8c50yskwg03wqgh87lypgjdcz060"))))
1813 (build-system ocaml-build-system)
1815 `(("ocamlbuild" ,ocamlbuild)
1817 ("topkg" ,ocaml-topkg)))
1819 `(("result" ,ocaml-result)
1820 ("ocaml-uchar" ,ocaml-uchar)
1821 ("cmdliner" ,ocaml-cmdliner)))
1822 (arguments `(#:tests? #f
1823 #:build-flags (list "build" "--with-base-unix" "true"
1824 "--with-cmdliner" "true")
1826 (modify-phases %standard-phases
1827 (delete 'configure))))
1828 (home-page "http://erratique.ch/software/fmt")
1829 (synopsis "OCaml Format pretty-printer combinators")
1830 (description "Fmt exposes combinators to devise Format pretty-printing
1832 (license license:isc)))
1834 (define-public ocaml4.02-fmt
1835 (package-with-ocaml4.02 ocaml-fmt))
1837 (define-public ocaml-astring
1839 (name "ocaml-astring")
1844 (uri (string-append "http://erratique.ch/software/astring/releases/astring-"
1847 "0ixjwc3plrljvj24za3l9gy0w30lsbggp8yh02lwrzw61ls4cri0"))))
1848 (build-system ocaml-build-system)
1850 `(("ocamlbuild" ,ocamlbuild)
1852 ("topkg" ,ocaml-topkg)))
1855 #:build-flags (list "build")
1857 (modify-phases %standard-phases
1858 (delete 'configure))))
1859 (home-page "http://erratique.ch/software/astring")
1860 (synopsis "Alternative String module for OCaml")
1861 (description "Astring exposes an alternative String module for OCaml. This
1862 module balances minimality and expressiveness for basic, index-free, string
1863 processing and provides types and functions for substrings, string sets and
1864 string maps. The String module exposed by Astring has exception safe functions,
1865 removes deprecated and rarely used functions, alters some signatures and names,
1866 adds a few missing functions and fully exploits OCaml's newfound string
1868 (license license:isc)))
1870 (define-public ocaml4.02-astring
1871 (package-with-ocaml4.02 ocaml-astring))
1873 (define-public ocaml-alcotest
1875 (name "ocaml-alcotest")
1879 (uri (string-append "https://github.com/mirage/alcotest/releases/"
1880 "download/" version "/alcotest-" version ".tbz"))
1883 "0g5lzk0gpfx4q8hyhr460gr4lab5wakfxsmhfwvb3yinxwzs95gc"))))
1884 (build-system ocaml-build-system)
1887 #:build-flags (list "build")
1889 (modify-phases %standard-phases
1890 (delete 'configure))))
1892 `(("ocamlbuild" ,ocamlbuild)
1894 ("topkg" ,ocaml-topkg)))
1896 `(("fmt" ,ocaml-fmt)
1897 ("astring" ,ocaml-astring)))
1898 (home-page "https://github.com/mirage/alcotest")
1899 (synopsis "Lightweight OCaml test framework")
1900 (description "Alcotest exposes simple interface to perform unit tests. It
1901 exposes a simple TESTABLE module type, a check function to assert test
1902 predicates and a run function to perform a list of unit -> unit test callbacks.
1903 Alcotest provides a quiet and colorful output where only faulty runs are fully
1904 displayed at the end of the run (with the full logs ready to inspect), with a
1905 simple (yet expressive) query language to select the tests to run.")
1906 (license license:isc)))
1908 (define-public ocaml4.02-alcotest
1909 (package-with-ocaml4.02 ocaml-alcotest))
1911 (define-public ocaml-ppx-tools
1913 (name "ocaml-ppx-tools")
1914 (version "5.1+4.06.0")
1918 (uri (string-append "https://github.com/alainfrisch/ppx_tools/archive/"
1921 "0mncpy9v2mcjgnj7s2vqpp2b1ixv54djicfx66ic9wny9d202gj1"))))
1922 (build-system ocaml-build-system)
1924 `(#:phases (modify-phases %standard-phases (delete 'configure))
1927 `((ocaml4.02-variant . ,(delay ocaml4.02-ppx-tools))))
1928 (home-page "https://github.com/alainfrisch/ppx_tools")
1929 (synopsis "Tools for authors of ppx rewriters and other syntactic tools")
1930 (description "Tools for authors of ppx rewriters and other syntactic tools.")
1931 (license license:expat)))
1933 (define-public ocaml4.02-ppx-tools
1934 (let ((base (package-with-ocaml4.02 (strip-ocaml4.02-variant ocaml-ppx-tools))))
1937 (version "5.0+4.02.0")
1941 (uri (string-append "https://github.com/alainfrisch/ppx_tools/archive/"
1944 "0rjg4rngi8k9873z4zq95zn9hj8qyw1vcrf11y15aqasfpqq16rc")))))))
1946 (define-public ocaml-react
1948 (name "ocaml-react")
1953 (uri (string-append "http://erratique.ch/software/react/releases/react-"
1956 "0knhgbngphv5sp1yskfd97crf169qhpc0igr6w7vqw0q36lswyl8"))))
1957 (build-system ocaml-build-system)
1959 `(("ocamlbuild" ,ocamlbuild)
1963 #:build-flags (list "native=true" "native-dynlink=true")
1965 (modify-phases %standard-phases
1966 (delete 'configure))))
1967 (home-page "http://erratique.ch/software/react")
1968 (synopsis "Declarative events and signals for OCaml")
1969 (description "React is an OCaml module for functional reactive programming
1970 (FRP). It provides support to program with time varying values: declarative
1971 events and signals. React doesn't define any primitive event or signal, it
1972 lets the client choose the concrete timeline.")
1973 (license license:bsd-3)))
1975 (define-public ocaml4.02-react
1976 (package-with-ocaml4.02 ocaml-react))
1978 (define-public ocaml-ssl
1986 (url "https://github.com/savonet/ocaml-ssl.git")
1988 (file-name (git-file-name name version))
1990 "0fviq8xhp3qk7pmkl7knchywsipxgb7p0z489hj8qnf2sx8xzdmy"))))
1991 (build-system ocaml-build-system)
1994 #:make-flags (list "OCAMLFIND_LDCONF=ignore")
1996 (modify-phases %standard-phases
1997 (add-after 'unpack 'bootstrap
1998 (lambda* (#:key #:allow-other-keys)
1999 (system* "sh" "bootstrap")
2000 (substitute* "src/OCamlMakefile"
2001 (("/bin/sh") (which "bash")))
2002 (substitute* "configure"
2003 (("/bin/sh") (which "bash")))
2006 `(("autoconf" ,autoconf)
2007 ("automake" ,automake)
2009 (propagated-inputs `(("openssl" ,openssl)))
2010 (home-page "https://github.com/savonet/ocaml-ssl/")
2011 (synopsis "OCaml bindings for OpenSSL")
2013 "OCaml-SSL is a set of bindings for OpenSSL, a library for communicating
2014 through Transport Layer Security (@dfn{TLS}) encrypted connections.")
2015 (license license:lgpl2.1)))
2017 (define-public ocaml4.02-ssl
2018 (package-with-ocaml4.02 ocaml-ssl))
2020 (define-public ocaml-lwt
2027 (uri (string-append "https://github.com/ocsigen/lwt/archive/" version
2029 (file-name (string-append name "-" version ".tar.gz"))
2031 "0mhh019bjkg5xfvpy1pxs4xdxb759fyydmgb6l4j0qww1qgr8klp"))))
2032 (build-system dune-build-system)
2034 `(#:tests? #f; require lwt_ppx
2037 (modify-phases %standard-phases
2038 (add-before 'build 'configure
2040 (invoke "ocaml" "src/util/configure.ml" "-use-libev" "true")
2043 `(("ocaml-cppo" ,ocaml-cppo)
2044 ("ocaml-migrate-parsetree" ,ocaml-migrate-parsetree)
2045 ("pkg-config" ,pkg-config)
2046 ("ppx-tools-versioned" ,ocaml-ppx-tools-versioned)))
2051 `(("result" ,ocaml-result)
2052 ("ocaml-ssl" ,ocaml-ssl)
2053 ("ocaml-react" ,ocaml-react)))
2054 (home-page "https://github.com/ocsigen/lwt")
2055 (synopsis "Cooperative threads and I/O in monadic style")
2056 (description "Lwt provides typed, composable cooperative threads. These
2057 make it easy to run normally-blocking I/O operations concurrently in a single
2058 process. Also, in many cases, Lwt threads can interact without the need for
2059 locks or other synchronization primitives.")
2060 (license license:lgpl2.1)))
2062 (define-public ocaml4.02-lwt
2063 (package-with-ocaml4.02 ocaml-lwt))
2065 (define-public ocaml-lwt-log
2067 (name "ocaml-lwt-log")
2072 (uri (string-append "https://github.com/aantron/lwt_log/archive/" version
2074 (file-name (string-append name "-" version ".tar.gz"))
2076 "1lr62j2266pbsi54xmzsfvl2z7fi7smhak7fp1ybl8hssxwi6in2"))))
2077 (build-system dune-build-system)
2079 `(#:tests? #f; require lwt_ppx
2082 `(("lwt" ,ocaml-lwt)))
2083 (home-page "https://github.com/aantron/lwt_log")
2084 (synopsis "Logging library")
2085 (description "This package provides a deprecated logging component for
2087 (license license:lgpl2.1)))
2089 (define-public ocaml4.02-lwt-log
2090 (package-with-ocaml4.02 ocaml-lwt-log))
2092 (define-public ocaml-logs
2098 (uri (string-append "http://erratique.ch/software/logs/releases/"
2099 "logs-" version ".tbz"))
2102 "1khbn7jqpid83zn8rvyh1x1sirls7zc878zj4fz985m5xlsfy853"))))
2103 (build-system ocaml-build-system)
2106 #:build-flags (list "build" "--with-js_of_ocaml" "false")
2108 (modify-phases %standard-phases
2109 (delete 'configure))))
2111 `(("ocamlbuild" ,ocamlbuild)
2114 `(("fmt" ,ocaml-fmt)
2116 ("mtime" ,ocaml-mtime)
2117 ("result" ,ocaml-result)
2118 ("cmdliner" ,ocaml-cmdliner)
2119 ("topkg" ,ocaml-topkg)))
2120 (home-page "http://erratique.ch/software/logs")
2121 (synopsis "Logging infrastructure for OCaml")
2122 (description "Logs provides a logging infrastructure for OCaml. Logging is
2123 performed on sources whose reporting level can be set independently. Log
2124 message report is decoupled from logging and is handled by a reporter.")
2125 (license license:isc)))
2127 (define-public ocaml4.02-logs
2128 (package-with-ocaml4.02 ocaml-logs))
2130 (define-public ocaml-fpath
2132 (name "ocaml-fpath")
2136 (uri (string-append "http://erratique.ch/software/fpath/releases/"
2137 "fpath-" version ".tbz"))
2140 "05134ij27xjl6gaqsc65yl19vfj6cjxq3mbm9bf4mija8grdpn6g"))))
2141 (build-system ocaml-build-system)
2144 #:build-flags (list "build")
2146 (modify-phases %standard-phases
2147 (delete 'configure))))
2149 `(("ocamlbuild" ,ocamlbuild)
2152 `(("topkg" ,ocaml-topkg)
2153 ("astring" ,ocaml-astring)))
2154 (home-page "http://erratique.ch/software/fpath")
2155 (synopsis "File system paths for OCaml")
2156 (description "Fpath is an OCaml module for handling file system paths with
2157 POSIX or Windows conventions. Fpath processes paths without accessing the
2158 file system and is independent from any system library.")
2159 (license license:isc)))
2161 (define-public ocaml4.02-fpath
2162 (package-with-ocaml4.02 ocaml-fpath))
2164 (define-public ocaml-bos
2170 (uri (string-append "http://erratique.ch/software/bos/releases/"
2171 "bos-" version ".tbz"))
2174 "1ly66lysk4w6mdy4k1n3ynlpfpq7lw4wshcpzgx58v6x613w5s7q"))))
2175 (build-system ocaml-build-system)
2178 #:build-flags (list "build")
2180 (modify-phases %standard-phases
2181 (delete 'configure))))
2183 `(("ocamlbuild" ,ocamlbuild)
2186 `(("topkg" ,ocaml-topkg)
2187 ("astring" ,ocaml-astring)
2189 ("fpath" ,ocaml-fpath)
2190 ("logs" ,ocaml-logs)
2191 ("rresult" ,ocaml-rresult)))
2192 (home-page "http://erratique.ch/software/bos")
2193 (synopsis "Basic OS interaction for OCaml")
2194 (description "Bos provides support for basic and robust interaction with
2195 the operating system in OCaml. It has functions to access the process
2196 environment, parse command line arguments, interact with the file system and
2197 run command line programs.")
2198 (license license:isc)))
2200 (define-public ocaml4.02-bos
2201 (package-with-ocaml4.02 ocaml-bos))
2203 (define-public ocaml-xmlm
2209 (uri (string-append "http://erratique.ch/software/xmlm/releases/"
2210 "xmlm-" version ".tbz"))
2213 "1rrdxg5kh9zaqmgapy9bhdqyxbbvxxib3bdfg1vhw4rrkp1z0x8n"))))
2214 (build-system ocaml-build-system)
2217 #:build-flags (list "build")
2219 (modify-phases %standard-phases
2220 (delete 'configure))))
2222 `(("ocamlbuild" ,ocamlbuild)
2223 ("ocaml-topkg" ,ocaml-topkg)
2225 (home-page "http://erratique.ch/software/xmlm")
2226 (synopsis "Streaming XML codec for OCaml")
2227 (description "Xmlm is a streaming codec to decode and encode the XML data
2228 format. It can process XML documents without a complete in-memory
2229 representation of the data.")
2230 (license license:isc)))
2232 (define-public ocaml4.01-xmlm
2233 (package-with-ocaml4.01 ocaml-xmlm))
2235 (define-public ocaml4.02-xmlm
2236 (package-with-ocaml4.02 ocaml-xmlm))
2238 (define-public ocaml-ulex
2244 (uri (string-append "https://github.com/whitequark/ulex/archive/v"
2246 (file-name (string-append name "-" version ".tar.gz"))
2249 "16gnbhqs6y2v89vw4igzvxdf2g8ybh5643636824aldcv8sscac0"))))
2250 (build-system ocaml-build-system)
2252 `(#:phases (modify-phases %standard-phases (delete 'configure))
2256 (string-append "OCAMLBUILD=ocamlbuild -byte-plugin "
2257 "-cflags -I," (assoc-ref %build-inputs "camlp4")
2258 "/lib/ocaml/site-lib/camlp4"))))
2260 `(("camlp4" ,camlp4)
2261 ("ocamlbuild" ,ocamlbuild)))
2262 (home-page "http://www.cduce.org/download.html#side")
2263 (synopsis "Lexer generator for Unicode and OCaml")
2264 (description "Lexer generator for Unicode and OCaml.")
2265 (license license:expat)))
2267 (define-public ocaml4.02-ulex
2268 (package-with-ocaml4.02 ocaml-ulex))
2270 (define-public ocaml-uchar
2272 (name "ocaml-uchar")
2277 (uri (string-append "https://github.com/ocaml/uchar/releases/download/v"
2278 version "/uchar-" version ".tbz"))
2280 "1w2saw7zanf9m9ffvz2lvcxvlm118pws2x1wym526xmydhqpyfa7"))))
2281 (build-system ocaml-build-system)
2284 #:build-flags (list "native=true" "native-dynlink=true")
2286 (modify-phases %standard-phases
2287 (delete 'configure))))
2289 `(("ocamlbuild" ,ocamlbuild)
2291 (home-page "https://github.com/ocaml/uchar")
2292 (synopsis "Compatibility library for OCaml's Uchar module")
2293 (description "The uchar package provides a compatibility library for the
2294 `Uchar` module introduced in OCaml 4.03.")
2295 (license license:lgpl2.1)))
2297 (define-public ocaml4.02-uchar
2298 (package-with-ocaml4.02 ocaml-uchar))
2300 (define-public ocaml-uutf
2306 (uri (string-append "http://erratique.ch/software/uutf/releases/"
2307 "uutf-" version ".tbz"))
2310 "1gp96dcggq7s84934vimxh89caaxa77lqiff1yywbwkilkkjcfqj"))))
2311 (build-system ocaml-build-system)
2314 #:build-flags (list "build")
2316 (modify-phases %standard-phases
2317 (delete 'configure))))
2319 `(("ocamlbuild" ,ocamlbuild)
2321 ("topkg" ,ocaml-topkg)))
2323 `(("uchar" ,ocaml-uchar)
2324 ("cmdliner" ,ocaml-cmdliner)))
2325 (home-page "http://erratique.ch/software/uutf")
2326 (synopsis "Non-blocking streaming Unicode codec for OCaml")
2327 (description "Uutf is a non-blocking streaming codec to decode and encode
2328 the UTF-8, UTF-16, UTF-16LE and UTF-16BE encoding schemes. It can efficiently
2329 work character by character without blocking on IO. Decoders perform character
2330 position tracking and support newline normalization.
2332 Functions are also provided to fold over the characters of UTF encoded OCaml
2333 string values and to directly encode characters in OCaml Buffer.t values.")
2334 (license license:isc)))
2336 (define-public ocaml4.02-uutf
2337 (package-with-ocaml4.02 ocaml-uutf))
2339 (define-public ocaml-jsonm
2341 (name "ocaml-jsonm")
2345 (uri (string-append "http://erratique.ch/software/jsonm/releases/"
2346 "jsonm-" version ".tbz"))
2349 "1176dcmxb11fnw49b7yysvkjh0kpzx4s48lmdn5psq9vshp5c29w"))))
2350 (build-system ocaml-build-system)
2353 #:build-flags (list "build")
2355 (modify-phases %standard-phases
2356 (delete 'configure))))
2358 `(("ocamlbuild" ,ocamlbuild)
2360 ("topkg" ,ocaml-topkg)))
2362 `(("uutf" ,ocaml-uutf)
2363 ("cmdliner" ,ocaml-cmdliner)))
2364 (home-page "http://erratique.ch/software/jsonm")
2365 (synopsis "Non-blocking streaming JSON codec for OCaml")
2366 (description "Jsonm is a non-blocking streaming codec to decode and encode
2367 the JSON data format. It can process JSON text without blocking on IO and
2368 without a complete in-memory representation of the data.")
2369 (license license:isc)))
2371 (define-public ocaml4.02-jsonm
2372 (package-with-ocaml4.02 ocaml-jsonm))
2374 (define-public ocaml-ocurl
2376 (name "ocaml-ocurl")
2380 (uri (string-append "http://ygrek.org.ua/p/release/ocurl/ocurl-"
2384 "1ax3xdlzgb1zg7d0wr9nwgmh6a45a764m0wk8p6mx07ad94hz0q9"))))
2385 (build-system ocaml-build-system)
2388 (modify-phases %standard-phases
2389 (add-before 'configure 'fix-/bin/sh
2390 (lambda* (#:key inputs #:allow-other-keys)
2391 (substitute* "configure"
2392 (("-/bin/sh") (string-append "-" (which "bash")))))))))
2394 `(("pkg-config" ,pkg-config)))
2395 (inputs `(("curl" ,curl)))
2396 (home-page "http://ocurl.forge.ocamlcore.org/")
2397 (synopsis "OCaml bindings for libcurl")
2398 (description "Client-side URL transfer library, supporting HTTP and a
2399 multitude of other network protocols (FTP/SMTP/RTSP/etc).")
2400 (license license:isc)))
2402 (define-public ocaml4.02-ocurl
2403 (package-with-ocaml4.02 ocaml-ocurl))
2405 (define-public ocaml-base64
2407 (name "ocaml-base64")
2411 (uri (string-append "https://github.com/mirage/ocaml-base64/"
2412 "releases/download/v" version "/base64-"
2414 (file-name (string-append name "-" version ".tar.gz"))
2417 "1p45sawchmrkr22gkmydjc4ary23pisp58zsnb7iq7d82nxs1lfq"))))
2418 (build-system ocaml-build-system)
2420 `(#:build-flags (list "build" "--tests" "true")
2422 (modify-phases %standard-phases
2423 (delete 'configure))))
2425 `(("topkg" ,ocaml-topkg)
2426 ("ocamlbuild" ,ocamlbuild)
2428 ("rresult" ,ocaml-rresult)
2430 ("alcotest" ,ocaml-alcotest)))
2431 (home-page "https://github.com/mirage/ocaml-base64")
2432 (synopsis "Base64 encoding for OCaml")
2433 (description "Base64 is a group of similar binary-to-text encoding schemes
2434 that represent binary data in an ASCII string format by translating it into a
2435 radix-64 representation. It is specified in RFC 4648.")
2436 (license license:isc)))
2438 (define-public ocaml4.02-base64
2439 (package-with-ocaml4.02 ocaml-base64))
2441 (define-public ocamlify
2447 (uri (ocaml-forge-uri name version 1209))
2450 "1f0fghvlbfryf5h3j4as7vcqrgfjb4c8abl5y0y5h069vs4kp5ii"))))
2451 (build-system ocaml-build-system)
2452 ; tests are done during build
2454 `(#:ocaml ,ocaml-4.02
2455 #:findlib ,ocaml4.02-findlib
2457 (modify-phases %standard-phases
2459 (home-page "https://forge.ocamlcore.org/projects/ocamlify")
2460 (synopsis "Include files in OCaml code")
2461 (description "OCamlify allows to create OCaml source code by including
2462 whole files into OCaml string or string list. The code generated can be
2463 compiled as a standard OCaml file. It allows embedding external resources as
2465 (license license:lgpl2.1+))); with the OCaml static compilation exception
2467 (define-public omake
2473 (uri (string-append "http://download.camlcity.org/download/"
2474 "omake-" version ".tar.gz"))
2477 "07bdg1h5i7qnlv9xq81ad5hfypl10hxm771h4rjyl5cn8plhfcgz"))
2478 (patches (search-patches "omake-fix-non-determinism.patch"))))
2479 (build-system ocaml-build-system)
2482 (list (string-append "PREFIX=" (assoc-ref %outputs "out")))
2483 #:tests? #f ; no test target
2485 (modify-phases %standard-phases
2486 (add-before 'configure 'fix-makefile
2487 (lambda* (#:key outputs #:allow-other-keys)
2488 (substitute* "mk/osconfig_unix.mk"
2489 (("CC = cc") "CC = gcc")))))))
2491 `((ocaml4.02-variant . ,(delay ocaml4.02-omake))))
2492 (native-inputs `(("hevea" ,hevea)))
2493 (home-page "http://projects.camlcity.org/projects/omake.html")
2494 (synopsis "Build system designed for scalability and portability")
2495 (description "Similar to make utilities you may have used, but it features
2496 many additional enhancements, including:
2499 @item Support for projects spanning several directories or directory hierarchies.
2500 @item Fast, reliable, automated, scriptable dependency analysis using MD5 digests,
2501 with full support for incremental builds.
2502 @item Dependency analysis takes the command lines into account — whenever the
2503 command line used to build a target changes, the target is considered
2505 @item Fully scriptable, includes a library that providing support for standard
2506 tasks in C, C++, OCaml, and LaTeX projects, or a mixture thereof.
2508 (license (list license:lgpl2.1 ; libmojave
2509 license:expat ; OMake scripts
2510 license:gpl2)))) ; OMake itself, with ocaml linking exception
2513 (define-public ocaml4.02-omake
2514 (let ((base (package-with-ocaml4.02 (strip-ocaml4.02-variant omake))))
2520 (uri (string-append "http://download.camlcity.org/download/"
2521 "omake-" version ".tar.gz"))
2524 "1znnlkpz89hk44byvnl1pr92ym6hwfyyw2qm9clq446r6l2z4m64"))
2525 (patches (search-patches "omake-fix-non-determinism.patch")))))))
2527 (define-public ocaml-batteries
2529 (name "ocaml-batteries")
2533 (uri (string-append "https://github.com/ocaml-batteries-team/"
2534 "batteries-included/releases/download/v"
2535 version "/batteries-" version ".tar.gz"))
2538 "0lkdmv2my5hirkswmci2cch341n6wkkj2q8apjhs83sg6528caxi"))))
2539 (build-system ocaml-build-system)
2541 `(("ocamlbuild" ,ocamlbuild)
2542 ("qtest" ,ocaml-qtest)
2543 ("bisect" ,ocaml-bisect)
2544 ("ounit" ,ocaml-ounit)))
2546 `(("ocaml-num" ,ocaml-num)))
2549 (modify-phases %standard-phases
2550 (delete 'check) ; tests are run by the build phase
2552 (lambda* (#:key inputs outputs #:allow-other-keys)
2555 (substring str 0 (- (string-length str) 1)))
2557 (find-files "src" ".*.mliv")
2558 (find-files "src" ".*.mlv")
2559 (find-files "src" ".*.mlp")))))
2560 (apply invoke "ocamlbuild" "-no-links" "-use-ocamlfind" "-I" "num"
2561 "-lflag" "-dllpath-all" files)
2562 (for-each (lambda (file)
2563 (copy-file (string-append "_build/" file) file))
2565 (invoke "ocamlbuild" "-no-links" "-use-ocamlfind" "-I" "num"
2566 "-lflag" "-dllpath-all" "build/mkconf.byte")
2567 (copy-file "_build/build/mkconf.byte" "build/mkconf.byte")
2568 (invoke "make" "all")
2571 `((ocaml4.01-variant . ,(delay ocaml4.01-batteries))
2572 (ocaml4.02-variant . ,(delay ocaml4.02-batteries))))
2573 (home-page "http://batteries.forge.ocamlcore.org/")
2574 (synopsis "Development platform for the OCaml programming language")
2575 (description "Define a standard set of libraries which may be expected on
2576 every compliant installation of OCaml and organize these libraries into a
2577 hierarchy of modules.")
2578 (license license:lgpl2.1+)))
2580 (define-public ocaml4.02-batteries
2581 (let ((base (package-with-ocaml4.02 (strip-ocaml4.02-variant ocaml-batteries))))
2587 (uri (ocaml-forge-uri "batteries" version 1650))
2590 "1a97w3x2l1jr5x9kj5gqm1x6b0q9fjqdcsvls7arnl3bvzgsia0n"))))
2591 (propagated-inputs '()))))
2593 (define-public ocaml4.01-batteries
2594 (let ((base (package-with-ocaml4.01 (strip-ocaml4.01-variant ocaml4.02-batteries))))
2597 (name "ocaml4.01-batteries"))))
2599 (define-public ocaml-pcre
2605 (uri (string-append "https://github.com/mmottl/pcre-ocaml/archive"
2606 "/v" version ".tar.gz"))
2607 (file-name (string-append name "-" version ".tar.gz"))
2610 "0rj6dw79px4sj2kq0iss2nzq3rnsn9wivvc0f44wa1mppr6njfb3"))))
2611 (build-system ocaml-build-system)
2614 (modify-phases %standard-phases
2615 (add-after 'install 'link-lib
2616 (lambda* (#:key outputs #:allow-other-keys)
2617 (let* ((out (assoc-ref outputs "out"))
2618 (stubs (string-append out "/lib/ocaml/site-lib/stubslibs"))
2619 (lib (string-append out "/lib/ocaml/site-lib/pcre")))
2621 (symlink (string-append lib "/dllpcre_stubs.so")
2622 (string-append stubs "/dllpcre_stubs.so")))
2625 `(("batteries" ,ocaml-batteries)
2626 ("ocamlbuild" ,ocamlbuild)
2627 ("pcre:bin" ,pcre "bin")))
2628 (propagated-inputs `(("pcre" ,pcre)))
2629 (home-page "https://mmottl.github.io/pcre-ocaml")
2630 (synopsis "Bindings to the Perl Compatibility Regular Expressions library")
2631 (description "Pcre-ocaml offers library functions for string pattern
2632 matching and substitution, similar to the functionality offered by the Perl
2634 (license license:lgpl2.1+))); with the OCaml link exception
2636 (define-public ocaml4.02-pcre
2637 (package-with-ocaml4.02 ocaml-pcre))
2639 (define-public ocaml-expect
2641 (name "ocaml-expect")
2645 (uri (ocaml-forge-uri name version 1736))
2648 "098qvg9d4yrqzr5ax291y3whrpax0m3sx4gi6is0mblc96r9yqk0"))))
2651 (build-system ocaml-build-system)
2653 `(("ocamlbuild" ,ocamlbuild)
2654 ("ocaml-num" ,ocaml-num)
2655 ("ocaml-pcre" ,ocaml-pcre)
2656 ("ounit" ,ocaml-ounit)))
2657 (propagated-inputs `(("batteries" ,ocaml-batteries)))
2658 (home-page "https://forge.ocamlcore.org/projects/ocaml-expect/")
2659 (synopsis "Simple implementation of expect")
2660 (description "Help building unitary testing of interactive program. You
2661 can match the question using a regular expression or a timeout.")
2662 (license license:lgpl2.1+))) ; with the OCaml static compilation exception
2664 (define-public ocaml4.02-fileutils
2666 (name "ocaml4.02-fileutils")
2670 (uri (ocaml-forge-uri name version 1728))
2673 "1rc4cqlvdhbs55i85zfbfhz938fsy4fj6kwlkfm3ra7bpwn8bmpd"))))
2674 (build-system ocaml-build-system)
2676 `(#:ocaml ,ocaml-4.02
2677 #:findlib ,ocaml4.02-findlib))
2679 `(("ounit" ,ocaml4.02-ounit)))
2680 (home-page "http://ocaml-fileutils.forge.ocamlcore.org")
2681 (synopsis "Pure OCaml functions to manipulate real file and filename")
2682 (description "Library to provide pure OCaml functions to manipulate real
2683 file (POSIX like) and filename.")
2684 (license license:lgpl2.1+))) ; with the OCaml static compilation exception
2686 (define-public ocaml-oasis
2688 (name "ocaml-oasis")
2692 (uri (ocaml-forge-uri name version 1757))
2695 "0bn13mzfa98dq3y0jwzzndl55mnywaxv693z6f1rlvpdykp3vdqq"))
2696 (modules '((guix build utils)))
2699 (substitute* "test/test-main/Test.ml"
2700 ;; most of these tests fail because ld cannot find crti.o, but according
2701 ;; to the log file, the environment variables {LD_,}LIBRARY_PATH
2702 ;; are set correctly when LD_LIBRARY_PATH is defined beforhand.
2703 (("TestBaseCompat.tests;") "")
2704 (("TestExamples.tests;") "")
2705 (("TestFull.tests;") "")
2706 (("TestPluginDevFiles.tests;") "")
2707 (("TestPluginInternal.tests;") "")
2708 (("TestPluginOCamlbuild.tests;") "")
2709 (("TestPluginOMake.tests;") ""))
2711 (build-system ocaml-build-system)
2715 `(("ocamlbuild" ,ocamlbuild)
2716 ("ocamlify" ,ocamlify)
2717 ("ocamlmod" ,ocamlmod)))
2718 (home-page "https://oasis.forge.ocamlcore.org")
2719 (synopsis "Integrates a configure, build, install system in OCaml projects")
2720 (description "OASIS is a tool to integrate a configure, build and install
2721 system in your OCaml projects. It helps to create standard entry points in your
2722 build system and allows external tools to analyse your project easily.")
2723 (license license:lgpl2.1+))) ; with ocaml static compilation exception
2725 (define-public ocaml4.02-oasis
2726 (package-with-ocaml4.02 ocaml-oasis))
2728 (define-public ocaml-js-build-tools
2730 (name "ocaml-js-build-tools")
2731 (version "113.33.06")
2732 (source (janestreet-origin "js-build-tools" version
2733 "0r8z4fz8iy5y6hkdlkpwf6rk4qigcr3dzyv35585xgg2ahf12zy6"))
2735 `(("oasis" ,ocaml-oasis)
2736 ("ocamlbuild" ,ocamlbuild)
2738 (build-system ocaml-build-system)
2739 (arguments janestreet-arguments)
2740 (home-page "https://github.com/janestreet/js-build-tools")
2741 (synopsis "Collection of tools to help building Jane Street Packages")
2742 (description "This package contains tools to help building Jane Street
2743 packages, but can be used for other purposes. It contains:
2745 @item an @command{oasis2opam-install} tool to produce a @file{.install} file
2746 from the oasis build log
2747 @item a @code{js_build_tools} ocamlbuild plugin with various goodies.
2749 (license license:asl2.0)))
2751 (define-public ocaml4.02-js-build-tools
2752 (package-with-ocaml4.02 ocaml-js-build-tools))
2754 (define-public ocaml4.02-bin-prot
2756 (name "ocaml4.02-bin-prot")
2757 (version "113.33.03")
2758 (source (janestreet-origin "bin_prot" version
2759 "1ws8c017z8nbj3vw92ndvjk9011f71rmp3llncbv8r5fc76wqv3l"))
2760 (build-system ocaml-build-system)
2762 `(("js-build-tools" ,ocaml4.02-js-build-tools)
2765 (ensure-keyword-arguments janestreet-arguments
2766 `(#:ocaml ,ocaml-4.02
2767 #:findlib ,ocaml4.02-findlib)))
2768 (home-page "https://github.com/janestreet/bin_prot/")
2769 (synopsis "Binary protocol generator")
2770 (description "This library contains functionality for reading and writing
2771 OCaml-values in a type-safe binary protocol. It is extremely efficient,
2772 typically supporting type-safe marshalling and unmarshalling of even highly
2773 structured values at speeds sufficient to saturate a gigabit connection. The
2774 protocol is also heavily optimized for size, making it ideal for long-term
2775 storage of large amounts of data.")
2776 (license license:asl2.0)))
2778 (define-public ocaml4.02-fieldslib
2780 (name "ocaml4.02-fieldslib")
2781 (version "113.33.03")
2782 (source (janestreet-origin "fieldslib" version
2783 "1rm3bn54bzk2hlq8f3w067ak8s772w4a8f78i3yh79vxfzq8ncvv"))
2784 (build-system ocaml-build-system)
2786 `(("js-build-tools" ,ocaml4.02-js-build-tools)
2789 (ensure-keyword-arguments janestreet-arguments
2790 `(#:ocaml ,ocaml-4.02
2791 #:findlib ,ocaml4.02-findlib)))
2792 (home-page "https://github.com/janestreet/fieldslib/")
2793 (synopsis "Syntax extension to record fields")
2794 (description "Syntax extension to define first class values representing
2795 record fields, to get and set record fields, iterate and fold over all fields
2796 of a record and create new record values.")
2797 (license license:asl2.0)))
2799 (define-public ocaml4.02-ppx-core
2801 (name "ocaml4.02-ppx-core")
2802 (version "113.33.03")
2803 (source (janestreet-origin "ppx_core" version
2804 "0f69l4czhgssnhb5ds2j9dbqjyz8dp1y3i3x0i4h6pxnms20zbxa"))
2805 (build-system ocaml-build-system)
2807 `(("js-build-tools" ,ocaml4.02-js-build-tools)
2809 (inputs `(("ppx-tools" ,ocaml4.02-ppx-tools)))
2811 (ensure-keyword-arguments janestreet-arguments
2812 `(#:ocaml ,ocaml-4.02
2813 #:findlib ,ocaml4.02-findlib)))
2814 (home-page "https://github.com/janestreet/ppx_core/")
2815 (synopsis "Standard library for ppx rewriters")
2816 (description "Ppx_core is a standard library for OCaml AST transformers.
2819 @item various auto-generated AST traversal using an open recursion scheme
2820 @item helpers for building AST fragments
2821 @item helpers for matching AST fragments
2822 @item a framework for dealing with attributes and extension points.
2824 (license license:asl2.0)))
2826 (define-public ocaml4.02-ppx-optcomp
2828 (name "ocaml4.02-ppx-optcomp")
2829 (version "113.33.03")
2830 (source (janestreet-origin "ppx_optcomp" version
2831 "13an8p2r7sd0d5lv54mlzrxdni47408bwqi3bjcx4m6005170q30"))
2832 (build-system ocaml-build-system)
2834 `(("js-build-tools" ,ocaml4.02-js-build-tools)
2837 `(("ppx-tools" ,ocaml4.02-ppx-tools)
2838 ("ppx-core" ,ocaml4.02-ppx-core)))
2840 (ensure-keyword-arguments janestreet-arguments
2841 `(#:ocaml ,ocaml-4.02
2842 #:findlib ,ocaml4.02-findlib)))
2843 (home-page "https://github.com/janestreet/ppx_optcomp/")
2844 (synopsis "Optional compilation for OCaml")
2845 (description "Ppx_optcomp stands for Optional Compilation. It is a tool
2846 used to handle optional compilations of pieces of code depending of the word
2847 size, the version of the compiler, ...")
2848 (license license:asl2.0)))
2850 (define-public ocaml4.02-ppx-driver
2852 (name "ocaml4.02-ppx-driver")
2853 (version "113.33.03")
2854 (source (janestreet-origin "ppx_driver" version
2855 "011zzr45897j49b7iiybb29k7pspcx36mlnp7nh6pxb8b0ga76fh"))
2856 (build-system ocaml-build-system)
2858 `(("js-build-tools" ,ocaml4.02-js-build-tools)
2860 ("ppx-optcomp" ,ocaml4.02-ppx-optcomp)))
2862 `(("ppx-optcomp" ,ocaml4.02-ppx-optcomp)
2863 ("ppx-core" ,ocaml4.02-ppx-core)))
2865 (ensure-keyword-arguments janestreet-arguments
2866 `(#:ocaml ,ocaml-4.02
2867 #:findlib ,ocaml4.02-findlib)))
2868 (home-page "https://github.com/janestreet/ppx_driver/")
2869 (synopsis "Feature-full driver for OCaml AST transformers")
2870 (description "A driver is an executable created from a set of OCaml AST
2871 transformers linked together with a command line frontend. The aim is to
2872 provide a tool that can be used to:
2874 @item easily view the pre-processed version of a file, no need to construct a
2875 complex command line: @command{ppx file.ml} will do
2876 @item use a single executable to run several transformations: no need to fork
2877 many times just for pre-processing
2878 @item improved errors for misspelled/misplaced attributes and extension points.
2880 (license license:asl2.0)))
2882 (define-public ocaml-cppo
2889 (uri (string-append "https://github.com/mjambon/cppo/archive/v" version
2892 "1dkm3d5h6h56y937gcdk2wixlpzl59vv5pmiafglr89p20kf7gqf"))
2893 (file-name (string-append name "-" version ".tar.gz"))))
2894 (build-system dune-build-system)
2897 #:build-flags (list "--profile" "release")))
2899 `(("ocamlbuild" ,ocamlbuild)))
2900 (home-page "https://github.com/mjambon/cppo")
2901 (synopsis "Equivalent of the C preprocessor for OCaml programs")
2902 (description "Cppo is an equivalent of the C preprocessor for OCaml
2903 programs. It allows the definition of simple macros and file inclusion. Cpp ois:
2905 @item more OCaml-friendly than cpp
2906 @item easy to learn without consulting a manual
2907 @item reasonably fast
2908 @item simple to install and to maintain.
2910 (license license:bsd-3)))
2912 (define-public ocaml4.02-cppo
2913 (package-with-ocaml4.02 ocaml-cppo))
2915 ;; this package is not reproducible. This is related to temporary filenames
2916 ;; such as findlib_initxxxxx where xxxxx is random.
2917 (define-public ocaml4.02-ppx-deriving
2919 (name "ocaml4.02-ppx-deriving")
2924 (uri (string-append "https://github.com/whitequark/ppx_deriving//archive/v"
2927 "1fr16g121j6zinwcprzlhx2py4271n9jzs2m9hq2f3qli2b1p0vl"))
2928 (file-name (string-append name "-" version ".tar.gz"))))
2929 (build-system ocaml-build-system)
2931 `(("js-build-tools" ,ocaml4.02-js-build-tools)
2932 ("cppo" ,ocaml4.02-cppo)
2933 ("ounit" ,ocaml4.02-ounit)
2936 `(("result" ,ocaml4.02-result)
2937 ("ppx-tools" ,ocaml4.02-ppx-tools)))
2939 `(#:ocaml ,ocaml-4.02
2940 #:findlib ,ocaml4.02-findlib
2942 (modify-phases %standard-phases
2944 (add-before 'install 'fix-environment
2945 (lambda* (#:key outputs #:allow-other-keys)
2946 ;; the installation procedures looks for the installed module
2948 (string-append (getenv "OCAMLPATH") ":"
2949 (getenv "OCAMLFIND_DESTDIR"))))))))
2950 (home-page "https://github.com/whitequark/ppx_deriving/")
2951 (synopsis "Type-driven code generation for OCaml >=4.02")
2952 (description "Ppx_deriving provides common infrastructure for generating
2953 code based on type definitions, and a set of useful plugins for common tasks.")
2954 (license license:expat)))
2956 (define-public ocaml4.02-ppx-type-conv
2958 (name "ocaml4.02-ppx-type-conv")
2959 (version "113.33.03")
2961 (janestreet-origin "ppx_type_conv" version
2962 "1sp602ads2f250nv4d4rgw54d14k7flyhb4w8ff084f657hhmxv2"))
2963 (build-system ocaml-build-system)
2965 `(("js-build-tools" ,ocaml4.02-js-build-tools)
2968 `(("ppx-deriving" ,ocaml4.02-ppx-deriving)
2969 ("ppx-core" ,ocaml4.02-ppx-core)
2970 ("ppx-driver" ,ocaml4.02-ppx-driver)))
2972 (ensure-keyword-arguments janestreet-arguments
2973 `(#:ocaml ,ocaml-4.02
2974 #:findlib ,ocaml4.02-findlib)))
2975 (home-page "https://github.com/janestreet/ppx_type_conv/")
2976 (synopsis "Support Library for type-driven code generators")
2977 (description "The type_conv library factors out functionality needed by
2978 different preprocessors that generate code from type specifications.")
2979 (license license:asl2.0)))
2981 (define-public ocaml4.02-ppx-inline-test
2983 (name "ocaml4.02-ppx-inline-test")
2984 (version "113.33.03")
2985 (source (janestreet-origin "ppx_inline_test" version
2986 "0859ni43fl39dd5g6cxfhq0prxmx59bd2bfq8jafp593ba4q0icq"))
2987 (build-system ocaml-build-system)
2989 `(("js-build-tools" ,ocaml4.02-js-build-tools)
2991 ("ppx-core" ,ocaml4.02-ppx-core)))
2993 `(("ppx-driver" ,ocaml4.02-ppx-driver)
2994 ("ppx-tools" ,ocaml4.02-ppx-tools)
2995 ("ppx-core" ,ocaml4.02-ppx-core)))
2997 (ensure-keyword-arguments janestreet-arguments
2998 `(#:ocaml ,ocaml-4.02
2999 #:findlib ,ocaml4.02-findlib)))
3000 (home-page "https://github.com/janestreet/ppx_inline_test/")
3001 (synopsis "Syntax extension for writing in-line tests in ocaml code")
3002 (description "Syntax extension for writing in-line tests in ocaml code.")
3003 (license license:asl2.0)))
3005 (define-public ocaml4.02-ppx-bench
3007 (name "ocaml4.02-ppx-bench")
3008 (version "113.33.03")
3009 (source (janestreet-origin "ppx_bench" version
3010 "1hky3y17qpb925rymf97wv54di9gaqdmkix7wpkjw14qzl512b68"))
3011 (build-system ocaml-build-system)
3013 `(("js-build-tools" ,ocaml4.02-js-build-tools)
3015 ("ppx-core" ,ocaml4.02-ppx-core)))
3017 `(("ppx-driver" ,ocaml4.02-ppx-driver)
3018 ("ppx-tools" ,ocaml4.02-ppx-tools)
3019 ("ppx-inline-test" ,ocaml4.02-ppx-inline-test)
3020 ("ppx-core" ,ocaml4.02-ppx-core)))
3022 (ensure-keyword-arguments janestreet-arguments
3023 `(#:ocaml ,ocaml-4.02
3024 #:findlib ,ocaml4.02-findlib)))
3025 (home-page "https://github.com/janestreet/ppx_bench/")
3026 (synopsis "Syntax extension for writing in-line benchmarks in ocaml code")
3027 (description "Syntax extension for writing in-line benchmarks in ocaml code.")
3028 (license license:asl2.0)))
3030 (define-public ocaml4.02-ppx-compare
3032 (name "ocaml4.02-ppx-compare")
3033 (version "113.33.03")
3034 (source (janestreet-origin "ppx_compare" version
3035 "0bfhi33kq9l4q6zzc6svki2csracz5j4731c3npcy6cs73jynn0z"))
3036 (build-system ocaml-build-system)
3038 `(("js-build-tools" ,ocaml4.02-js-build-tools)
3040 ("ppx-core" ,ocaml4.02-ppx-core)))
3042 `(("ppx-driver" ,ocaml4.02-ppx-driver)
3043 ("ppx-tools" ,ocaml4.02-ppx-tools)
3044 ("ppx-core" ,ocaml4.02-ppx-core)
3045 ("ppx-type-conv" ,ocaml4.02-ppx-type-conv)))
3047 (ensure-keyword-arguments janestreet-arguments
3048 `(#:ocaml ,ocaml-4.02
3049 #:findlib ,ocaml4.02-findlib)))
3050 (home-page "https://github.com/janestreet/ppx_compare/")
3051 (synopsis "Generation of comparison functions from types")
3052 (description "Generation of fast comparison functions from type expressions
3053 and definitions. Ppx_compare is a ppx rewriter that derives comparison functions
3054 from type representations. The scaffolded functions are usually much faster
3055 than ocaml's Pervasives.compare. Scaffolding functions also gives you more
3056 flexibility by allowing you to override them for a specific type and more safety
3057 by making sure that you only compare comparable values.")
3058 (license license:asl2.0)))
3060 (define-public ocaml4.02-sexplib
3062 (name "ocaml4.02-sexplib")
3063 (version "113.33.03")
3064 (source (janestreet-origin "sexplib" version
3065 "1ffjmj8if9lyv965cgn2ld1xv7g52qsr8mqflbm515ck1i8l2ima"))
3066 (build-system ocaml-build-system)
3068 `(("js-build-tools" ,ocaml4.02-js-build-tools)
3071 (ensure-keyword-arguments janestreet-arguments
3072 `(#:ocaml ,ocaml-4.02
3073 #:findlib ,ocaml4.02-findlib)))
3074 (home-page "https://github.com/janestreet/sexplib/")
3075 (synopsis "Library for serializing OCaml values to and from S-expressions")
3076 (description "Sexplib contains functionality for parsing and pretty-printing
3078 (license license:asl2.0)))
3080 (define-public ocaml4.02-typerep
3082 (name "ocaml4.02-typerep")
3083 (version "113.33.03")
3084 (source (janestreet-origin "typerep" version
3085 "1b9v5bmi824a9d4sx0f40ixq0yfcbiqxafg4a1jx95xg9199zafy"))
3086 (build-system ocaml-build-system)
3088 `(("js-build-tools" ,ocaml4.02-js-build-tools)
3091 (ensure-keyword-arguments janestreet-arguments
3092 `(#:ocaml ,ocaml-4.02
3093 #:findlib ,ocaml4.02-findlib)))
3094 (home-page "https://github.com/janestreet/typerep/")
3095 (synopsis "Typerep is a library for runtime types")
3096 (description "Typerep is a library for runtime types.")
3097 (license license:asl2.0)))
3099 (define-public ocaml4.02-variantslib
3101 (name "ocaml4.02-variantslib")
3102 (version "113.33.03")
3103 (source (janestreet-origin "variantslib" version
3104 "05vp799vl38fvl98ga5miwbzh09cnnpapi6q6gdvwyqi6w7s919n"))
3105 (build-system ocaml-build-system)
3107 `(("js-build-tools" ,ocaml4.02-js-build-tools)
3110 (ensure-keyword-arguments janestreet-arguments
3111 `(#:ocaml ,ocaml-4.02
3112 #:findlib ,ocaml4.02-findlib)))
3113 (home-page "https://github.com/janestreet/variantslib")
3114 (synopsis "OCaml variants as first class values")
3115 (description "OCaml variants as first class values.")
3116 (license license:asl2.0)))
3118 (define-public ocaml4.02-ppx-sexp-conv
3120 (name "ocaml4.02-ppx-sexp-conv")
3121 (version "113.33.03")
3122 (source (janestreet-origin "ppx_sexp_conv" version
3123 "1rbj6d5dl625gdxih34xcrdvikci6h8i2dl9x3wraa4qrgishiw7"))
3124 (build-system ocaml-build-system)
3126 `(("js-build-tools" ,ocaml4.02-js-build-tools)
3128 ("ppx-core" ,ocaml4.02-ppx-core)))
3130 `(("sexplib" ,ocaml4.02-sexplib)
3131 ("ppx-core" ,ocaml4.02-ppx-core)
3132 ("ppx-type-conv" ,ocaml4.02-ppx-type-conv)
3133 ("ppx-tools" ,ocaml4.02-ppx-tools)))
3135 (ensure-keyword-arguments janestreet-arguments
3136 `(#:ocaml ,ocaml-4.02
3137 #:findlib ,ocaml4.02-findlib)))
3138 (home-page "https://github.com/janestreet/ppx_sexp_conv")
3139 (synopsis "Generation of S-expression conversion functions from type definitions")
3140 (description "Generation of S-expression conversion functions from type
3142 (license license:asl2.0)))
3144 (define-public ocaml4.02-ppx-variants-conv
3146 (name "ocaml4.02-ppx-variants-conv")
3147 (version "113.33.03")
3148 (source (janestreet-origin "ppx_variants_conv" version
3149 "0vnn2l1118cj72413d3f7frlw6yc09l8f64jlzkzbgb9bxpalx34"))
3150 (build-system ocaml-build-system)
3152 `(("js-build-tools" ,ocaml4.02-js-build-tools)
3155 `(("ppx-core" ,ocaml4.02-ppx-core)
3156 ("variantslib" ,ocaml4.02-variantslib)
3157 ("ppx-tools" ,ocaml4.02-ppx-tools)
3158 ("ppx-type-conv" ,ocaml4.02-ppx-type-conv)))
3160 (ensure-keyword-arguments janestreet-arguments
3161 `(#:ocaml ,ocaml-4.02
3162 #:findlib ,ocaml4.02-findlib)))
3163 (home-page "https://github.com/janestreet/ppx_variants_conv")
3164 (synopsis "Generation of accessor and iteration functions for ocaml variant
3166 (description "Generation of accessor and iteration functions for ocaml
3168 (license license:asl2.0)))
3170 (define-public ocaml4.02-ppx-here
3172 (name "ocaml4.02-ppx-here")
3173 (version "113.33.03")
3174 (source (janestreet-origin "ppx_here" version
3175 "1ay8lfxi0qg3ib2zkwh4h0vqk3gjmxaz572gzab0bbxyqn3z86v7"))
3176 (build-system ocaml-build-system)
3178 `(("js-build-tools" ,ocaml4.02-js-build-tools)
3181 `(("ppx-driver" ,ocaml4.02-ppx-driver)
3182 ("ppx-core" ,ocaml4.02-ppx-core)))
3184 (ensure-keyword-arguments janestreet-arguments
3185 `(#:ocaml ,ocaml-4.02
3186 #:findlib ,ocaml4.02-findlib)))
3187 (home-page "https://github.com/janestreet/ppx_here")
3188 (synopsis "Expands [%here] into its location")
3189 (description "Expands [%here] into its location.")
3190 (license license:asl2.0)))
3192 (define-public ocaml4.02-ppx-assert
3194 (name "ocaml4.02-ppx-assert")
3195 (version "113.33.03")
3196 (source (janestreet-origin "ppx_assert" version
3197 "1k5kxmqkibp5fk25pgz81f3c1r4mgvb5byzf6bnmxd24y60wn46p"))
3198 (build-system ocaml-build-system)
3200 `(("js-build-tools" ,ocaml4.02-js-build-tools)
3203 `(("ppx-compare" ,ocaml4.02-ppx-compare)
3204 ("ppx-core" ,ocaml4.02-ppx-core)
3205 ("ppx-driver" ,ocaml4.02-ppx-driver)
3206 ("ppx-sexp-conv" ,ocaml4.02-ppx-sexp-conv)
3207 ("ppx-tools" ,ocaml4.02-ppx-tools)
3208 ("ppx-type-conv" ,ocaml4.02-ppx-type-conv)
3209 ("ppx-sexplib" ,ocaml4.02-sexplib)
3210 ("ppx-here" ,ocaml4.02-ppx-here)))
3212 (ensure-keyword-arguments janestreet-arguments
3213 `(#:ocaml ,ocaml-4.02
3214 #:findlib ,ocaml4.02-findlib)))
3215 (home-page "https://github.com/janestreet/ppx_assert")
3216 (synopsis "Assert-like extension nodes that raise useful errors on failure")
3217 (description "Assert-like extension nodes that raise useful errors on failure.")
3218 (license license:asl2.0)))
3220 (define-public ocaml4.02-ppx-enumerate
3222 (name "ocaml4.02-ppx-enumerate")
3223 (version "113.33.03")
3224 (source (janestreet-origin "ppx_enumerate" version
3225 "15g7yfv9wg2h9r6k6q1zrhygmsl4xrfn25mrb0i4czjjivzmxjh4"))
3226 (build-system ocaml-build-system)
3228 `(("js-build-tools" ,ocaml4.02-js-build-tools)
3231 `(("ppx-tools" ,ocaml4.02-ppx-tools)
3232 ("ppx-type-conv" ,ocaml4.02-ppx-type-conv)
3233 ("ppx-core" ,ocaml4.02-ppx-core)))
3235 (ensure-keyword-arguments janestreet-arguments
3236 `(#:ocaml ,ocaml-4.02
3237 #:findlib ,ocaml4.02-findlib)))
3238 (home-page "https://github.com/janestreet/ppx_enumerate")
3239 (synopsis "Generate a list containing all values of a finite type")
3240 (description "Ppx_enumerate is a ppx rewriter which generates a definition
3241 for the list of all values of a type (for a type which only has finitely
3243 (license license:asl2.0)))
3245 (define-public ocaml4.02-ppx-let
3247 (name "ocaml4.02-ppx-let")
3248 (version "113.33.03")
3249 (source (janestreet-origin "ppx_let" version
3250 "0gd6d3gdaqfwjcs7gaw1qxc30i584q6a86ndaj1bx1q63xqd6yx9"))
3251 (build-system ocaml-build-system)
3253 `(("js-build-tools" ,ocaml4.02-js-build-tools)
3256 `(("ppx-driver" ,ocaml4.02-ppx-driver)
3257 ("ppx-core" ,ocaml4.02-ppx-core)))
3259 (ensure-keyword-arguments janestreet-arguments
3260 `(#:ocaml ,ocaml-4.02
3261 #:findlib ,ocaml4.02-findlib)))
3262 (home-page "https://github.com/janestreet/ppx_let")
3263 (synopsis "Monadic let-bindings")
3264 (description "A ppx rewriter for monadic and applicative let bindings,
3265 match expressions, and if expressions.")
3266 (license license:asl2.0)))
3268 (define-public ocaml4.02-ppx-typerep-conv
3270 (name "ocaml4.02-ppx-typerep-conv")
3271 (version "113.33.03")
3272 (source (janestreet-origin "ppx_typerep_conv" version
3273 "0g0xqm9s1b2jjvxb8yp69281q2s3bwz6sibn10fvgcdawpa0rmrg"))
3274 (build-system ocaml-build-system)
3276 `(("js-build-tools" ,ocaml4.02-js-build-tools)
3279 `(("ppx-tools" ,ocaml4.02-ppx-tools)
3280 ("ppx-type-conv" ,ocaml4.02-ppx-type-conv)
3281 ("ppx-core" ,ocaml4.02-ppx-core)
3282 ("typerep" ,ocaml4.02-typerep)))
3284 (ensure-keyword-arguments janestreet-arguments
3285 `(#:ocaml ,ocaml-4.02
3286 #:findlib ,ocaml4.02-findlib)))
3287 (home-page "https://github.com/janestreet/ppx_typerep_conv")
3288 (synopsis "Generation of runtime types from type declarations")
3289 (description "Automatic generation of runtime types from type definitions.")
3290 (license license:asl2.0)))
3292 (define-public ocaml4.02-ppx-sexp-value
3294 (name "ocaml4.02-ppx-sexp-value")
3295 (version "113.33.03")
3296 (source (janestreet-origin "ppx_sexp_value" version
3297 "0m3ag23mbqm0i2pv1dzilfks15ipa5q60mf57a0cd3p0pvarq10g"))
3298 (build-system ocaml-build-system)
3300 `(("js-build-tools" ,ocaml4.02-js-build-tools)
3303 `(("ppx-driver" ,ocaml4.02-ppx-driver)
3304 ("ppx-here" ,ocaml4.02-ppx-here)
3305 ("ppx-sexp-conv" ,ocaml4.02-ppx-sexp-conv)
3306 ("ppx-tools" ,ocaml4.02-ppx-tools)
3307 ("ppx-core" ,ocaml4.02-ppx-core)))
3309 (ensure-keyword-arguments janestreet-arguments
3310 `(#:ocaml ,ocaml-4.02
3311 #:findlib ,ocaml4.02-findlib)))
3312 (home-page "https://github.com/janestreet/ppx_sexp_value/")
3313 (synopsis "Simplify building s-expressions from ocaml values")
3314 (description "A ppx rewriter that simplifies building s-expressions from
3316 (license license:asl2.0)))
3318 (define-public ocaml4.02-ppx-pipebang
3320 (name "ocaml4.02-ppx-pipebang")
3321 (version "113.33.03")
3322 (source (janestreet-origin "ppx_pipebang" version
3323 "1965c7hymp26ncmjs0pfxi2s5jlj60z2c9b194lgcwxqiav56pcw"))
3324 (build-system ocaml-build-system)
3326 `(("js-build-tools" ,ocaml4.02-js-build-tools)
3329 `(("ppx-driver" ,ocaml4.02-ppx-driver)
3330 ("ppx-tools" ,ocaml4.02-ppx-tools)
3331 ("ppx-core" ,ocaml4.02-ppx-core)))
3333 (ensure-keyword-arguments janestreet-arguments
3334 `(#:ocaml ,ocaml-4.02
3335 #:findlib ,ocaml4.02-findlib)))
3336 (home-page "https://github.com/janestreet/ppx_pipebang/")
3337 (synopsis "Inline reverse application operators `|>` and `|!`")
3338 (description "A ppx rewriter that inlines reverse application operators
3339 @code{|>} and @code{|!}.")
3340 (license license:asl2.0)))
3342 (define-public ocaml4.02-ppx-bin-prot
3344 (name "ocaml4.02-ppx-bin-prot")
3345 (version "113.33.03")
3346 (source (janestreet-origin "ppx_bin_prot" version
3347 "173kjv36giik11zgfvsbzwfbpr66dm2pcha9vf990jgzh8hqz39h"))
3348 (build-system ocaml-build-system)
3350 `(("js-build-tools" ,ocaml4.02-js-build-tools)
3353 `(("bin-prot" ,ocaml4.02-bin-prot)
3354 ("ppx-tools" ,ocaml4.02-ppx-tools)
3355 ("ppx-type-conv" ,ocaml4.02-ppx-type-conv)
3356 ("ppx-core" ,ocaml4.02-ppx-core)))
3358 (ensure-keyword-arguments janestreet-arguments
3359 `(#:ocaml ,ocaml-4.02
3360 #:findlib ,ocaml4.02-findlib)))
3361 (home-page "https://github.com/janestreet/ppx_bin_prot/")
3362 (synopsis "Generation of bin_prot readers and writers from types")
3363 (description "Generation of binary serialization and deserialization
3364 functions from type definitions.")
3365 (license license:asl2.0)))
3367 (define-public ocaml4.02-ppx-fail
3369 (name "ocaml4.02-ppx-fail")
3370 (version "113.33.03")
3371 (source (janestreet-origin "ppx_fail" version
3372 "1dwgad0f05gqp5rnwf9dcasidpfi7q3mrpazsw3a2vijjblbhjgn"))
3373 (build-system ocaml-build-system)
3375 `(("js-build-tools" ,ocaml4.02-js-build-tools)
3378 `(("ppx-driver" ,ocaml4.02-ppx-driver)
3379 ("ppx-tools" ,ocaml4.02-ppx-tools)
3380 ("ppx-here" ,ocaml4.02-ppx-here)
3381 ("ppx-core" ,ocaml4.02-ppx-core)))
3383 (ensure-keyword-arguments janestreet-arguments
3384 `(#:ocaml ,ocaml-4.02
3385 #:findlib ,ocaml4.02-findlib)))
3386 (home-page "https://github.com/janestreet/ppx_fail/")
3387 (synopsis "Add location to calls to failwiths")
3388 (description "Syntax extension that makes [failwiths] always include a
3390 (license license:asl2.0)))
3392 (define-public ocaml4.02-ppx-custom-printf
3394 (name "ocaml4.02-ppx-custom-printf")
3395 (version "113.33.03")
3396 (source (janestreet-origin "ppx_custom_printf" version
3397 "11jlx0n87g2j1vyyp343dibx7lvvwig5j5q0nq0b80kbsq0k6yr8"))
3398 (build-system ocaml-build-system)
3400 `(("js-build-tools" ,ocaml4.02-js-build-tools)
3403 `(("ppx-sexp-conv" ,ocaml4.02-ppx-sexp-conv)
3404 ("ppx-tools" ,ocaml4.02-ppx-tools)
3405 ("ppx-core" ,ocaml4.02-ppx-core)
3406 ("ppx-driver" ,ocaml4.02-ppx-driver)))
3408 (ensure-keyword-arguments janestreet-arguments
3409 `(#:ocaml ,ocaml-4.02
3410 #:findlib ,ocaml4.02-findlib)))
3411 (home-page "https://github.com/janestreet/ppx_custom_printf/")
3412 (synopsis "Printf-style format-strings for user-defined string conversion")
3413 (description "Extensions to printf-style format-strings for user-defined
3414 string conversion.")
3415 (license license:asl2.0)))
3417 (define-public ocaml4.02-ppx-sexp-message
3419 (name "ocaml4.02-ppx-sexp-message")
3420 (version "113.33.03")
3421 (source (janestreet-origin "ppx_sexp_message" version
3422 "084w1l3gnyw4ri9vbn7bv9b2xkw1520qczfxpxdarfivdrz8xr68"))
3423 (build-system ocaml-build-system)
3425 `(("js-build-tools" ,ocaml4.02-js-build-tools)
3428 `(("ppx-driver" ,ocaml4.02-ppx-driver)
3429 ("ppx-here" ,ocaml4.02-ppx-here)
3430 ("ppx-sexp-conv" ,ocaml4.02-ppx-sexp-conv)
3431 ("ppx-tools" ,ocaml4.02-ppx-tools)
3432 ("ppx-core" ,ocaml4.02-ppx-core)))
3434 (ensure-keyword-arguments janestreet-arguments
3435 `(#:ocaml ,ocaml-4.02
3436 #:findlib ,ocaml4.02-findlib)))
3437 (home-page "https://github.com/janestreet/ppx_sexp_message/")
3438 (synopsis "A ppx rewriter for easy construction of s-expressions")
3439 (description "Ppx_sexp_message aims to ease the creation of s-expressions
3440 in OCaml. This is mainly motivated by writing error and debugging messages,
3441 where one needs to construct a s-expression based on various element of the
3442 context such as function arguments.")
3443 (license license:asl2.0)))
3445 (define-public ocaml4.02-ppx-fields-conv
3447 (name "ocaml4.02-ppx-fields-conv")
3448 (version "113.33.03")
3449 (source (janestreet-origin "ppx_fields_conv" version
3450 "1vzbdz27g5qhhfs7wx6rjf979q4xyssxqbmp6sc1sxknbghslbdv"))
3451 (build-system ocaml-build-system)
3453 `(("js-build-tools" ,ocaml4.02-js-build-tools)
3455 ("ppx-core" ,ocaml4.02-ppx-core)))
3457 `(("fieldslib" ,ocaml4.02-fieldslib)
3458 ("ppx-tools" ,ocaml4.02-ppx-tools)
3459 ("ppx-core" ,ocaml4.02-ppx-core)
3460 ("ppx-type-conv" ,ocaml4.02-ppx-type-conv)))
3462 (ensure-keyword-arguments janestreet-arguments
3463 `(#:ocaml ,ocaml-4.02
3464 #:findlib ,ocaml4.02-findlib)))
3465 (home-page "https://github.com/janestreet/ppx_fields_conv/")
3466 (synopsis "Generation of accessor and iteration functions for ocaml records")
3467 (description "Ppx_fields_conv is a ppx rewriter that can be used to define
3468 first class values representing record fields, and additional routines, to get
3469 and set record fields, iterate and fold over all fields of a record and create
3470 new record values.")
3471 (license license:asl2.0)))
3473 (define-public ocaml-seq
3479 (uri (string-append "https://github.com/c-cube/seq/archive/"
3481 (file-name (string-append name "-" version ".tar.gz"))
3484 "02lb2d9i12bxrz2ba5wygk2bycan316skqlyri0597q7j9210g8r"))))
3485 (build-system ocaml-build-system)
3489 (modify-phases %standard-phases
3493 (lambda* (#:key outputs #:allow-other-keys)
3494 (let ((install-dir (string-append (assoc-ref outputs "out")
3495 "/lib/ocaml/site-lib/seq")))
3496 (mkdir-p install-dir)
3497 (with-output-to-file (string-append install-dir "/META")
3499 (display "name=\"seq\"
3500 version=\"[distributed with ocaml]\"
3501 description=\"dummy package for compatibility\"
3505 `((ocaml4.02-variant . ,(delay ocaml4.02-seq))))
3506 (home-page "https://github.com/c-cube/seq")
3507 (synopsis "OCaml's standard iterator type")
3508 (description "This package is a compatibility package for OCaml's
3509 standard iterator type starting from 4.07.")
3510 (license license:lgpl2.1+)))
3512 (define-public ocaml4.02-seq
3513 (let ((base (package-with-ocaml4.02 (strip-ocaml4.02-variant ocaml-seq))))
3517 `(#:ocaml ,ocaml-4.02
3518 #:findlib ,ocaml4.02-findlib
3519 #:tests? #f; no tests
3520 #:phases (modify-phases %standard-phases (delete 'configure)))))))
3522 (define-public ocaml-re
3528 (uri (string-append "https://github.com/ocaml/ocaml-re//archive/"
3530 (file-name (string-append name "-" version ".tar.gz"))
3533 "1pdb0mr6z5ax6szblr3f5lbdnqq9grm97cmsfjmdma60yrx2rqhd"))))
3534 (build-system dune-build-system)
3537 #:build-flags (list "--profile" "release")))
3539 `(("ocaml-seq" ,ocaml-seq)))
3541 `(("ounit" ,ocaml-ounit)))
3542 (home-page "https://github.com/ocaml/ocaml-re/")
3543 (synopsis "Regular expression library for OCaml")
3544 (description "Pure OCaml regular expressions with:
3546 @item Perl-style regular expressions (module Re_perl)
3547 @item Posix extended regular expressions (module Re_posix)
3548 @item Emacs-style regular expressions (module Re_emacs)
3549 @item Shell-style file globbing (module Re_glob)
3550 @item Compatibility layer for OCaml's built-in Str module (module Re_str)
3552 (license license:expat)))
3554 (define-public ocaml4.02-re
3555 (package-with-ocaml4.02 ocaml-re))
3557 (define-public ocaml4.02-ppx-expect
3559 (name "ocaml4.02-ppx-expect")
3560 (version "113.33.03")
3561 (source (janestreet-origin "ppx_expect" version
3562 "03sbs4s5i8l9syr45v25f5hzy7msd2b47k2a9wsq9m43d4imgkrc"))
3563 (build-system ocaml-build-system)
3565 `(("js-build-tools" ,ocaml4.02-js-build-tools)
3568 `(("fieldslib" ,ocaml4.02-fieldslib)
3569 ("ppx-tools" ,ocaml4.02-ppx-tools)
3570 ("ppx-assert" ,ocaml4.02-ppx-assert)
3571 ("ppx-compare" ,ocaml4.02-ppx-compare)
3572 ("ppx-core" ,ocaml4.02-ppx-core)
3573 ("ppx-custom-printf" ,ocaml4.02-ppx-custom-printf)
3574 ("ppx-driver" ,ocaml4.02-ppx-driver)
3575 ("ppx-fields-conv" ,ocaml4.02-ppx-fields-conv)
3576 ("ppx-inline-test" ,ocaml4.02-ppx-inline-test)
3577 ("ppx-sexp-conv" ,ocaml4.02-ppx-sexp-conv)
3578 ("ppx-variants-conv" ,ocaml4.02-ppx-variants-conv)
3579 ("re" ,ocaml4.02-re)
3580 ("sexplib" ,ocaml4.02-sexplib)
3581 ("variantslib" ,ocaml4.02-variantslib)))
3583 (ensure-keyword-arguments janestreet-arguments
3584 `(#:ocaml ,ocaml-4.02
3585 #:findlib ,ocaml4.02-findlib)))
3586 (home-page "https://github.com/janestreet/ppx_expect/")
3587 (synopsis "Cram like framework for OCaml")
3588 (description "Expect-test is a framework for writing tests in OCaml, similar
3589 to Cram. Expect-tests mimic the existing inline tests framework with the
3590 let%expect_test construct. The body of an expect-test can contain
3591 output-generating code, interleaved with %expect extension expressions to denote
3592 the expected output.")
3593 (license license:asl2.0)))
3595 (define-public ocaml4.02-ppx-jane
3597 (name "ocaml4.02-ppx-jane")
3598 (version "113.33.03")
3599 (source (janestreet-origin "ppx_jane" version
3600 "0bjxkhmzgm6x9dcvjwybbccn34khbvyyjimcbaja30fp6qcqk5yl"))
3601 (build-system ocaml-build-system)
3603 `(("js-build-tools" ,ocaml4.02-js-build-tools)
3606 `(("ppx-assert" ,ocaml4.02-ppx-assert)
3607 ("ppx-bench" ,ocaml4.02-ppx-bench)
3608 ("ppx-bin-prot" ,ocaml4.02-ppx-bin-prot)
3609 ("ppx-compare" ,ocaml4.02-ppx-compare)
3610 ("ppx-custom-printf" ,ocaml4.02-ppx-custom-printf)
3611 ("ppx-deriving" ,ocaml4.02-ppx-deriving)
3612 ("ppx-enumerate" ,ocaml4.02-ppx-enumerate)
3613 ("ppx-expect" ,ocaml4.02-ppx-expect)
3614 ("ppx-fail" ,ocaml4.02-ppx-fail)
3615 ("ppx-fields-conv" ,ocaml4.02-ppx-fields-conv)
3616 ("ppx-here" ,ocaml4.02-ppx-here)
3617 ("ppx-inline-test" ,ocaml4.02-ppx-inline-test)
3618 ("ppx-let" ,ocaml4.02-ppx-let)
3619 ("ppx-pipebang" ,ocaml4.02-ppx-pipebang)
3620 ("ppx-sexp-conv" ,ocaml4.02-ppx-sexp-conv)
3621 ("ppx-sexp-message" ,ocaml4.02-ppx-sexp-message)
3622 ("ppx-sexp-value" ,ocaml4.02-ppx-sexp-value)
3623 ("ppx-typerep-conv" ,ocaml4.02-ppx-typerep-conv)
3624 ("ppx-variants-conv" ,ocaml4.02-ppx-variants-conv)))
3626 (ensure-keyword-arguments janestreet-arguments
3627 `(#:ocaml ,ocaml-4.02
3628 #:findlib ,ocaml4.02-findlib)))
3629 (home-page "https://github.com/janestreet/ppx_jane/")
3630 (synopsis "Standard Jane Street ppx rewriters")
3631 (description "Ppx_jane is a ppx_driver including all standard ppx rewriters.")
3632 (license license:asl2.0)))
3634 (define-public ocaml4.02-core-kernel
3636 (name "ocaml4.02-core-kernel")
3637 (version "113.33.03")
3638 (source (janestreet-origin "core_kernel" version
3639 "0fl23jrwivixawhxinbwaw9cabqnzn7fini7dxpxjjvkxdc8ip5y"))
3641 `(("js-build-tools" ,ocaml4.02-js-build-tools)
3642 ("ppx-jane" ,ocaml4.02-ppx-jane)
3645 `(("bin_prot" ,ocaml4.02-bin-prot)
3646 ("ppx-assert" ,ocaml4.02-ppx-assert)
3647 ("ppx-bench" ,ocaml4.02-ppx-bench)
3648 ("ppx-driver" ,ocaml4.02-ppx-driver)
3649 ("ppx-expect" ,ocaml4.02-ppx-expect)
3650 ("ppx-inline-test" ,ocaml4.02-ppx-inline-test)
3651 ("typerep" ,ocaml4.02-typerep)
3652 ("sexplib" ,ocaml4.02-sexplib)
3653 ("variantslib" ,ocaml4.02-variantslib)
3654 ("result" ,ocaml4.02-result)
3655 ("fieldslib" ,ocaml4.02-fieldslib)))
3656 (build-system ocaml-build-system)
3658 (ensure-keyword-arguments janestreet-arguments
3659 `(#:ocaml ,ocaml-4.02
3660 #:findlib ,ocaml4.02-findlib)))
3661 (home-page "https://github.com/janestreet/core_kernel/")
3662 (synopsis "Portable standard library for OCaml")
3663 (description "Core is an alternative to the OCaml standard library.
3665 Core_kernel is the system-independent part of Core. It is aimed for cases when
3666 the full Core is not available, such as in Javascript.")
3667 (license license:asl2.0)))
3669 (define-public ocaml4.02-async-kernel
3671 (name "ocaml4.02-async-kernel")
3672 (version "113.33.03")
3673 (source (janestreet-origin "async_kernel" version
3674 "04bjsaa23j831r09r38x6xx9nhryvp0z5ihickvhxqa4fb2snyvd"))
3676 `(("oasis" ,ocaml-oasis)
3677 ("js-build-tools" ,ocaml4.02-js-build-tools)
3678 ("ppx-jane" ,ocaml4.02-ppx-jane)
3681 `(("core-kernel" ,ocaml4.02-core-kernel)))
3682 (build-system ocaml-build-system)
3684 (ensure-keyword-arguments janestreet-arguments
3685 `(#:ocaml ,ocaml-4.02
3686 #:findlib ,ocaml4.02-findlib)))
3687 (home-page "https://github.com/janestreet/async_kernel/")
3688 (synopsis "Monadic concurrency library")
3689 (description "Async-kernel is a library for concurrent programming in OCaml.")
3690 (license license:asl2.0)))
3692 (define-public ocaml4.02-async-rpc-kernel
3694 (name "ocaml4.02-async-rpc-kernel")
3695 (version "113.33.03")
3696 (source (janestreet-origin "async_rpc_kernel" version
3697 "0y97h9pkb00v7jpf87m8cbb0ffkclj9g26ph6sq97q8dpisnkjwh"))
3699 `(("oasis" ,ocaml-oasis)
3700 ("js-build-tools" ,ocaml4.02-js-build-tools)
3701 ("ppx-jane" ,ocaml4.02-ppx-jane)
3704 `(("async-kernel" ,ocaml4.02-async-kernel)))
3705 (build-system ocaml-build-system)
3707 (ensure-keyword-arguments janestreet-arguments
3708 `(#:ocaml ,ocaml-4.02
3709 #:findlib ,ocaml4.02-findlib)))
3710 (home-page "https://github.com/janestreet/async_rpc_kernel/")
3711 (synopsis "Platform-independent core of the Async RPC library")
3712 (description "Async_rpc_kernel is the platform-independent core of
3713 the Async RPC library.")
3714 (license license:asl2.0)))
3716 (define-public ocaml4.02-core
3718 (name "ocaml4.02-core")
3719 (version "113.33.03")
3720 (source (janestreet-origin "core" version
3721 "1znll157qg56g9d3247fjibv1hxv3r9wxgr4nhy19j2vzdh6a268"))
3723 `(("oasis" ,ocaml-oasis)
3724 ("js-build-tools" ,ocaml4.02-js-build-tools)
3725 ("ppx-jane" ,ocaml4.02-ppx-jane)
3728 `(("core-kernel" ,ocaml4.02-core-kernel)))
3729 (build-system ocaml-build-system)
3731 (ensure-keyword-arguments janestreet-arguments
3732 `(#:ocaml ,ocaml-4.02
3733 #:findlib ,ocaml4.02-findlib)))
3734 (home-page "https://github.com/janestreet/core/")
3735 (synopsis "Alternative to OCaml's standard library")
3736 (description "The Core suite of libraries is an alternative to OCaml's
3737 standard library that was developed by Jane Street.")
3738 (license license:asl2.0)))
3740 (define-public ocaml4.02-async-unix
3742 (name "ocaml4.02-async-unix")
3743 (version "113.33.03")
3744 (source (janestreet-origin "async_unix" version
3745 "1fwl0lfrizllcfjk8hk8m7lsz9ha2jg6qgk4gssfyz377qvpcq4h"))
3747 `(("oasis" ,ocaml-oasis)
3748 ("js-build-tools" ,ocaml4.02-js-build-tools)
3749 ("ppx-jane" ,ocaml4.02-ppx-jane)
3752 `(("async-kernel" ,ocaml4.02-async-kernel)
3753 ("core" ,ocaml4.02-core)))
3754 (build-system ocaml-build-system)
3756 (ensure-keyword-arguments janestreet-arguments
3757 `(#:ocaml ,ocaml-4.02
3758 #:findlib ,ocaml4.02-findlib)))
3759 (home-page "https://github.com/janestreet/async_unix")
3760 (synopsis "Asynchronous execution library for Unix")
3761 (description "Async_unix is an asynchronous execution library for Unix.")
3762 (license license:asl2.0)))
3764 (define-public ocaml4.02-async-extra
3766 (name "ocaml4.02-async-extra")
3767 (version "113.33.03")
3768 (source (janestreet-origin "async_extra" version
3769 "1si8jgiq5xh5sl9f2b7f9p17p7zx5h1pg557x2cxywi2x7pxqg4f"))
3771 `(("oasis" ,ocaml-oasis)
3772 ("js-build-tools" ,ocaml4.02-js-build-tools)
3773 ("ppx-jane" ,ocaml4.02-ppx-jane)
3776 `(("async-rpc-kernel" ,ocaml4.02-async-rpc-kernel)
3777 ("async-unix" ,ocaml4.02-async-unix)
3778 ("core" ,ocaml4.02-core)))
3779 (build-system ocaml-build-system)
3781 (ensure-keyword-arguments janestreet-arguments
3782 `(#:ocaml ,ocaml-4.02
3783 #:findlib ,ocaml4.02-findlib)))
3784 (home-page "https://github.com/janestreet/async_extra")
3785 (synopsis "Extra functionnalities for the async library")
3786 (description "Async_extra provides additional functionnalities for the
3788 (license license:asl2.0)))
3790 (define-public ocaml4.02-async
3792 (name "ocaml4.02-async")
3793 (version "113.33.03")
3794 (source (janestreet-origin "async" version
3795 "0210fyhcs12kpmmd26015bgivkfd2wqkyn3c5wd7688d0f872y25"))
3797 `(("oasis" ,ocaml-oasis)
3798 ("js-build-tools" ,ocaml4.02-js-build-tools)
3799 ("ppx-jane" ,ocaml4.02-ppx-jane)
3802 `(("async-extra" ,ocaml4.02-async-extra)))
3803 (build-system ocaml-build-system)
3805 (ensure-keyword-arguments janestreet-arguments
3806 `(#:ocaml ,ocaml-4.02
3807 #:findlib ,ocaml4.02-findlib)))
3808 (home-page "https://github.com/janestreet/async")
3809 (synopsis "Monadic concurrency library")
3810 (description "Async is a library for concurrent programming in OCaml.")
3811 (license license:asl2.0)))
3813 (define-public ocaml-ocplib-endian
3815 (name "ocaml-ocplib-endian")
3819 (uri (string-append "https://github.com/OCamlPro/ocplib-endian/"
3820 "archive/" version ".tar.gz"))
3823 "0hwj09rnzjs0m0kazz5h2mgs6p95j0zlga8cda5srnzqmzhniwkn"))
3824 (file-name (string-append name "-" version ".tar.gz"))))
3825 (build-system ocaml-build-system)
3827 `(("cppo" ,ocaml-cppo)
3828 ("ocamlbuild" ,ocamlbuild)))
3829 (home-page "https://github.com/OCamlPro/ocplib-endian")
3830 (synopsis "Optimised functions to read and write int16/32/64 from strings
3832 (description "Optimised functions to read and write int16/32/64 from strings
3833 and bigarrays, based on new primitives added in version 4.01. It works on
3834 strings, bytes and bigstring (Bigarrys of chars), and provides submodules for
3835 big- and little-endian, with their unsafe counter-parts.")
3836 (license license:lgpl2.1)))
3838 (define-public ocaml4.02-ocplib-endian
3839 (package-with-ocaml4.02 ocaml-ocplib-endian))
3841 (define-public ocaml4.02-cstruct
3843 (name "ocaml4.02-cstruct")
3847 (uri (string-append "https://github.com/mirage/ocaml-cstruct/"
3848 "archive/v" version ".tar.gz"))
3851 "15qpdc8421shq4pprdas9jznpva45229wkfqbwcxw9khaiiz7949"))
3852 (file-name (string-append name "-" version ".tar.gz"))))
3853 (build-system ocaml-build-system)
3855 `(#:ocaml ,ocaml-4.02
3856 #:findlib ,ocaml4.02-findlib
3858 (list "--enable-lwt" "--enable-async")
3860 (modify-phases %standard-phases
3861 (add-after 'install 'link-stubs
3862 (lambda* (#:key outputs #:allow-other-keys)
3863 (let* ((out (assoc-ref outputs "out"))
3864 (stubs (string-append out "/lib/ocaml/site-lib/stubslibs"))
3865 (lib (string-append out "/lib/ocaml/site-lib/cstruct")))
3867 (symlink (string-append lib "/dllcstruct_stubs.so")
3868 (string-append stubs "/dllcstruct_stubs.so"))))))))
3870 `(("ounit" ,ocaml4.02-ounit)
3871 ("ppx-tools" ,ocaml4.02-ppx-tools)
3872 ("camlp4" ,camlp4-4.02)))
3874 `(("ocplib-endian" ,ocaml4.02-ocplib-endian)
3875 ("lwt" ,ocaml4.02-lwt)
3876 ("async" ,ocaml4.02-async)
3877 ("sexplib" ,ocaml4.02-sexplib)))
3878 (home-page "https://github.com/mirage/ocaml-cstruct")
3879 (synopsis "Access C structures via a camlp4 extension")
3880 (description "Cstruct is a library and syntax extension to make it easier
3881 to access C-like structures directly from OCaml. It supports both reading and
3882 writing to these structures, and they are accessed via the Bigarray module.")
3883 (license license:isc)))
3885 (define-public ocaml4.02-hex
3887 (name "ocaml4.02-hex")
3891 (uri (string-append "https://github.com/mirage/ocaml-hex/"
3892 "archive/" version ".tar.gz"))
3895 "0s63g0b8gfv2xm6fv6xg7bva8h76b5pcjb0zw3f8cygs0lq9072v"))
3896 (file-name (string-append name "-" version ".tar.gz"))))
3897 (build-system ocaml-build-system)
3899 `(#:ocaml ,ocaml-4.02
3900 #:findlib ,ocaml4.02-findlib))
3902 `(("cstruct" ,ocaml4.02-cstruct)))
3903 (home-page "https://github.com/mirage/ocaml-hex/")
3904 (synopsis "Minimal library providing hexadecimal converters")
3905 (description "Hex is a minimal library providing hexadecimal converters.")
3906 (license license:isc)))
3908 (define-public ocaml4.02-ezjsonm
3910 (name "ocaml4.02-ezjsonm")
3914 (uri (string-append "https://github.com/mirage/ezjsonm/archive/"
3918 "1kag0z2xlk4rw73a240dmkxh9rj6psxxcxkm7d7z0rrj6hzjajgq"))
3919 (file-name (string-append name "-" version ".tar.gz"))))
3920 (build-system ocaml-build-system)
3922 `(("alcotest" ,ocaml4.02-alcotest)))
3924 `(("hex" ,ocaml4.02-hex)
3925 ("jsonm" ,ocaml4.02-jsonm)
3926 ("lwt" ,ocaml4.02-lwt)
3927 ("sexplib" ,ocaml4.02-sexplib)))
3929 `(#:configure-flags (list "--enable-lwt")
3931 #:findlib ,ocaml4.02-findlib))
3932 (home-page "https://github.com/mirage/ezjsonm/")
3933 (synopsis "Read and write JSON data")
3934 (description "Ezjsonm provides more convenient (but far less flexible) input
3935 and output functions that go to and from [string] values than jsonm. This avoids
3936 the need to write signal code, which is useful for quick scripts that manipulate
3938 (license license:isc)))
3940 (define-public ocaml4.02-uri
3942 (name "ocaml4.02-uri")
3946 (uri (string-append "https://github.com/mirage/ocaml-uri/archive/v"
3950 "02bzrag79prx261rxf9mlak749pwf4flpfl8p012x1xznv9m0clc"))
3951 (file-name (string-append name "-" version ".tar.gz"))))
3952 (build-system ocaml-build-system)
3954 `(#:ocaml ,ocaml-4.02
3955 #:findlib ,ocaml4.02-findlib))
3957 `(("ounit" ,ocaml4.02-ounit)))
3959 `(("ppx-sexp-conv" ,ocaml4.02-ppx-sexp-conv)
3960 ("re" ,ocaml4.02-re)
3961 ("ppx-deriving" ,ocaml4.02-ppx-deriving)
3962 ("sexplib" ,ocaml4.02-sexplib)
3963 ("stringext" ,ocaml4.02-stringext)))
3964 (home-page "https://github.com/mirage/ocaml-uri")
3965 (synopsis "RFC3986 URI/URL parsing library")
3966 (description "OCaml-uri is a library for parsing URI/URL in the RFC3986 format.")
3967 (license license:isc)))
3969 (define-public ocaml-easy-format
3971 (name "ocaml-easy-format")
3975 (uri (string-append "https://github.com/mjambon/easy-format/"
3976 "archive/v" version ".tar.gz"))
3979 "1zcz682y9figa84k7lgdjcab5qbzk3yy14ygfqp2dhhrvjygm252"))
3980 (file-name (string-append name "-" version ".tar.gz"))))
3981 (build-system ocaml-build-system)
3984 (modify-phases %standard-phases
3985 (delete 'configure))))
3986 (home-page "https://github.com/mjambon/easy-format")
3987 (synopsis "Interface to the Format module")
3988 (description "Easy-format is a high-level and functional interface to the
3989 Format module of the OCaml standard library.")
3990 (license license:bsd-3)))
3992 (define-public ocaml4.02-easy-format
3993 (package-with-ocaml4.02 ocaml-easy-format))
3995 (define-public optcomp
4001 (uri (string-append "https://github.com/diml/optcomp/archive/"
4005 "0hhhb2gisah1h22zlg5iszbgqxdd7x85cwd57bd4mfkx9l7dh8jh"))
4006 (file-name (string-append name "-" version ".tar.gz"))))
4007 (build-system ocaml-build-system)
4009 `(#:ocaml ,ocaml-4.02
4010 #:findlib ,ocaml4.02-findlib
4013 (list (string-append "BUILDFLAGS=\"-cflags -I,"
4014 (assoc-ref %build-inputs "camlp4")
4015 "/lib/ocaml/site-lib/camlp4/Camlp4Parsers\""))))
4016 (native-inputs `(("camlp4" ,camlp4-4.02)))
4017 (propagated-inputs `(("camlp4" ,camlp4-4.02)))
4018 (home-page "https://github.com/diml/optcomp")
4019 (synopsis "Optional compilation for OCaml")
4020 (description "Optcomp provides an optional compilation facility with
4021 cpp-like directives.")
4022 (license license:bsd-3)))
4024 (define-public ocaml-piqilib
4026 (name "ocaml-piqilib")
4030 (uri (string-append "https://github.com/alavrik/piqi/archive/v"
4034 "1ssccnwqzfyf7syfq2fv4zyhwayxwd75rhq9y28mvq1w6qbww4l7"))
4035 (file-name (string-append name "-" version ".tar.gz"))))
4036 (build-system ocaml-build-system)
4039 (modify-phases %standard-phases
4040 (add-before 'configure 'fix-ocamlpath
4042 (substitute* '("Makefile" "make/Makefile.ocaml")
4043 (("OCAMLPATH := ") "OCAMLPATH := $(OCAMLPATH):"))
4046 (lambda* (#:key outputs #:allow-other-keys)
4047 (let ((out (assoc-ref outputs "out")))
4048 (substitute* "make/OCamlMakefile"
4049 (("/bin/sh") (which "bash")))
4050 (invoke "./configure" "--prefix" out "--ocaml-libdir"
4051 (string-append out "/lib/ocaml/site-lib")))
4053 (add-after 'build 'build-ocaml
4054 (lambda* (#:key outputs #:allow-other-keys)
4055 (invoke "make" "ocaml")
4057 (add-after 'install 'install-ocaml
4058 (lambda* (#:key outputs #:allow-other-keys)
4059 (invoke "make" "ocaml-install")
4061 (add-after 'install-ocaml 'link-stubs
4062 (lambda* (#:key outputs #:allow-other-keys)
4063 (let* ((out (assoc-ref outputs "out"))
4064 (stubs (string-append out "/lib/ocaml/site-lib/stubslibs"))
4065 (lib (string-append out "/lib/ocaml/site-lib/piqilib")))
4067 (symlink (string-append lib "/dllpiqilib_stubs.so")
4068 (string-append stubs "/dllpiqilib_stubs.so"))
4072 ("camlp4" ,camlp4)))
4074 `(("xmlm" ,ocaml-xmlm)
4075 ("ulex" ,ocaml-ulex)
4076 ("easy-format" ,ocaml-easy-format)
4077 ("base64" ,ocaml-base64)))
4078 (home-page "http://piqi.org")
4079 (synopsis "Data serialization and conversion library")
4080 (description "Piqilib is the common library used by the piqi command-line
4081 tool and piqi-ocaml.")
4082 (license license:asl2.0)))
4084 (define-public ocaml4.02-piqilib
4085 (package-with-ocaml4.02 ocaml-piqilib))
4087 (define-public ocaml-uuidm
4089 (name "ocaml-uuidm")
4093 (uri (string-append "http://erratique.ch/software/uuidm/"
4094 "releases/uuidm-" version ".tbz"))
4097 "0hz4fdx0x16k0pw9995vkz5d1hmzz6b16wck9li399rcbfnv5jlc"))))
4098 (build-system ocaml-build-system)
4101 (list "build" "--tests" "true" "--with-cmdliner" "true")
4103 (modify-phases %standard-phases
4104 (delete 'configure))))
4106 `(("ocamlbuild" ,ocamlbuild)
4109 `(("cmdliner" ,ocaml-cmdliner)
4110 ("topkg" ,ocaml-topkg)))
4111 (home-page "http://erratique.ch/software/uuidm")
4112 (synopsis "Universally unique identifiers for OCaml")
4113 (description "Uuidm is an OCaml module implementing 128 bits universally
4114 unique identifiers (UUIDs) version 3, 5 (named based with MD5, SHA-1 hashing)
4115 and 4 (random based) according to RFC 4122.")
4116 (license license:isc)))
4118 (define-public ocaml4.02-uuidm
4119 (package-with-ocaml4.02 ocaml-uuidm))
4121 (define-public ocaml-graph
4123 (name "ocaml-graph")
4127 (uri (string-append "http://ocamlgraph.lri.fr/download/"
4128 "ocamlgraph-" version ".tar.gz"))
4131 "0m9g16wrrr86gw4fz2fazrh8nkqms0n863w7ndcvrmyafgxvxsnr"))))
4132 (build-system ocaml-build-system)
4134 `(#:install-target "install-findlib"
4137 (modify-phases %standard-phases
4138 (add-before 'configure 'set-shell
4139 (lambda* (#:key inputs #:allow-other-keys)
4140 (setenv "CONFIG_SHELL" (string-append (assoc-ref inputs "bash")
4142 (inputs `(("lablgtk" ,lablgtk)))
4143 (properties `((upstream-name . "ocamlgraph")))
4144 (home-page "http://ocamlgraph.lri.fr/")
4145 (synopsis "Graph library for OCaml")
4146 (description "OCamlgraph is a generic graph library for OCaml.")
4147 (license license:lgpl2.1)))
4149 (define-public ocaml4.02-graph
4150 (package-with-ocaml4.02 ocaml-graph))
4152 (define-public ocaml-piqi
4158 (uri (string-append "https://github.com/alavrik/piqi-ocaml/"
4159 "archive/v" version ".tar.gz"))
4160 (file-name (string-append name "-" version ".tar.gz"))
4163 "0da0v2v28aj65b0cwpvvmcqyrfvz94pp3j5zgfdr1jrl5s37c21g"))))
4164 (build-system ocaml-build-system)
4167 (list (string-append "DESTDIR=" (assoc-ref %outputs "out"))
4168 (string-append "SHELL=" (assoc-ref %build-inputs "bash")
4171 (modify-phases %standard-phases
4172 (delete 'configure))))
4176 ("protobuf" ,protobuf))) ; for tests
4178 `(("num" ,ocaml-num)
4179 ("piqilib" ,ocaml-piqilib)))
4181 `((ocaml4.02-variant . ,(delay ocaml4.02-piqi))))
4182 (home-page "https://github.com/alavrik/piqi-ocaml")
4183 (synopsis "Protocol serialization system for OCaml")
4184 (description "Piqi is a multi-format data serialization system for OCaml.
4185 It provides a uniform interface for serializing OCaml data structures to JSON,
4186 XML and Protocol Buffers formats.")
4187 (license license:asl2.0)))
4189 (define-public ocaml4.02-piqi
4190 (let ((base (package-with-ocaml4.02 (strip-ocaml4.02-variant ocaml-piqi))))
4194 `(("piqilib" ,ocaml4.02-piqilib))))))
4200 (home-page "https://github.com/BinaryAnalysisPlatform/bap")
4203 (uri (string-append home-page "/archive/v" version ".tar.gz"))
4206 "0v95v9mp7mg8fj25ry0w7566zd9xp6cs8nnqj4l38q54fb1hfav9"))
4207 (file-name (string-append name "-" version ".tar.gz"))))
4208 (build-system ocaml-build-system)
4210 `(("oasis" ,ocaml4.02-oasis)
4211 ("clang" ,clang-3.8)
4212 ("ounit" ,ocaml4.02-ounit)))
4214 `(("core-kernel" ,ocaml4.02-core-kernel)
4215 ("ppx-driver" ,ocaml4.02-ppx-driver)
4216 ("bin-prot" ,ocaml4.02-bin-prot)
4217 ("uri" ,ocaml4.02-uri)
4220 ("clang-runtime" ,clang-runtime)
4221 ("fileutils" ,ocaml4.02-fileutils)
4222 ("cmdliner" ,ocaml4.02-cmdliner)
4223 ("zarith" ,ocaml4.02-zarith)
4224 ("uuidm" ,ocaml4.02-uuidm)
4225 ("camlzip" ,ocaml4.02-camlzip)
4226 ("frontc" ,ocaml-frontc)
4227 ("ezjsonm" ,ocaml4.02-ezjsonm)
4228 ("ocurl" ,ocaml4.02-ocurl)
4229 ("piqi" ,ocaml4.02-piqi)
4230 ("ocamlgraph" ,ocaml4.02-graph)
4231 ("bitstring" ,ocaml4.02-bitstring)
4232 ("ppx-jane" ,ocaml4.02-ppx-jane)
4233 ("re" ,ocaml4.02-re)))
4234 (inputs `(("llvm" ,llvm-3.8)))
4236 `(#:ocaml ,ocaml-4.02
4237 #:findlib ,ocaml4.02-findlib
4240 (modify-phases %standard-phases
4242 (lambda* (#:key outputs inputs #:allow-other-keys)
4243 (invoke "./configure" "--prefix"
4244 (assoc-ref outputs "out")
4247 (assoc-ref outputs "out")
4248 "/lib/ocaml/site-lib")
4249 "--with-llvm-version=3.8"
4250 "--with-llvm-config=llvm-config"
4251 "--enable-everything")
4252 (substitute* "plugins/objdump/objdump_main.ml"
4253 (("Re_perl") "Re.Perl"))
4254 (substitute* "oasis/objdump"
4255 (("re.pcre") "re.pcre, re.perl")))))))
4256 (synopsis "Binary Analysis Platform")
4257 (description "Binary Analysis Platform is a framework for writing program
4258 analysis tools, that target binary files. The framework consists of a plethora
4259 of libraries, plugins, and frontends. The libraries provide code reusability,
4260 the plugins facilitate extensibility, and the frontends serve as entry points.")
4261 (license license:expat)))
4263 (define-public ocaml-camomile
4265 (name "ocaml-camomile")
4267 (home-page "https://github.com/yoriyuki/Camomile")
4270 (uri (string-append home-page "/releases/download/" version
4271 "/camomile-" version ".tbz"))
4274 "01ssjrqz41jvrqh27jxnh9cx7ywi9b5sgsykd00i7z9nrcwhlfy2"))))
4275 (build-system dune-build-system)
4277 `(("camlp4" ,camlp4)))
4279 `(#:build-flags (list "--profile" "realease")
4281 (synopsis "Comprehensive Unicode library")
4282 (description "Camomile is a Unicode library for OCaml. Camomile provides
4283 Unicode character type, UTF-8, UTF-16, UTF-32 strings, conversion to/from about
4284 200 encodings, collation and locale-sensitive case mappings, and more. The
4285 library is currently designed for Unicode Standard 3.2.")
4286 ;; with an exception for linked libraries to use a different license
4287 (license license:lgpl2.0+)))
4289 (define-public ocaml4.02-camomile
4290 (package-with-ocaml4.02 ocaml-camomile))
4292 (define-public ocaml-jbuilder
4294 (name "ocaml-jbuilder")
4295 (version "1.0+beta16")
4299 "https://github.com/janestreet/jbuilder/archive/"
4301 (file-name (string-append name "-" version ".tar.gz"))
4304 "1cy07pwvbrlysszs938yd74yyvvbgkffpb82qrjph77zf0h2gdi7"))))
4305 (build-system ocaml-build-system)
4307 `(#:ocaml ,ocaml-4.02
4308 #:findlib ,ocaml4.02-findlib
4310 (modify-phases %standard-phases
4312 (lambda* (#:key outputs #:allow-other-keys)
4313 (let ((out (assoc-ref outputs "out")))
4314 (setenv "PREFIX" out))
4317 `(("menhir" ,ocaml4.02-menhir)))
4320 (home-page "https://github.com/janestreet/jbuilder")
4321 (synopsis "Composable build system for OCaml")
4322 (description "Jbuilder is a build system designed for OCaml/Reason projects
4323 only. It focuses on providing the user with a consistent experience and takes
4324 care of most of the low-level details of OCaml compilation. All you have to do
4325 is provide a description of your project and Jbuilder will do the rest.")
4326 (license license:asl2.0)))
4328 (define-public ocaml-zed
4334 (uri (string-append "https://github.com/diml/zed/archive/"
4336 (file-name (string-append name "-" version ".tar.gz"))
4339 "19m5vrj60vg1b63qfsv0aabdlzgn40cqmx65s3wafqi4fs9xp6jn"))))
4340 (build-system ocaml-build-system)
4343 (modify-phases %standard-phases
4346 (lambda* (#:key #:allow-other-keys)
4347 (zero? (system* "jbuilder" "build"))))
4350 (lambda* (#:key outputs #:allow-other-keys)
4351 (let ((out (assoc-ref outputs "out")))
4352 (zero? (system* "jbuilder" "install" "--prefix" out))))))))
4354 `(("jbuilder" ,ocaml-jbuilder)))
4356 `(("camomile" ,ocaml-camomile)
4357 ("react" ,ocaml-react)))
4358 (home-page "https://github.com/diml/zed")
4359 (synopsis "Abstract engine for text editing in OCaml")
4360 (description "Zed is an abstract engine for text edition. It can be used
4361 to write text editors, edition widgets, readlines, etc. You just have to
4362 connect an engine to your inputs and rendering functions to get an editor.")
4363 (license license:bsd-3)))
4365 (define-public ocaml4.02-zed
4366 (package-with-ocaml4.02 ocaml-zed))
4368 (define-public ocaml-lambda-term
4370 (name "ocaml-lambda-term")
4375 (uri (string-append "https://github.com/diml/lambda-term/archive/"
4377 (file-name (string-append name "-" version ".tar.gz"))
4379 (base32 "1hy5ryagqclgdm9lzh1qil5mrynlypv7mn6qm858hdcnmz9zzn0l"))))
4380 (build-system dune-build-system)
4382 `(#:build-flags (list "--profile" "release")
4385 `(("lwt" ,ocaml-lwt)
4386 ("lwt-log" ,ocaml-lwt-log)
4387 ("zed" ,ocaml-zed)))
4388 (home-page "https://github.com/diml/lambda-term")
4389 (synopsis "Terminal manipulation library for OCaml")
4390 (description "Lambda-Term is a cross-platform library for manipulating the
4391 terminal. It provides an abstraction for keys, mouse events, colors, as well as
4392 a set of widgets to write curses-like applications. The main objective of
4393 Lambda-Term is to provide a higher level functional interface to terminal
4394 manipulation than, for example, ncurses, by providing a native OCaml interface
4395 instead of bindings to a C library.")
4396 (license license:bsd-3)))
4398 (define-public ocaml4.02-lambda-term
4399 (package-with-ocaml4.02 ocaml-lambda-term))
4401 (define-public ocaml-utop
4407 (uri (string-append "https://github.com/ocaml-community/utop/archive/"
4409 (file-name (string-append name "-" version ".tar.gz"))
4412 "1414snwmqaxs1x8wbpjf6fn3jsl01hq0phrr7639xmb5vh15mgd4"))))
4413 (build-system gnu-build-system)
4415 `(#:test-target "test"
4417 (modify-phases %standard-phases
4420 (lambda* (#:key outputs #:allow-other-keys)
4421 (let* ((out (assoc-ref outputs "out"))
4422 (libdir (string-append out "/lib/ocaml/site-lib")))
4424 (zero? (system* "jbuilder" "install"
4426 "--libdir" libdir))))))))
4429 ("cppo" ,ocaml-cppo)
4430 ("jbuilder" ,ocaml-jbuilder)))
4432 `(("ocaml-findlib" ,ocaml-findlib)
4433 ("lambda-term" ,ocaml-lambda-term)
4435 ("react" ,ocaml-react)
4436 ("camomile" ,ocaml-camomile)
4437 ("zed" ,ocaml-zed)))
4438 (home-page "https://github.com/diml/utop")
4439 (synopsis "Improved interface to the OCaml toplevel")
4440 (description "UTop is an improved toplevel for OCaml. It can run in a
4441 terminal or in Emacs. It supports line editing, history, real-time and context
4442 sensitive completion, colors, and more.")
4443 (license license:bsd-3)))
4445 (define-public ocaml-integers
4447 (name "ocaml-integers")
4449 (home-page "https://github.com/ocamllabs/ocaml-integers")
4452 (uri (string-append home-page
4453 "/releases/download/v0.2.2/integers-"
4455 (file-name (string-append name "-" version ".tbz"))
4458 "08b1ljw88ny3l0mdq6xmffjk8anfc77igryva5jz1p6f4f746ywk"))))
4459 (build-system ocaml-build-system)
4461 `(#:tests? #f; no tests
4462 #:build-flags (list "build")
4464 (modify-phases %standard-phases
4465 (delete 'configure))))
4467 `(("ocamlbuild" ,ocamlbuild)))
4469 `(("topkg" ,ocaml-topkg)
4471 (synopsis "Various signed and unsigned integer types for OCaml")
4472 (description "The ocaml-integers library provides a number of 8-, 16-, 32-
4473 and 64-bit signed and unsigned integer types, together with aliases such as
4474 long and size_t whose sizes depend on the host platform.")
4475 (license license:expat)))
4477 (define-public ocaml-ctypes
4479 (name "ocaml-ctypes")
4481 (home-page "https://github.com/ocamllabs/ocaml-ctypes")
4484 (uri (string-append home-page "/archive/" version ".tar.gz"))
4485 (file-name (string-append name "-" version ".tar.gz"))
4488 "0zrsd42q2nciyg9375g2kydqax6ay299rhyfgms59qiw7d9ylyp9"))))
4489 (build-system ocaml-build-system)
4491 `(#:tests? #f; require an old lwt
4493 (list (string-append "INSTALL_HEADERS = $(wildcard $($(PROJECT).dir)/*.h)"))
4495 (modify-phases %standard-phases
4496 (delete 'configure))))
4498 `(("pkg-config" ,pkg-config)))
4500 `(("libffi" ,libffi)
4501 ("ounit" ,ocaml-ounit)
4502 ("integers" ,ocaml-integers)
4504 ("topkg" ,ocaml-topkg)
4506 (synopsis "Library for binding to C libraries using pure OCaml")
4507 (description "Ctypes is a library for binding to C libraries using pure
4508 OCaml. The primary aim is to make writing C extensions as straightforward as
4509 possible. The core of ctypes is a set of combinators for describing the
4510 structure of C types -- numeric types, arrays, pointers, structs, unions and
4511 functions. You can use these combinators to describe the types of the
4512 functions that you want to call, then bind directly to those functions -- all
4513 without writing or generating any C!")
4514 (license license:expat)))
4516 (define-public ocaml-ocb-stubblr
4518 (name "ocaml-ocb-stubblr")
4520 (home-page "https://github.com/pqwy/ocb-stubblr")
4524 home-page "/releases/download/v0.1.1/ocb-stubblr-"
4526 (file-name (string-append name "-" version ".tbz"))
4529 "167b7x1j21mkviq8dbaa0nmk4rps2ilvzwx02igsc2706784z72f"))))
4530 (build-system ocaml-build-system)
4532 `(#:build-flags (list "build" "--tests" "true")
4534 (modify-phases %standard-phases
4535 (delete 'configure))))
4537 `(("topkg" ,ocaml-topkg)
4540 `(("astring" ,ocaml-astring)
4541 ("ocamlbuild" ,ocamlbuild)))
4542 (synopsis "OCamlbuild plugin for C stubs")
4543 (description "Ocb-stubblr is about ten lines of code that you need to
4544 repeat over, over, over and over again if you are using ocamlbuild to build
4545 OCaml projects that contain C stubs.")
4546 (license license:isc)))
4548 (define-public ocaml-tsdl
4552 (home-page "http://erratique.ch/software/tsdl")
4555 (uri (string-append home-page "/releases/tsdl-"
4557 (file-name (string-append name "-" version ".tar.gz"))
4560 "08bb97fhvz829fb0sgjn2p20mp7b04v98zy2qxpk2w390a6c4b34"))))
4561 (build-system ocaml-build-system)
4563 `(#:build-flags '("build")
4564 #:tests? #f; tests require a display device
4566 (modify-phases %standard-phases
4567 (delete 'configure))))
4569 `(("ocamlbuild" ,ocamlbuild)
4571 ("pkg-config" ,pkg-config)))
4573 `(("topkg" ,ocaml-topkg)
4574 ("result" ,ocaml-result)
4576 ("integers" ,ocaml-integers)
4577 ("ctypes" ,ocaml-ctypes)))
4578 (synopsis "Thin bindings to SDL for OCaml")
4579 (description "Tsdl is an OCaml library providing thin bindings to the
4580 cross-platform SDL C library.")
4581 (license license:isc)))
4583 (define-public dedukti
4587 (home-page "https://deducteam.github.io/")
4592 (url "https://github.com/deducteam/dedukti.git")
4593 (commit (string-append "v" version))))
4594 (file-name (git-file-name name version))
4597 "0frl3diff033i4fmq304b8wbsdnc9mvlhmwd7a3zd699ng2lzbxb"))))
4599 `(("menhir" ,ocaml-menhir)))
4601 `(("ocamlbuild" ,ocamlbuild)))
4602 (build-system ocaml-build-system)
4605 (modify-phases %standard-phases
4613 (invoke "make" "tests")
4615 (add-before 'install 'set-binpath
4616 ;; Change binary path in the makefile
4618 (let ((out (assoc-ref %outputs "out")))
4619 (substitute* "GNUmakefile"
4621 (string-append "BINDIR = " out "/bin"))))
4625 (invoke "make" "install")
4627 (synopsis "Proof-checker for the λΠ-calculus modulo theory, an extension of
4629 (description "Dedukti is a proof-checker for the λΠ-calculus modulo
4630 theory. The λΠ-calculus is an extension of the simply typed λ-calculus with
4631 dependent types. The λΠ-calculus modulo theory is itself an extension of the
4632 λΠ-calculus where the context contains variable declaration as well as rewrite
4633 rules. This system is not designed to develop proofs, but to check proofs
4634 developed in other systems. In particular, it enjoys a minimalistic syntax.")
4635 (license license:cecill-c)))
4637 (define-public emacs-dedukti-mode
4638 (let ((commit "d7c3505a1046187de3c3aeb144455078d514594e"))
4640 (name "emacs-dedukti-mode")
4641 (version (git-version "0" "0" commit))
4642 (home-page "https://github.com/rafoo/dedukti-mode")
4650 "1842wikq24c8rg0ac84vb1qby9ng1nssxswyyni4kq85lng5lcrp"))
4651 (file-name (git-file-name name version))))
4653 `(("dedukti" ,dedukti)))
4654 (build-system emacs-build-system)
4657 (modify-phases %standard-phases
4658 (add-before 'install 'patch-dkpath
4660 (let ((dkcheck-path (which "dkcheck")))
4661 (substitute* "dedukti-mode.el"
4662 (("dedukti-path \"(.*)\"")
4663 (string-append "dedukti-path \"" dkcheck-path "\"")))))))))
4664 (synopsis "Emacs major mode for Dedukti files")
4665 (description "This package provides an Emacs major mode for editing
4667 (license license:cecill-b))))
4669 (define-public emacs-flycheck-dedukti
4670 (let ((commit "3dbff5646355f39d57a3ec514f560a6b0082a1cd"))
4672 (name "emacs-flycheck-dedukti")
4673 (version (git-version "0" "0" commit))
4674 (home-page "https://github.com/rafoo/flycheck-dedukti")
4682 "1ffpxnwl3wx244n44mbw81g00nhnykd0lnid29f4aw1av7w6nw8l"))
4683 (file-name (git-file-name name version))))
4684 (build-system emacs-build-system)
4686 `(("dedukti-mode" ,emacs-dedukti-mode)
4687 ("flycheck-mode" ,emacs-flycheck)))
4688 (synopsis "Flycheck integration for the dedukti language")
4689 (description "This package provides a frontend for Flycheck to perform
4690 syntax checking on dedukti files.")
4691 (license license:cecill-b))))
4693 (define-public ocaml-biniou
4695 (name "ocaml-biniou")
4697 (home-page "https://github.com/mjambon/biniou")
4702 (url (string-append home-page ".git"))
4703 (commit (string-append "v" version))))
4704 (file-name (git-file-name name version))
4707 "0mjpgwyfq2b2izjw0flmlpvdjgqpq8shs89hxj1np2r50csr8dcb"))))
4708 (build-system dune-build-system)
4710 `(("ocaml-easy-format" ,ocaml-easy-format)))
4712 `(("which" ,which)))
4713 (synopsis "Data format designed for speed, safety, ease of use and backward
4715 (description "Biniou (pronounced \"be new\" is a binary data format
4716 designed for speed, safety, ease of use and backward compatibility as
4717 protocols evolve. Biniou is vastly equivalent to JSON in terms of
4718 functionality but allows implementations several times faster (4 times faster
4719 than yojson), with 25-35% space savings.")
4720 (license license:bsd-3)))
4722 (define-public ocaml-yojson
4724 (name "ocaml-yojson")
4726 (home-page "https://github.com/ocaml-community/yojson")
4731 (url (string-append home-page ".git"))
4732 (commit (string-append "v" version))))
4733 (file-name (git-file-name name version))
4736 "0nwsfkmqpyfab4rxq76q8ff7giyanghw08094jyrp275v99zdjr9"))))
4737 (build-system dune-build-system)
4739 `(#:test-target "."))
4741 `(("ocaml-biniou" ,ocaml-biniou)
4742 ("ocaml-easy-format" ,ocaml-easy-format)))
4744 `(("ocaml-cppo" ,ocaml-cppo)))
4745 (synopsis "Low-level JSON library for OCaml")
4746 (description "Yojson is an optimized parsing and printing library for the
4747 JSON format. It addresses a few shortcomings of json-wheel including 2x
4748 speedup, polymorphic variants and optional syntax for tuples and variants.
4749 @code{ydump} is a pretty printing command-line program provided with the
4750 yojson package. The program @code{atdgen} can be used to derive OCaml-JSON
4751 serializers and deserializers from type definitions.")
4752 (license license:bsd-3)))
4754 (define-public ocaml-merlin
4756 (name "ocaml-merlin")
4758 (home-page "https://ocaml.github.io/merlin/")
4763 (url "https://github.com/ocaml/merlin.git")
4764 (commit (string-append "v" version))))
4765 (file-name (git-file-name name version))
4768 "15ssgmwdxylbwhld9p1cq8x6kadxyhll5bfyf11dddj6cldna3hb"))))
4769 (build-system dune-build-system)
4771 `(("ocaml-biniou" ,ocaml-biniou)
4772 ("ocaml-yojson" ,ocaml-yojson)
4773 ("ocaml-easy-format" ,ocaml-easy-format)))
4775 `(("ocaml-findlib" ,ocaml-findlib)))
4777 '(#:tests? #f)) ;; Errors in tests in version 3.2.2
4778 (synopsis "Context sensitive completion for OCaml in Vim and Emacs")
4779 (description "Merlin is an editor service that provides modern IDE
4780 features for OCaml. Emacs and Vim support is provided out-of-the-box.
4781 External contributors added support for Visual Studio Code, Sublime Text and
4783 (license license:expat)))
4785 (define-public ocaml-gsl
4794 "https://github.com/mmottl/gsl-ocaml/releases/download/"
4795 version "/gsl-" version ".tbz"))
4798 "17vcswipliq1b2idbzx1z95kskn1a4q4s5v04igilg0f7lnkaarb"))))
4799 (build-system ocaml-build-system)
4802 (home-page "https://mmottl.github.io/gsl-ocaml")
4803 (synopsis "Bindings to the GNU Scientific Library")
4805 "GSL-OCaml is an interface to the @dfn{GNU scientific library} (GSL) for
4806 the OCaml language.")
4807 (license license:gpl3+)))
4809 (define-public ocaml4.01-gsl
4810 (package-with-ocaml4.01 ocaml-gsl))
4812 (define-public cubicle
4818 (uri (string-append "http://cubicle.lri.fr/cubicle-"
4822 "10kk80jdmpdvql88sdjsh7vqzlpaphd8vip2lp47aarxjkwjlz1q"))))
4823 (build-system gnu-build-system)
4825 `(("automake" ,automake)
4827 ("which" ,(@@ (gnu packages base) which))))
4829 `(("ocaml-num" ,ocaml-num)
4832 `(#:configure-flags (list "--with-z3")
4833 #:make-flags (list "QUIET=")
4836 (modify-phases %standard-phases
4837 (add-before 'configure 'configure-for-release
4839 (substitute* "Makefile.in"
4840 (("SVNREV=") "#SVNREV="))
4842 (add-before 'configure 'fix-/bin/sh
4844 (substitute* "configure"
4845 (("-/bin/sh") (string-append "-" (which "sh"))))
4847 (add-before 'configure 'fix-smt-z3wrapper.ml
4849 (substitute* "Makefile.in"
4852 (add-before 'configure 'fix-ocaml-num
4853 (lambda* (#:key inputs #:allow-other-keys)
4854 (substitute* "Makefile.in"
4855 (("= \\$\\(FUNCTORYLIB\\)")
4856 (string-append "= -I "
4857 (assoc-ref inputs "ocaml-num")
4858 "/lib/ocaml/site-lib"
4859 " $(FUNCTORYLIB)")))
4861 (home-page "http://cubicle.lri.fr/")
4862 (synopsis "Model checker for array-based systems")
4863 (description "Cubicle is a model checker for verifying safety properties
4864 of array-based systems. This is a syntactically restricted class of
4865 parametrized transition systems with states represented as arrays indexed by
4866 an arbitrary number of processes. Cache coherence protocols and mutual
4867 exclusion algorithms are typical examples of such systems.")
4868 (license license:asl2.0)))
4870 (define-public ocaml-sexplib0
4872 (name "ocaml-sexplib0")
4874 (home-page "https://github.com/janestreet/sexplib0")
4879 (url (string-append home-page ".git"))
4880 (commit (string-append "v" version))))
4881 (file-name (git-file-name name version))
4884 "07v3ggyss7xhfv14bjk1n87sr42iqwj4cgjiv2lcdfkqk49i2bmi"))))
4885 (build-system dune-build-system)
4887 '(#:tests? #f)) ;no tests
4888 (synopsis "Library containing the definition of S-expressions and some
4890 (description "Part of Jane Street's Core library The Core suite of
4891 libraries is an industrial strength alternative to OCaml's standard library
4892 that was developed by Jane Street, the largest industrial user of OCaml.")
4893 (license license:expat)))
4895 (define-public ocaml-parsexp
4897 (name "ocaml-parsexp")
4899 (home-page "https://github.com/janestreet/parsexp")
4904 (url (string-append home-page ".git"))
4905 (commit (string-append "v" version))))
4906 (file-name (git-file-name name version))
4909 "1nyq23s5igd8cf3n4qxprjvhbmb6ighb3fy5mw7hxl0mdgsw5fvz"))))
4910 (build-system dune-build-system)
4912 `(("ocaml-sexplib0" ,ocaml-sexplib0)))
4913 (synopsis "S-expression parsing library")
4915 "This library provides generic parsers for parsing S-expressions from
4916 strings or other medium.
4918 The library is focused on performances but still provide full generic
4919 parsers that can be used with strings, bigstrings, lexing buffers,
4920 character streams or any other sources effortlessly.
4922 It provides three different class of parsers:
4925 the normal parsers, producing [Sexp.t] or [Sexp.t list] values
4927 the parsers with positions, building compact position sequences so
4928 that one can recover original positions in order to report properly
4929 located errors at little cost
4931 the Concrete Syntax Tree parsers, produce values of type
4932 @code{Parsexp.Cst.t} which record the concrete layout of the s-expression
4933 syntax, including comments
4936 This library is portable and doesn't provide IO functions. To read
4937 s-expressions from files or other external sources, you should use
4939 (license license:expat)))
4941 (define-public ocaml-sexplib
4943 (name "ocaml-sexplib")
4945 (home-page "https://github.com/janestreet/sexplib")
4950 (url (string-append home-page ".git"))
4951 (commit (string-append "v" version))))
4952 (file-name (git-file-name name version))
4955 "1qfl0m04rpcjvc4yw1hzh6r16jpwmap0sa9ax6zjji67dz4szpyb"))))
4956 (build-system dune-build-system)
4958 `(("ocaml-num" ,ocaml-num)
4959 ("ocaml-parsexp" ,ocaml-parsexp)
4960 ("ocaml-sexplib0" ,ocaml-sexplib0)))
4962 "Library for serializing OCaml values to and from S-expressions")
4964 "This package is part of Jane Street's Core library. Sexplib contains
4965 functionality for parsing and pretty-printing s-expressions.")
4966 (license license:expat)))
4968 (define-public ocaml-base
4972 (home-page "https://github.com/janestreet/base")
4977 (url (string-append home-page ".git"))
4978 (commit (string-append "v" version))))
4979 (file-name (git-file-name name version))
4982 "0j6xb4265jr41vw4fjzak6yr8s30qrnzapnc6rl1dxy8bjai0nir"))))
4983 (build-system dune-build-system)
4985 `(("ocaml-sexplib0" ,ocaml-sexplib0)))
4988 (modify-phases %standard-phases
4990 ;; make warnings non fatal (jbuilder behaviour)
4992 (invoke "dune" "build" "@install" "--profile=release"))))))
4994 "Full standard library replacement for OCaml")
4996 "Base is a complete and portable alternative to the OCaml standard
4997 library. It provides all standard functionalities one would expect
4998 from a language standard library. It uses consistent conventions
4999 across all of its module.
5001 Base aims to be usable in any context. As a result system dependent
5002 features such as I/O are not offered by Base. They are instead
5003 provided by companion libraries such as
5004 @url{https://github.com/janestreet/stdio, ocaml-stdio}.")
5005 (license license:expat)))
5007 (define-public ocaml-compiler-libs
5009 (name "ocaml-compiler-libs")
5011 (home-page "https://github.com/janestreet/ocaml-compiler-libs")
5016 (url (string-append home-page ".git"))
5017 (commit (string-append "v" version))))
5018 (file-name (git-file-name name version))
5021 "03jds7bszh8wwpfwxb3dg0gyr1j1872wxwx1xqhry5ir0i84bg0s"))))
5022 (build-system dune-build-system)
5024 '(#:tests? #f)) ;no tests
5025 (synopsis "Compiler libraries repackaged")
5026 (description "This packaeg simply repackages the OCaml compiler libraries
5027 so they don't expose everything at toplevel. For instance, @code{Ast_helper}
5028 is now @code{Ocaml_common.Ast_helper}.")
5029 (license license:expat)))
5031 (define-public ocaml-stdio
5033 (name "ocaml-stdio")
5035 (home-page "https://github.com/janestreet/stdio")
5040 (url (string-append home-page ".git"))
5041 (commit (string-append "v" version))))
5042 (file-name (git-file-name name version))
5045 "1facajqhvq34g2wrg368y0ajxd6lrj5b3lyzyj0jhdmraxajjcwn"))))
5046 (build-system dune-build-system)
5047 (inputs `(("ocaml-base" ,ocaml-base)
5048 ("ocaml-sexplib0" ,ocaml-sexplib0)))
5050 '(#:tests? #f)) ;no tests
5051 (synopsis "Standard IO library for OCaml")
5053 "Stdio implements simple input/output functionalities for OCaml. It
5054 re-exports the input/output functions of the OCaml standard libraries using
5055 a more consistent API.")
5056 (license license:expat)))
5058 (define-public ocaml-ppx-derivers
5060 (name "ocaml-ppx-derivers")
5063 "https://github.com/ocaml-ppx/ppx_derivers")
5068 (url (string-append home-page ".git"))
5070 (file-name (git-file-name name version))
5073 "0bnhihl1w31as5w2czly1v3d6pbir9inmgsjg2cj6aaj9v1dzd85"))))
5074 (build-system dune-build-system)
5076 '(#:tests? #f)) ;no tests
5077 (synopsis "Shared @code{@@deriving} plugin registry")
5079 "Ppx_derivers is a tiny package whose sole purpose is to allow
5080 ppx_deriving and ppx_type_conv to inter-operate gracefully when linked
5081 as part of the same ocaml-migrate-parsetree driver.")
5082 (license license:bsd-3)))
5084 (define-public ocaml-ppxlib
5086 (name "ocaml-ppxlib")
5088 (home-page "https://github.com/ocaml-ppx/ppxlib")
5093 (url (string-append home-page ".git"))
5095 (file-name (git-file-name name version))
5098 "1nr4igf5m4prvigvv470dnhfdhdw0p6hz6zw8gnm5bzcv7s2lg5l"))))
5099 (build-system dune-build-system)
5101 `(("ocaml-base" ,ocaml-base)
5102 ("ocaml-compiler-libs" ,ocaml-compiler-libs)
5103 ("ocaml-migrate-parsetree" ,ocaml-migrate-parsetree)
5104 ("ocaml-ppx-derivers" ,ocaml-ppx-derivers)
5105 ("ocaml-stdio" ,ocaml-stdio)
5106 ("ocaml-result" ,ocaml-result)
5107 ("ocaml-sexplib0" ,ocaml-sexplib0)))
5109 `(("ocaml-findlib" ,ocaml-findlib)))
5112 (modify-phases %standard-phases
5113 (add-before 'check 'set-topfind
5114 (lambda* (#:key inputs #:allow-other-keys)
5115 ;; add the line #directory ".." at the top of each file
5116 ;; using #use "topfind";; to be able to find topfind
5117 (let* ((findlib-path (assoc-ref inputs "ocaml-findlib"))
5119 (string-append findlib-path "/lib/ocaml/site-lib")))
5120 (substitute* '("test/base/test.ml"
5121 "test/deriving/test.ml"
5122 "test/driver/attributes/test.ml"
5123 "test/driver/non-compressible-suffix/test.ml"
5124 "test/driver/transformations/test.ml")
5125 (("#use \"topfind\";;" all)
5126 (string-append "#directory \"" findlib-libdir "\"\n"
5130 "Base library and tools for ppx rewriters")
5132 "A comprehensive toolbox for ppx development. It features:
5134 @item an OCaml AST / parser / pretty-printer snapshot, to create a full frontend
5135 independent of the version of OCaml;
5136 @item a library for library for ppx rewriters in general, and type-driven code
5137 generators in particular;
5139 a feature-full driver for OCaml AST transformers;
5140 @item a quotation mechanism allowing to write values representing the
5141 OCaml AST in the OCaml syntax;
5142 @item a generator of open recursion classes from type definitions.
5144 (license license:expat)))